418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439 | sbar_cid = self.get_widget("statusbar").get_context_id("messages")
# remove text
while ((not text) and (type(text)==str) and len(sbar_msg)):
sbar_msg.pop()
mygtk.do(lambda:self.statusbar.pop(sbar_cid))
# progressbar
if (type(text)==float):
__print__(dbg.PROC, "status.progressbar", float, text)
if (text >= 999.0/1000): # completed
mygtk.do(lambda:self.progress.hide())
else: # show percentage
__print__(dbg.PROC, "status.progressbar", dbg.ERR, "fraction")
mygtk.do(lambda:self.progress.show() or self.progress.set_fraction(text))
if (text <= 0): # unknown state
__print__(dbg.PROC, "status.progressbar", dbg.STAT, "PULSE")
mygtk.do(lambda:self.progress.pulse())
# add text
elif (type(text)==str):
sbar_msg.append(1)
mygtk.do(lambda:self.statusbar.push(sbar_cid, text))
pass
|
<
<
<
| 418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436 | sbar_cid = self.get_widget("statusbar").get_context_id("messages")
# remove text
while ((not text) and (type(text)==str) and len(sbar_msg)):
sbar_msg.pop()
mygtk.do(lambda:self.statusbar.pop(sbar_cid))
# progressbar
if (type(text)==float):
if (text >= 999.0/1000): # completed
mygtk.do(lambda:self.progress.hide())
else: # show percentage
mygtk.do(lambda:self.progress.show() or self.progress.set_fraction(text))
if (text <= 0): # unknown state
mygtk.do(lambda:self.progress.pulse())
# add text
elif (type(text)==str):
sbar_msg.append(1)
mygtk.do(lambda:self.statusbar.push(sbar_cid, text))
pass
|