[Galago-commits] r3031 - in trunk/notify-sharp: . src

galago-commits at freedesktop.org galago-commits at freedesktop.org
Thu Mar 5 04:53:34 PST 2009


Author: slomo
Date: 2009-03-05 04:53:33 -0800 (Thu, 05 Mar 2009)
New Revision: 3031

Modified:
   trunk/notify-sharp/ChangeLog
   trunk/notify-sharp/src/Notification.cs
Log:
* src/Notification.cs:
Patch by Cody Russell  <bratsche {at} gnome.org>:
When adding a new action, first check that the notification
daemon supports actions. (BGO #571177)


Modified: trunk/notify-sharp/ChangeLog
===================================================================
--- trunk/notify-sharp/ChangeLog	2009-01-23 09:29:25 UTC (rev 3030)
+++ trunk/notify-sharp/ChangeLog	2009-03-05 12:53:33 UTC (rev 3031)
@@ -1,3 +1,10 @@
+2009-03-05  Sebastian Dröge  <sebastian.droege at collabora.co.uk>
+
+	* src/Notification.cs:
+	  Patch by Cody Russell  <bratsche {at} gnome.org>:
+	  When adding a new action, first check that the notification
+	  daemon supports actions. (BGO #571177)
+
 2008-03-20  Sebastian Dröge  <slomo at circular-chaos.org>
 
 	* src/Notification.cs:

Modified: trunk/notify-sharp/src/Notification.cs
===================================================================
--- trunk/notify-sharp/src/Notification.cs	2009-01-23 09:29:25 UTC (rev 3030)
+++ trunk/notify-sharp/src/Notification.cs	2009-03-05 12:53:33 UTC (rev 3031)
@@ -341,10 +341,12 @@
 		}
 
 		public void AddAction (string action, string label, ActionHandler handler) {
-			lock (action_map) {
-				action_map[action] = new ActionTuple (label, handler);
+			if (Array.IndexOf (Notifications.Global.Capabilities, "actions") > -1) {
+				lock (action_map) {
+					action_map[action] = new ActionTuple (label, handler);
+				}
+				Update ();
 			}
-			Update ();
 		}
 
 		public void RemoveAction (string action) {



More information about the galago-commits mailing list