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 |