[Xfce4-commits] [apps/xfce4-notifyd] 01/01: panel-plugin: Finally fix placeholder showing and hiding
noreply at xfce.org
noreply at xfce.org
Wed Feb 7 01:07:28 CET 2018
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-notifyd.
commit 23b58848f669adac9c77e928bf7424f967c9e8a7
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Feb 7 01:06:43 2018 +0100
panel-plugin: Finally fix placeholder showing and hiding
---
panel-plugin/notification-plugin-log.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/panel-plugin/notification-plugin-log.c b/panel-plugin/notification-plugin-log.c
index 173c8f6..159af49 100644
--- a/panel-plugin/notification-plugin-log.c
+++ b/panel-plugin/notification-plugin-log.c
@@ -146,6 +146,7 @@ notification_plugin_menu_populate (NotificationPlugin *notification_plugin)
int log_length;
int log_display_limit;
int numberof_groups;
+ int numberof_notifications_shown = 0;
gboolean log_only_today;
groups = g_key_file_get_groups (notify_log, &num_groups);
@@ -184,11 +185,14 @@ notification_plugin_menu_populate (NotificationPlugin *notification_plugin)
GDateTime *log_timestamp;
/* optionally only show notifications from today */
- if (log_only_today == TRUE)
+ if (log_only_today == TRUE) {
if (g_ascii_strncasecmp (timestamp, group, 10) != 0) {
no_notifications = TRUE;
continue;
}
+ else
+ numberof_notifications_shown++;
+ }
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
mi = gtk_image_menu_item_new ();
G_GNUC_END_IGNORE_DEPRECATIONS
@@ -280,6 +284,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS
}
g_strfreev (groups);
g_key_file_free (notify_log);
+ if (numberof_notifications_shown > 0)
+ no_notifications = FALSE;
}
/* Show a placeholder label when there are no notifications */
if (!notify_log ||
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list