comparison 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
comparison
equal deleted inserted replaced
211:0627546a21fe 212:465d98d2f8e3
506 // Free old buddy 506 // Free old buddy
507 if (roster_usr->jid) g_free((gchar*)roster_usr->jid); 507 if (roster_usr->jid) g_free((gchar*)roster_usr->jid);
508 if (roster_usr->name) g_free((gchar*)roster_usr->name); 508 if (roster_usr->name) g_free((gchar*)roster_usr->name);
509 g_free(roster_usr); 509 g_free(roster_usr);
510 510
511 // If new new group is folded, the curren_buddy will be lost, and the
512 // chat window won't be correctly refreshed. So we make sure it isn't...
513 ((roster*)((GSList*)roster_clone->list)->data)->flags &= ~ROSTER_FLAG_HIDE;
514
515 // Little trick to have current_body pointing to the cloned buddy
516 buddylist = g_list_append(buddylist, roster_clone);
517 current_buddy = g_list_find(buddylist, roster_clone);
518
511 buddylist_build(); 519 buddylist_build();
512 current_buddy = g_list_find(buddylist, roster_clone);
513 } 520 }
514 521
515 void buddy_setname(gpointer rosterdata, char *newname) 522 void buddy_setname(gpointer rosterdata, char *newname)
516 { 523 {
517 roster *roster_usr = rosterdata; 524 roster *roster_usr = rosterdata;