Patch for notify-sharp - Support for notify-osd in Ubuntu

View: New views
1 Messages — Rating Filter:   Alert me  

Patch for notify-sharp - Support for notify-osd in Ubuntu

by Ken VanDine-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have attached a path which adds a check to see if the notification
daemon supports actions, and only use them if it does.  You can also
reference our Launchpad bug @
https://bugs.launchpad.net/ubuntu/+source/notify-sharp/+bug/331695

I wasn't able to create a ticket in trac to attach this, your
consideration is appreciated.

Thanks,
Ken VanDine
Ubuntu Desktop Integration Engineer


[02-notify-check.patch]

#! /bin/sh /usr/share/dpatch/dpatch-run

@DPATCH@

diff -r 7b56deeaef2e src/Notification.cs
--- a/src/Notification.cs Fri Feb 20 15:25:37 2009 -0500
+++ b/src/Notification.cs Fri Feb 20 15:51:35 2009 -0500
@@ -273,10 +273,13 @@
  }
 
  public void AddAction (string action, string label, ActionHandler handler) {
- lock (action_map) {
- action_map[action] = new ActionTuple (label, handler);
+                       if (Notifications.Global.Capabilities != null &&
+                           Array.IndexOf (Notifications.Global.Capabilities, "actions") > -1) {
+                               lock (action_map) {
+                                       action_map[action] = new ActionTuple (label, handler);
+                               }
+                               Update ();
  }
- Update ();
  }
 
  public void RemoveAction (string action) {


_______________________________________________
galago-devel mailing list
galago-devel@...
http://lists.freedesktop.org/mailman/listinfo/galago-devel