Index: st2.py ================================================================== --- st2.py +++ st2.py @@ -39,10 +39,11 @@ from copy import copy import inspect import traceback from threading import Thread import time +from compat2and3 import * # add library path (either global setup, or pyzip basename) if not os.path.dirname(__file__) in sys.path: sys.path.insert(0, os.path.dirname(__file__)) @@ -366,10 +367,11 @@ # Shortcut to statusbar and progressbar (receives either a string, or a float). def status(self, text=None, timeout=3): self.status_last = time.time() + timeout gobject.timeout_add(int(timeout*1000), self.status_clear) + #log.UI("progressbar := %s" %text) # progressbar if isinstance(text, (int, float)): if (text <= 0): # unknown state uikit.do(self.progress.pulse, immediate=1) elif text >= 0.999 or text < 0.0: # completed @@ -376,19 +378,20 @@ uikit.do(self.progress.hide) else: # show percentage uikit.do(self.progress.show, immediate=1) uikit.do(self.progress.set_fraction, text, immediate=1) # add text - elif isinstance(text, (str)): + elif isinstance(text, (str, unicode)): uikit.do(self.statusbar.set_text, text) # clean up else: self.status_clear(anyway=True) # Clean up after 3 seconds def status_clear(self, anyway=False): if anyway or time.time() >= self.status_last: + #log.UI("progressbar.hide()") self.statusbar.set_text("") self.progress.hide() return False else: return True