aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SysIndicator.py22
1 files changed, 1 insertions, 21 deletions
diff --git a/SysIndicator.py b/SysIndicator.py
index 2f7689c..3c79286 100644
--- a/SysIndicator.py
+++ b/SysIndicator.py
@@ -12,29 +12,9 @@ elif sys.platform=="darwin":
from Foundation import *
from AppKit import *
from PyObjCTools import AppHelper
+ from StatusAppMac import StatusApp
-class StatusApp(NSApplication):
-
- def initMenu(self,menu):
- statusbar = NSStatusBar.systemStatusBar()
- self.statusitem = statusbar.statusItemWithLength_(NSVariableStatusItemLength)
-
- self.mymenu = menu
- #add menu to statusitem
- self.statusitem.setMenu_(menu.menubarMenu)
- self.statusitem.setToolTip_('Parrot Zik Indicator')
-
- def setIcon(self,icon,icon_directory):
- self.icon = NSImage.alloc().initByReferencingFile_(icon_directory+icon+'.png')
- self.icon.setScalesWhenResized_(True)
- self.icon.setSize_((20, 20))
- self.statusitem.setImage_(self.icon)
-
- def clicked_(self, notification):
- self.mymenu.actions[notification._.title]()
- NSLog('clicked!')
-
class SysIndicator:
def __init__(self, icon,menu):
if sys.platform=="linux2":