about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/ui/rosterwin.c18
-rw-r--r--themes/boothj52
-rw-r--r--themes/complex2
-rw-r--r--themes/simple2
4 files changed, 15 insertions, 9 deletions
diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c
index cdd0e63e..073fdd74 100644
--- a/src/ui/rosterwin.c
+++ b/src/ui/rosterwin.c
@@ -374,7 +374,7 @@ _rosterwin_contacts_by_presence(ProfLayoutSplit *layout, const char *const prese
             int itemcount = g_slist_length(contacts);
             if (itemcount == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) {
                 g_string_append_printf(title_str, " (%d)", itemcount);
-            } else {
+            } else if (itemcount > 0) {
                 g_string_append_printf(title_str, " (%d)", itemcount);
             }
         } else if (g_strcmp0(countpref, "unread") == 0) {
@@ -391,7 +391,7 @@ _rosterwin_contacts_by_presence(ProfLayoutSplit *layout, const char *const prese
             }
             if (unreadcount == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) {
                 g_string_append_printf(title_str, " (%d)", unreadcount);
-            } else {
+            } else if (unreadcount > 0) {
                 g_string_append_printf(title_str, " (%d)", unreadcount);
             }
         }
@@ -445,7 +445,7 @@ _rosterwin_contacts_by_group(ProfLayoutSplit *layout, char *group, gboolean newl
             int itemcount = g_slist_length(contacts);
             if (itemcount == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) {
                 g_string_append_printf(title, " (%d)", itemcount);
-            } else {
+            } else if (itemcount > 0) {
                 g_string_append_printf(title, " (%d)", itemcount);
             }
         } else if (g_strcmp0(countpref, "unread") == 0) {
@@ -462,7 +462,7 @@ _rosterwin_contacts_by_group(ProfLayoutSplit *layout, char *group, gboolean newl
             }
             if (unreadcount == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) {
                 g_string_append_printf(title, " (%d)", unreadcount);
-            } else {
+            } else if (unreadcount > 0) {
                 g_string_append_printf(title, " (%d)", unreadcount);
             }
         }
@@ -514,7 +514,7 @@ _rosterwin_contacts_by_no_group(ProfLayoutSplit *layout, gboolean newline)
             int itemcount = g_slist_length(contacts);
             if (itemcount == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) {
                 g_string_append_printf(title, " (%d)", itemcount);
-            } else {
+            } else if (itemcount > 0) {
                 g_string_append_printf(title, " (%d)", itemcount);
             }
         } else if (g_strcmp0(countpref, "unread") == 0) {
@@ -531,7 +531,7 @@ _rosterwin_contacts_by_no_group(ProfLayoutSplit *layout, gboolean newline)
             }
             if (unreadcount == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) {
                 g_string_append_printf(title, " (%d)", unreadcount);
-            } else {
+            } else if (unreadcount > 0) {
                 g_string_append_printf(title, " (%d)", unreadcount);
             }
         }
@@ -811,13 +811,13 @@ _rosterwin_rooms(ProfLayoutSplit *layout, gboolean newline)
             int count = g_list_length(rooms_sorted);
             if (count == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) {
                 g_string_append_printf(title_str, " (%d)", count);
-            } else {
+            } else if (count > 0) {
                 g_string_append_printf(title_str, " (%d)", count);
             }
         } else if (g_strcmp0(countpref, "unread") == 0) {
             if (unread == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) {
                 g_string_append_printf(title_str, " (%d)", unread);
-            } else {
+            } else if (unread > 0) {
                 g_string_append_printf(title_str, " (%d)", unread);
             }
         }
@@ -935,7 +935,7 @@ rosterwin_roster(void)
                 }
                 if (unreadcount == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) {
                     g_string_append_printf(title, " (%d)", unreadcount);
-                } else {
+                } else if (unreadcount > 0) {
                     g_string_append_printf(title, " (%d)", unreadcount);
                 }
             }
diff --git a/themes/boothj5 b/themes/boothj5
index d4c0bd9e..ce3ceb8e 100644
--- a/themes/boothj5
+++ b/themes/boothj5
@@ -120,6 +120,8 @@ roster.rooms.unread=after
 roster.rooms.pos=last
 roster.private=room
 roster.private.char=/
+roster.count=unread
+roster.count.zero=false
 occupants=true
 occupants.size=15
 occupants.jid=false
diff --git a/themes/complex b/themes/complex
index 2f42bc9e..db98ee8d 100644
--- a/themes/complex
+++ b/themes/complex
@@ -46,6 +46,8 @@ roster.rooms.pos=last
 roster.rooms.char=#
 roster.private=room
 roster.private.char=/
+roster.count=unread
+roster.count.zero=true
 privileges=true
 presence=true
 intype=true
diff --git a/themes/simple b/themes/simple
index 79914b5e..a0af179d 100644
--- a/themes/simple
+++ b/themes/simple
@@ -34,6 +34,8 @@ roster.status=false
 roster.contacts=true
 roster.rooms=false
 roster.rooms.unread=off
+roster.count=off
+roster.count.zero=false
 privileges=false
 presence=false
 intype=false