diff src/buddy_chat.c @ 4349:0c68d402f59f

[gaim-migrate @ 4614] XML Blist Gaim stores all the buddy lists in one big happy file now. You can order the buddies however you want, and they'll stay ordered that way. We can also store some per-buddy information now, which will be cool. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 19 Jan 2003 22:16:52 +0000
parents 12d3ca8f5b5f
children 5fb47ec9bfe4
line wrap: on
line diff
--- a/src/buddy_chat.c	Sun Jan 19 22:03:57 2003 +0000
+++ b/src/buddy_chat.c	Sun Jan 19 22:16:52 2003 +0000
@@ -354,7 +354,7 @@
 	tmp = g_list_append(tmp, "");
 
 	if (gc) {
-		grp = gc->groups;
+		grp = groups;
 
 		while (grp) {
 			g = (struct group *)grp->data;
@@ -364,7 +364,7 @@
 			while (bl) {
 				buddy = (struct buddy *)bl->data;
 
-				if (buddy->present)
+				if (buddy->user->gc == gc && buddy->present)
 					tmp = g_list_append(tmp, buddy->name);
 
 				bl = g_slist_next(bl);
@@ -806,7 +806,7 @@
 static void chat_press_add(GtkObject *obj, struct conversation *c)
 {
 	char *name = gtk_object_get_user_data(obj);
-	struct buddy *b = find_buddy(c->gc, name);
+	struct buddy *b = find_buddy(c->gc->user, name);
 
 	if (b) {
 		show_confirm_del(c->gc, name);
@@ -896,7 +896,7 @@
 
 		/* Added by Jonas <jonas@birme.se> */
 		if (b->gc) {
-			if (find_buddy(b->gc, who))
+			if (find_buddy(b->gc->user, who))
 				button = gtk_menu_item_new_with_label(_("Remove"));
 			else
 				button = gtk_menu_item_new_with_label(_("Add"));
@@ -1582,7 +1582,7 @@
 		gtk_box_pack_end(GTK_BOX(parent), c->sep2, FALSE, TRUE, 0);
 		gtk_widget_show(c->sep2);
 
-		if (find_buddy(c->gc, c->name) == NULL)
+		if (find_buddy(c->gc->user, c->name) == NULL)
 			c->add = change_text(c->window, _("Add"), c->add, "gtk-add", opt);
 		else
 			c->add = change_text(c->window, _("Remove"), c->add, "gtk-remove", opt);