ui.py

changeset 9
aa121291eb0e
parent 1
4cdc9c1f6b28
child 10
76dbfb06eba0
equal deleted inserted replaced
8:7b2d2eac6a48 9:aa121291eb0e
3 # 3 #
4 4
5 import rumps 5 import rumps
6 6
7 class BorgendTray(rumps.App): 7 class BorgendTray(rumps.App):
8 @rumps.clicked("Status...") 8 def __init__(self, name, backups):
9 def prefs(self, _): 9 menu=[rumps.MenuItem(b.name, callback=self.silly) for b in backups]
10 rumps.alert("None") 10 menu = menu + [rumps.MenuItem("Quit...", callback=self.my_quit_button)]
11 super().__init__(name, menu=menu, quit_button=None)
12
13 def my_quit_button(self, _):
14 rumps.quit_application()
15
16 def silly(self, sender):
17 sender.state=not sender.state
18

mercurial