From 3e060f4b38af60b843984ed67dd898b87fe6350b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 4 Sep 2009 22:32:49 -0500 Subject: Removing the count on the label boolean as we're detecting that differently now. --- src/app-menu-item.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/app-menu-item.c b/src/app-menu-item.c index 5107540..5df4e97 100644 --- a/src/app-menu-item.c +++ b/src/app-menu-item.c @@ -48,7 +48,6 @@ struct _AppMenuItemPrivate GAppInfo * appinfo; gchar * desktop; guint unreadcount; - gboolean count_on_label; }; #define APP_MENU_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), APP_MENU_ITEM_TYPE, AppMenuItemPrivate)) @@ -107,8 +106,6 @@ app_menu_item_init (AppMenuItem *self) priv->appinfo = NULL; priv->desktop = NULL; priv->unreadcount = 0; - priv->count_on_label = FALSE; - return; } @@ -189,16 +186,9 @@ type_cb (IndicateListener * listener, IndicateListenerServer * server, gchar * v priv->type = g_strdup(value); - if (!(!g_strcmp0(priv->type, "message.instant") || !g_strcmp0(priv->type, "message.micro") || !g_strcmp0(priv->type, "message.im"))) { - /* For IM and Microblogging we want the individual items, not a count */ - priv->count_on_label = TRUE; - update_label(self); - - indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_INDICATOR_COUNT); - } else { - indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_INDICATOR_DISPLAY); - indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_INDICATOR_SIGNAL); - } + indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_INDICATOR_COUNT); + indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_INDICATOR_DISPLAY); + indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_INDICATOR_SIGNAL); return; } @@ -208,7 +198,7 @@ update_label (AppMenuItem * self) { AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(self); - if (priv->count_on_label && !priv->unreadcount < 1) { + if (priv->unreadcount > 0) { /* TRANSLATORS: This is the name of the program and the number of indicators. So it would read something like "Mail Client (5)" */ gchar * label = g_strdup_printf(_("%s (%d)"), app_menu_item_get_name(self), priv->unreadcount); -- cgit v1.2.3