Reorder

Sun, 21 Jan 2018 11:59:53 +0000

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sun, 21 Jan 2018 11:59:53 +0000
changeset 28
a7c56424e867
parent 27
a347387868be
child 29
9dd2e5d57a7c

Reorder

ui.py file | annotate | diff | comparison | revisions
--- a/ui.py	Sun Jan 21 11:57:47 2018 +0000
+++ b/ui.py	Sun Jan 21 11:59:53 2018 +0000
@@ -141,22 +141,12 @@
 
         return menu, state
 
-
-    def my_quit(self, _):
-        rumps.quit_application()
-
-    def __menu_select_backup(self, sender, b):
-        #sender.state=not sender.state
-        logging.debug("Manually backup '%s'", b.name)
-        b.create(None)
-
-
     def refresh_ui(self):
         with self.lock:
             self.refresh_timer=None
             logging.debug('Rebuilding menu')
+            menu, active=self.__rebuild_menu()
             self.menu.clear()
-            menu, active=self.__rebuild_menu()
             self.menu.update(menu)
             self.title=traynames[active]
 
@@ -184,6 +174,14 @@
 
             rumps.notification('Borgend', msgid, errorlog['message'], data=d)
 
+    def my_quit(self, _):
+        rumps.quit_application()
+
+    def __menu_select_backup(self, sender, b):
+        #sender.state=not sender.state
+        logging.debug("Manually backup '%s'", b.name)
+        b.create(None)
+
     @rumps.notifications
     def notification_center(data):
         pass

mercurial