Mercurial > ~mikael > mcabber > hg
diff mcabber/mcabber/roster.c @ 1812:5dbb3ebbc466
Add hk_unread_list_change()
(Suggested by isbear)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 22 Mar 2010 21:47:22 +0100 |
parents | e6d355e50d7a |
children | f0a07658e009 |
line wrap: on
line diff
--- a/mcabber/mcabber/roster.c Mon Mar 22 21:32:11 2010 +0100 +++ b/mcabber/mcabber/roster.c Mon Mar 22 21:47:22 2010 +0100 @@ -617,24 +617,8 @@ } while (unread_ptr && unread_ptr != first_unread); } - { - gchar *str_unread = g_strdup_printf("%u", unread_count); - gchar *str_attention = g_strdup_printf("%u", attention_count); - gchar *str_muc_unread = g_strdup_printf("%u", muc_unread); - gchar *str_muc_attention = g_strdup_printf("%u", muc_attention); - hk_arg_t args[] = { - { "unread", str_unread }, // All unread - { "attention", str_attention }, // Attention (private) - { "muc_unread", str_muc_unread }, // MUC unread - { "muc_attention", str_muc_attention }, // MUC attention (highlight) - { NULL, NULL }, - }; - hk_run_handlers(HOOK_UNREAD_LIST_CHANGE, args); - g_free(str_unread); - g_free(str_attention); - g_free(str_muc_unread); - g_free(str_muc_attention); - } + hk_unread_list_change(unread_count, attention_count, + muc_unread, muc_attention); #endif return unread_count; }