summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>2015-01-26 17:51:10 -0500
committerDan Williams <dcbw@redhat.com>2015-02-02 11:26:51 +0100
commit76e888cb7bdfdd3a77fb878f67578d31184755fb (patch)
tree9bd4a79ce469927d1f40cc05bb18f0c30d76e973
parent78085617f308704bfc4163fe934561a46c8a8a8f (diff)
downloadnetwork-manager-applet-76e888cb7bdfdd3a77fb878f67578d31184755fb.tar.gz
applet: clear notification actions before adding new ones
Make sure we only ever have one of the "Don't show this again" button that will trigger disabling notifications. Otherwise we end up with multiple instances of the same button in notifications because one gets added every time a new notification stacks on top of an existing one. (cherry picked from commit 663182008a4bd7d18e81d852b90ac477424da765)
-rw-r--r--src/applet.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/applet.c b/src/applet.c
index 18612076..ceab62ea 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -910,6 +910,7 @@ applet_do_notify (NMApplet *applet,
notify_notification_set_timeout (notify, NOTIFY_EXPIRES_DEFAULT);
if (applet_notify_server_has_actions () && action1) {
+ notify_notification_clear_actions (notify);
notify_notification_add_action (notify, action1, action1_label,
action1_cb, action1_user_data, NULL);
}