From 700170f70c60fc316f0f310629e42773c818ff84 Mon Sep 17 00:00:00 2001 From: Jason Conti Date: Mon, 29 Aug 2016 13:21:07 -0400 Subject: * When updating the notification count on the clear item, deactivate the menu shell if that count is zero. This avoids leaving a single clear menuitem on screen after all the notifications have been dismissed. * Bump version. --- configure.ac | 2 +- src/indicator-notifications.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3b66d24..4e9aab0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([indicator-notifications], [0.3.0], [jason.conti@gmail.com]) +AC_INIT([indicator-notifications], [0.3.1], [jason.conti@gmail.com]) AM_INIT_AUTOMAKE([-Wall -Werror]) diff --git a/src/indicator-notifications.c b/src/indicator-notifications.c index 5cf9497..0ca4a6a 100644 --- a/src/indicator-notifications.c +++ b/src/indicator-notifications.c @@ -463,6 +463,10 @@ update_clear_item_markup(IndicatorNotifications *self) gtk_label_set_markup(GTK_LABEL(self->priv->clear_item_label), markup); g_free(markup); + + if (total_length == 0) { + gtk_menu_shell_deactivate(GTK_MENU_SHELL(self->priv->menu)); + } } /** -- cgit v1.2.3