Commits

Josh VanderLinden committed 603ada6

Moving resources

Comments (0)

Files changed (9)

resources/.directory

-[Dolphin]
-PreviewsShown=true
-Timestamp=2013,2,22,10,34,57
-Version=3

resources/receive.wav

Binary file removed.

resources/tray-unseen.png

Removed
Old image

resources/tray.png

Removed
Old image
 import sys
 import time
 
-from gi.repository import Notify
+try:
+    from gi.repository import Notify
+except ImportError:
+    Notify = None
 
+from wx.lib.pubsub import setupkwargs
 from wx.lib.pubsub import pub
 import wx
 import zmq
 
         self.normal_icon = get_icon('tray.png')
         self.unseen_icon = get_icon('tray-unseen.png')
-        self.menu = self.CreatePopupMenu()
 
         pub.subscribe(self.on_message_received, 'msg')
 
         self.snatch = MessageSnatcher()
         self.snatch.start()
 
-    def CreatePopupMenu(self, counts=None):
+    def CreatePopupMenu(self):
         menu = wx.Menu()
-
-        if counts:
-            for info in counts.items():
-                create_menu_item(menu, '%s:\t%s' % info, lambda ev: None)
-            menu.AppendSeparator()
-
         create_menu_item(menu, 'Exit', self.on_exit)
-
         return menu
 
     def set_tooltip(self, counts=None):
 
     def on_message_received(self, counts):
         self.set_tooltip(counts)
-        self.CreatePopupMenu(counts)
 
     def on_exit(self, event):
         self.snatch.stop()
             self.methods = ['libnotify', 'bell']
 
         self.event = Event()
-        self.libnotify_ready = Notify.init(__name__)
+
+        if Notify:
+            self.libnotify_ready = Notify.init(__name__)
+        else:
+            self.libnotify_ready = False
 
         # connect to zmq
         self.sub = ctx.socket(zmq.SUB)
     return wx.IconFromBitmap(wx.Bitmap(join(RES_DIR, path)))
 
 
+assert setupkwargs
+
+
 if __name__ == '__main__':
     main()

zedify/resources/.directory

+[Dolphin]
+PreviewsShown=true
+Timestamp=2013,2,22,10,34,57
+Version=3

zedify/resources/receive.wav

Binary file added.

zedify/resources/tray-unseen.png

Added
New image

zedify/resources/tray.png

Added
New image