From bf934569374d2f15567e955c058c271d1072df7b Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 23 Jul 2014 16:09:00 -0500 Subject: make the notifications click-to-dismiss by adding the 'interactive notification' hint --- src/notifier.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/notifier.c b/src/notifier.c index 364628c..8c12dfc 100644 --- a/src/notifier.c +++ b/src/notifier.c @@ -26,6 +26,8 @@ #include #include +#define HINT_INTERACTIVE "x-canonical-switch-to-application" + G_DEFINE_TYPE(IndicatorPowerNotifier, indicator_power_notifier, G_TYPE_OBJECT) @@ -114,6 +116,9 @@ notification_show(IndicatorPowerNotifier * self) body = g_strdup_printf(_("%.0f%% charge remaining"), indicator_power_device_get_percentage(p->battery)); p->notify_notification = notify_notification_new(_("Battery Low"), body, NULL); + notify_notification_set_hint(p->notify_notification, + HINT_INTERACTIVE, + g_variant_new_boolean(TRUE)); g_signal_connect_swapped(p->notify_notification, "closed", G_CALLBACK(notification_clear), self); -- cgit v1.2.3