# HG changeset patch # User mikael # Date 1115582344 0 # Node ID 465d98d2f8e3c30faaf46a2740b34931b723b681 # Parent 0627546a21fe1a90950848a0ec14be1d5c2987e8 [/trunk] Changeset 224 by mikael * Fix a small annoyance in the /move command (when moving to a folded group) * commands.c: add a comment diff -r 0627546a21fe -r 465d98d2f8e3 mcabber/src/TODO --- a/mcabber/src/TODO Sun May 08 11:24:01 2005 +0000 +++ b/mcabber/src/TODO Sun May 08 19:59:04 2005 +0000 @@ -18,6 +18,7 @@ * Buddy buffer in full width (handy for cut'n paste!) * Create .mcabber and .mcabber/histo dirs if needed. * Everything isn't freed in roster_free() +* Add completion for group names * Commands! :-) - /roster diff -r 0627546a21fe -r 465d98d2f8e3 mcabber/src/commands.c --- a/mcabber/src/commands.c Sun May 08 11:24:01 2005 +0000 +++ b/mcabber/src/commands.c Sun May 08 19:59:04 2005 +0000 @@ -321,6 +321,9 @@ if (!current_buddy) return; group = buddy_getgroup(BUDDATA(current_buddy)); + // We'll have to redraw the chat window if we're not currently on the group + // entry itself, because it means we'll have to leave the current buddy + // chat window. leave_windowbuddy = (group != BUDDATA(current_buddy)); if (!(buddy_gettype(group) & ROSTER_TYPE_GROUP)) { diff -r 0627546a21fe -r 465d98d2f8e3 mcabber/src/roster.c --- a/mcabber/src/roster.c Sun May 08 11:24:01 2005 +0000 +++ b/mcabber/src/roster.c Sun May 08 19:59:04 2005 +0000 @@ -508,8 +508,15 @@ if (roster_usr->name) g_free((gchar*)roster_usr->name); g_free(roster_usr); + // If new new group is folded, the curren_buddy will be lost, and the + // chat window won't be correctly refreshed. So we make sure it isn't... + ((roster*)((GSList*)roster_clone->list)->data)->flags &= ~ROSTER_FLAG_HIDE; + + // Little trick to have current_body pointing to the cloned buddy + buddylist = g_list_append(buddylist, roster_clone); + current_buddy = g_list_find(buddylist, roster_clone); + buddylist_build(); - current_buddy = g_list_find(buddylist, roster_clone); } void buddy_setname(gpointer rosterdata, char *newname)