From a3dec5eaa78040e021942163948967567558e9d1 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Tue, 29 Jan 2008 21:53:44 +0000 Subject: [PATCH] prime the progress bar (makes me feel better) --- tools/cleanroom/tmp_cleanui.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/cleanroom/tmp_cleanui.py b/tools/cleanroom/tmp_cleanui.py index 420fb079..23528c07 100644 --- a/tools/cleanroom/tmp_cleanui.py +++ b/tools/cleanroom/tmp_cleanui.py @@ -62,6 +62,13 @@ class HellowWorldGTK: column.pack_start(cell, False) 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; # create Patch objects and stuff them into a list patches = []