ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #01006
[Merge] lp:~dbarth/notify-osd/close-notification-api into lp:notify-osd
David Barth has proposed merging lp:~dbarth/notify-osd/close-notification-api into lp:notify-osd.
Requested reviews:
Notify OSD Developers (notify-osd-developers)
This patch should re-enable the API. It should help clarify Network Manager's notifications at startup or when resuming from sleep.
--
https://code.launchpad.net/~dbarth/notify-osd/close-notification-api/+merge/20008
Your team ayatana-commits is subscribed to branch lp:notify-osd.
=== modified file 'src/stack.c'
--- src/stack.c 2009-10-20 08:51:11 +0000
+++ src/stack.c 2010-02-23 21:58:13 +0000
@@ -810,16 +810,20 @@
if (bubble == NULL)
return TRUE;
- dbus_send_close_signal (bubble_get_sender (bubble),
- bubble_get_id (bubble),
- 3);
-
- // do not trigger any closure of a notification-bubble here, as
- // this kind of control from outside (DBus) does not comply with
- // the notify-osd specification
- //bubble_hide (bubble);
- //g_object_unref (bubble);
- //stack_layout (self);
+ // keep a copy of that information before disposing
+ // a notification
+ gchar *sender = g_strdup (bubble_get_sender (bubble));
+
+ bubble_hide (bubble);
+
+ // confirm the notification has been closed
+ dbus_send_close_signal (sender, id, 3);
+
+ g_object_unref (bubble);
+
+ stack_layout (self);
+
+ g_free (sender);
return TRUE;
}
Follow ups