ui.py

changeset 78
83b43987e61e
parent 76
4b08fca3ce34
child 79
b075b3db3044
equal deleted inserted replaced
77:e8773133bf79 78:83b43987e61e
6 import time 6 import time
7 import datetime 7 import datetime
8 import logging 8 import logging
9 import borgend 9 import borgend
10 import backup 10 import backup
11 import sleep 11 import dreamtime
12 from threading import Lock, Timer 12 from threading import Lock, Timer
13 from config import settings 13 from config import settings
14 import objc 14 import objc
15 15
16 logger=borgend.logger.getChild(__name__) 16 logger=borgend.logger.getChild(__name__)
171 # See also http://math.andrej.com/2009/04/09/pythons-lambda-is-broken/ 171 # See also http://math.andrej.com/2009/04/09/pythons-lambda-is-broken/
172 cb=(lambda status, errors=None, _index=index: 172 cb=(lambda status, errors=None, _index=index:
173 self.__status_callback(_index, status, errorlog=errors)) 173 self.__status_callback(_index, status, errorlog=errors))
174 backups[index].set_status_update_callback(cb) 174 backups[index].set_status_update_callback(cb)
175 175
176 sleep.add_callback(self, self.refresh_ui) 176 dreamtime.add_callback(self, self.refresh_ui)
177 177
178 def __rebuild_menu(self): 178 def __rebuild_menu(self):
179 menu=[] 179 menu=[]
180 state=(backup.State.INACTIVE, backup.Errors.OK) 180 state=(backup.State.INACTIVE, backup.Errors.OK)
181 need_reconstruct=None 181 need_reconstruct=None

mercurial