ui.py

changeset 75
2a44b9649212
parent 72
e0e6043779e2
child 76
4b08fca3ce34
equal deleted inserted replaced
74:4f56142e7497 75:2a44b9649212
238 self.menu.clear() 238 self.menu.clear()
239 self.menu.update(menu) 239 self.menu.update(menu)
240 self.title=title 240 self.title=title
241 241
242 def __status_callback(self, index, status, errorlog=None): 242 def __status_callback(self, index, status, errorlog=None):
243 logger.debug('Status callback: %s' % str(status)) 243 logger.debug("Tray status callback")
244
245 with self.lock: 244 with self.lock:
246 self.statuses[index]=status 245 self.statuses[index]=status
247 if self.refresh_timer==None and not self.refresh_timer_time: 246 # Time the refresh if it has not been timed, or if the timer
247 # is timing for the "long-term" (refresh_timer_time set)
248 if not self.refresh_timer or self.refresh_timer_time:
249 logger.debug("Timing refresh")
248 self.refresh_timer=Timer(refresh_interval, self.refresh_ui) 250 self.refresh_timer=Timer(refresh_interval, self.refresh_ui)
249 # refresh_timer_time is only set for "long-term timers" 251 # refresh_timer_time is only set for "long-term timers"
250 self.refresh_timer_time=None 252 self.refresh_timer_time=None
251 self.refresh_timer.start() 253 self.refresh_timer.start()
252 254

mercurial