Mercurial > hg
changeset 1010:54405d09b15a
Add a call to buddylist_build()
Sometimes buddylist_build() isn't called when a line is added to a hidden
buffer (for ex. when receiving an IQ:version). Dealing with this in
roster_msg_setflag() should fix it, and may save us a few useless calls...
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 12 Nov 2006 12:12:38 +0100 |
parents | c112423ac012 |
children | b5bcc223cf51 |
files | mcabber/src/hooks.c mcabber/src/jabglue.c mcabber/src/roster.c |
diffstat | 3 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/hooks.c Sun Nov 12 10:51:43 2006 +0100 +++ b/mcabber/src/hooks.c Sun Nov 12 12:12:38 2006 +0100 @@ -148,13 +148,12 @@ scr_Beep(); } - // We need to rebuild the list if the sender is unknown or + // We need to update the roster if the sender is unknown or // if the sender is offline/invisible and hide_offline_buddies is set if (new_guy || (buddy_getstatus(roster_usr->data, NULL) == offline && buddylist_get_hide_offline_buddies())) { - buddylist_build(); update_roster = TRUE; }
--- a/mcabber/src/jabglue.c Sun Nov 12 10:51:43 2006 +0100 +++ b/mcabber/src/jabglue.c Sun Nov 12 12:12:38 2006 +0100 @@ -1512,7 +1512,6 @@ g_free(mbuf); // Send back an unavailable packet jb_setstatus(offline, roomjid, ""); - buddylist_build(); scr_DrawRoster(); return; } @@ -1682,7 +1681,6 @@ } else scr_LogPrint(LPRINT_LOGNORM, "MUC DBG: no rname!"); /* DBG */ - buddylist_build(); scr_DrawRoster(); } @@ -2087,10 +2085,8 @@ newbuddy = FALSE; } - if (newbuddy) { - buddylist_build(); + if (newbuddy) update_roster = TRUE; - } g_free(r); }
--- a/mcabber/src/roster.c Sun Nov 12 10:51:43 2006 +0100 +++ b/mcabber/src/roster.c Sun Nov 12 12:12:38 2006 +0100 @@ -615,7 +615,7 @@ // ROSTER_FLAG_MSG should already be set... } - if (buddylist && new_roster_item) + if (buddylist && (new_roster_item || !g_list_find(buddylist, roster_usr))) buddylist_build(); }