From de20697a690ed917a4004438f665a7a709db898b Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Sun, 12 Feb 2017 20:19:29 +0200 Subject: [PATCH] Rename hide_duplicates_count -> hide_duplicate_count --- dunstrc | 4 ++-- src/notification.c | 4 ++-- src/settings.c | 6 +++--- src/settings.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dunstrc b/dunstrc index ded3283..47fc3e6 100644 --- a/dunstrc +++ b/dunstrc @@ -117,8 +117,8 @@ # Merge multiple notifications with the same content stack_duplicates = true - # Hide count of the merged notifications with the same content - hide_duplicates_count = false + # Hide the count of merged notifications with the same content + hide_duplicate_count = false # Should a notification popped up from history be sticky or timeout # as if it would normally do. diff --git a/src/notification.c b/src/notification.c index 8aad813..3df433a 100644 --- a/src/notification.c +++ b/src/notification.c @@ -597,7 +597,7 @@ void notification_update_text_to_render(notification *n) char *msg = g_strchomp(n->msg); /* print dup_count and msg */ - if ((n->dup_count > 0 && !settings.hide_duplicates_count) + if ((n->dup_count > 0 && !settings.hide_duplicate_count) && (n->actions || n->urls) && settings.show_indicators) { buf = g_strdup_printf("(%d%s%s) %s", n->dup_count, @@ -607,7 +607,7 @@ void notification_update_text_to_render(notification *n) buf = g_strdup_printf("(%s%s) %s", n->actions ? "A" : "", n->urls ? "U" : "", msg); - } else if (n->dup_count > 0 && !settings.hide_duplicates_count) { + } else if (n->dup_count > 0 && !settings.hide_duplicate_count) { buf = g_strdup_printf("(%d) %s", n->dup_count, msg); } else { buf = g_strdup(msg); diff --git a/src/settings.c b/src/settings.c index 446a145..c8175e9 100644 --- a/src/settings.c +++ b/src/settings.c @@ -249,10 +249,10 @@ void load_settings(char *cmdline_config_path) "When should the age of the notification be displayed?" ); - settings.hide_duplicates_count = option_get_bool( + settings.hide_duplicate_count = option_get_bool( "global", - "hide_duplicates_count", "-hide_duplicates_count", false, - "Hide count of the merged notifications with the same content" + "hide_duplicate_count", "-hide_duplicate_count", false, + "Hide the count of merged notifications with the same content" ); settings.sticky_history = option_get_bool( diff --git a/src/settings.h b/src/settings.h index 8e5d14e..eb386fd 100644 --- a/src/settings.h +++ b/src/settings.h @@ -12,7 +12,7 @@ typedef struct _settings { bool print_notifications; enum markup_mode markup; bool stack_duplicates; - bool hide_duplicates_count; + bool hide_duplicate_count; char *font; char *normbgcolor; char *normfgcolor;