# HG changeset patch # User Mikael Berthe # Date 1121635311 -3600 # Node ID 1510dda4ad711824d9435d7b13e3b5fb72efa9e6 # Parent a9013124ede630cb6448d5187da67d0b0a88def9 Don't loose alternate_buddy when the buddy is moved ("/move") diff -r a9013124ede6 -r 1510dda4ad71 mcabber/src/roster.c --- a/mcabber/src/roster.c Sun Jul 17 21:17:52 2005 +0100 +++ b/mcabber/src/roster.c Sun Jul 17 22:21:51 2005 +0100 @@ -531,6 +531,7 @@ GSList **sl_group; GSList *sl_clone; roster *roster_clone; + int is_alternate; // A group has no group :) if (roster_usr->type & ROSTER_TYPE_GROUP) return; @@ -557,8 +558,11 @@ ((roster*)((GSList*)roster_clone->list)->data)->flags &= ~ROSTER_FLAG_HIDE; // Little trick to have current_body pointing to the cloned buddy + is_alternate = (alternate_buddy == current_buddy); buddylist = g_list_append(buddylist, roster_clone); current_buddy = g_list_find(buddylist, roster_clone); + if (is_alternate) + alternate_buddy = current_buddy; buddylist_build(); }