banshee r5022 - in trunk/banshee: . src/Extensions/Banshee.NotificationArea/Notifications



Author: bratsche
Date: Tue Feb 10 20:05:53 2009
New Revision: 5022
URL: http://svn.gnome.org/viewvc/banshee?rev=5022&view=rev

Log:
2009-02-10  Cody Russell  <bratsche gnome org>

        * src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs:
        When adding a new action, first check that the notification daemon supports
        actions. (BGO #571177)



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs

Modified: trunk/banshee/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.NotificationArea/Notifications/Notification.cs	Tue Feb 10 20:05:53 2009
@@ -282,10 +282,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) {



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