Mercurial > ~mikael > mcabber > hg
diff mcabber/src/roster.c @ 1444:3bf11085c6a5
New external "UNREAD" event (suggested by Viacheslav Chumushuk)
Thanks to Viacheslav for the suggestion and sample patch.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 02 Mar 2008 11:14:42 +0100 |
parents | c5d937d5530b |
children | ef09de538e8f |
line wrap: on
line diff
--- a/mcabber/src/roster.c Fri Feb 29 14:55:55 2008 +0100 +++ b/mcabber/src/roster.c Sun Mar 02 11:14:42 2008 +0100 @@ -23,6 +23,7 @@ #include "roster.h" #include "utils.h" +#include "hooks.h" extern void hlog_save_state(void); @@ -666,8 +667,12 @@ if (buddylist && (new_roster_item || !g_list_find(buddylist, roster_usr))) buddylist_build(); - if (unread_list_modified) + if (unread_list_modified) { hlog_save_state(); + guint unread_count = g_slist_length(unread_list); + /* Call external command */ + hk_ext_cmd("", 'U', (guchar)MIN(255, unread_count), NULL); + } } const char *roster_getname(const char *jid)