mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-02 07:25:45 -04:00
prime the progress bar (makes me feel better)
This commit is contained in:
parent
45bffa36a7
commit
a3dec5eaa7
1 changed files with 7 additions and 0 deletions
|
@ -62,6 +62,13 @@ class HellowWorldGTK:
|
||||||
column.pack_start(cell, False)
|
column.pack_start(cell, False)
|
||||||
column.add_attribute(cell, "text", 0)
|
column.add_attribute(cell, "text", 0)
|
||||||
|
|
||||||
|
# set the progress bar up
|
||||||
|
# by default we've "done" all the 1-patch textures
|
||||||
|
bar = self.wTree.get_widget("progressbar1")
|
||||||
|
done = len(filter(lambda x: len(x.patches) > 1, self.textures))
|
||||||
|
bar.set_fraction(float(done) / len(self.textures))
|
||||||
|
bar.set_text("%d/%d" % (done, len(self.textures)))
|
||||||
|
|
||||||
# parse the example texture, fetch the width,height;
|
# parse the example texture, fetch the width,height;
|
||||||
# create Patch objects and stuff them into a list
|
# create Patch objects and stuff them into a list
|
||||||
patches = []
|
patches = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue