hamster-applet r880 - trunk/hamster



Author: tbaugis
Date: Wed Apr  1 12:03:37 2009
New Revision: 880
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=880&view=rev

Log:
don't show action buttons for the new ubuntu notification system


Modified:
   trunk/hamster/applet.py

Modified: trunk/hamster/applet.py
==============================================================================
--- trunk/hamster/applet.py	(original)
+++ trunk/hamster/applet.py	Wed Apr  1 12:03:37 2009
@@ -71,10 +71,13 @@
 
     def msg(self, body, edit_cb, switch_cb):
         self._notify = pynotify.Notification(self.summary, body, self._icon, self._attach)
-        #translators: this is edit activity action in the notifier bubble
-        self._notify.add_action("edit", _("Edit"), edit_cb)
-        #translators: this is switch activity action in the notifier bubble
-        self._notify.add_action("switch", _("Switch"), switch_cb)
+
+        if "actions" in pynotify.get_server_caps():
+            #translators: this is edit activity action in the notifier bubble
+            self._notify.add_action("edit", _("Edit"), edit_cb)
+            #translators: this is switch activity action in the notifier bubble
+            self._notify.add_action("switch", _("Switch"), switch_cb)
+            
         self._notify.show()
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]