[/trunk] Changeset 224 by mikael
* Fix a small annoyance in the /move command (when moving to a folded group)
* commands.c: add a comment
--- 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 <hide_offline|show_offline|top|bottom>
--- 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)) {
--- 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)