Changeset 3031

Show
Ignore:
Timestamp:
03/05/09 04:53:33
Author:
slomo
Message:

* 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)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/notify-sharp/ChangeLog

    r3009 r3031  
     12009-03-05  Sebastian Dröge  <sebastian.droege@collabora.co.uk> 
     2 
     3    * src/Notification.cs: 
     4      Patch by Cody Russell  <bratsche {at} gnome.org>: 
     5      When adding a new action, first check that the notification 
     6      daemon supports actions. (BGO #571177) 
     7 
    182008-03-20  Sebastian Dröge  <slomo@circular-chaos.org> 
    29 
  • trunk/notify-sharp/src/Notification.cs

    r3009 r3031  
    342342 
    343343        public void AddAction (string action, string label, ActionHandler handler) { 
    344             lock (action_map) { 
    345                 action_map[action] = new ActionTuple (label, handler); 
    346             } 
    347             Update (); 
     344            if (Array.IndexOf (Notifications.Global.Capabilities, "actions") > -1) { 
     345                lock (action_map) { 
     346                    action_map[action] = new ActionTuple (label, handler); 
     347                } 
     348                Update (); 
     349            } 
    348350        } 
    349351