aboutsummaryrefslogtreecommitdiff
path: root/src/usb-snap.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-04-27 10:22:00 +0200
committerCharles Kerr <charles.kerr@canonical.com>2016-04-27 10:22:00 +0200
commita277302b1c1c2568c456abcb3432eb8f8ead0925 (patch)
tree5e70462802373fdd78fd34f58b378e92c6131e00 /src/usb-snap.cpp
parent2e88906dc5ced1c5f601cef2514d8e559246e0d5 (diff)
downloadayatana-indicator-display-a277302b1c1c2568c456abcb3432eb8f8ead0925.tar.gz
ayatana-indicator-display-a277302b1c1c2568c456abcb3432eb8f8ead0925.tar.bz2
ayatana-indicator-display-a277302b1c1c2568c456abcb3432eb8f8ead0925.zip
choosing an action in the snap decision closes the notification, so when that happens clear our notification_id s.t. our dtor doesn't try to remove a notification that no longer exists
Diffstat (limited to 'src/usb-snap.cpp')
-rw-r--r--src/usb-snap.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usb-snap.cpp b/src/usb-snap.cpp
index 2b5424d..629898b 100644
--- a/src/usb-snap.cpp
+++ b/src/usb-snap.cpp
@@ -212,6 +212,8 @@ g_message("%s got signal %s with parameters %s", G_STRLOC, signal_name, g_varian
const bool remember_this_choice = response == AdbdClient::PKResponse::ALLOW;
m_on_user_response(response, remember_this_choice);
+g_message("%s clearing m_notification_id", G_STRLOC);
+ m_notification_id = 0;
}
void on_notification_closed(uint32_t close_reason)
@@ -220,7 +222,7 @@ g_message("%s closed with reason %d", G_STRLOC, int(close_reason));
if (close_reason == DBusNames::Notify::NotificationClosed::Reason::EXPIRED)
m_on_user_response(AdbdClient::PKResponse::DENY, false);
-g_message("%s setting m_notification_id to 0", G_STRLOC);
+g_message("%s clearing m_notification_id", G_STRLOC);
m_notification_id = 0;
}