diff mcabber/src/roster.c @ 212:465d98d2f8e3

[/trunk] Changeset 224 by mikael * Fix a small annoyance in the /move command (when moving to a folded group) * commands.c: add a comment
author mikael
date Sun, 08 May 2005 19:59:04 +0000
parents f64818ba3503
children 9484ba81ec53
line wrap: on
line diff
--- 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)