updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / network-manager-applet-notify-osd / lp460144_correctly_update_notification.patch
blob82a1afbcfa4430909fed2faa547e0b20f48417e5
1 Index: network-manager-applet-0.8/src/applet.c
2 ===================================================================
3 --- network-manager-applet-0.8.orig/src/applet.c 2010-03-09 14:58:49.000000000 +0100
4 +++ network-manager-applet-0.8/src/applet.c 2010-03-09 15:02:59.000000000 +0100
5 @@ -615,17 +615,6 @@
6 return item;
9 -static void
10 -applet_clear_notify (NMApplet *applet)
12 - if (applet->notification == NULL)
13 - return;
15 - notify_notification_close (applet->notification, NULL);
16 - g_object_unref (applet->notification);
17 - applet->notification = NULL;
20 static gboolean
21 applet_notify_server_has_actions ()
23 @@ -675,15 +664,23 @@
24 return;
25 #endif
27 - applet_clear_notify (applet);
29 escaped = utils_escape_notify_message (message);
30 - notify = notify_notification_new (summary,
31 - escaped,
32 - icon ? icon : GTK_STOCK_NETWORK,
33 - NULL);
34 - g_free (escaped);
35 - applet->notification = notify;
36 + if (applet->notification == NULL) {
37 + notify = notify_notification_new (summary,
38 + escaped,
39 + icon ? icon : GTK_STOCK_NETWORK,
40 + NULL);
42 + applet->notification = notify;
43 + } else {
44 + notify = applet->notification;
45 + notify_notification_update (notify,
46 + summary,
47 + escaped,
48 + icon ? icon : GTK_STOCK_NETWORK);
49 + }
51 + g_free (escaped);
53 notify_notification_attach_to_status_icon (notify, applet->status_icon);
54 notify_notification_set_urgency (notify, urgency);
55 @@ -2973,7 +2973,6 @@
56 /* Have clicking on the applet act also as acknowledgement
57 * of the notification.
59 - applet_clear_notify (applet);
61 nma_menu_clear (applet);
62 gtk_menu_popup (GTK_MENU (applet->menu), NULL, NULL,
63 @@ -2990,7 +2989,6 @@
64 /* Have clicking on the applet act also as acknowledgement
65 * of the notification.
67 - applet_clear_notify (applet);
69 nma_context_menu_update (applet);
70 gtk_menu_popup (GTK_MENU (applet->context_menu), NULL, NULL,