diff plugins/ticker/ticker.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 a614423c648f
children 5fb47ec9bfe4
line wrap: on
line diff
--- a/plugins/ticker/ticker.c	Sun Jan 19 22:03:57 2003 +0000
+++ b/plugins/ticker/ticker.c	Sun Jan 19 22:16:52 2003 +0000
@@ -332,37 +332,33 @@
 {
 	GdkPixmap *pm;
 	GdkBitmap *bm;
-	struct gaim_connection *gc;
 	struct group *g;
 	struct buddy *b;
-	GSList *gcons, *grps, *buds;
+	GSList *grps, *buds;
 	char **xpm;
-	
-	for( gcons = connections; gcons; gcons = gcons->next ) {
-		gc = (struct gaim_connection *)gcons->data;
-		for( grps = gc->groups; grps; grps = grps->next ) {
-			g = (struct group *)grps->data;
-			for( buds = g->members; buds; buds = buds->next ) {
-				b = (struct buddy *)buds->data;
-				if( b->present ) {
-					xpm = NULL;
-					if (gc->prpl->list_icon)
-						xpm = gc->prpl->list_icon(b->uc);
-					if (xpm == NULL)
-						xpm = (char **)no_icon_xpm;
-					pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, xpm);
-					BuddyTickerAddUser( b->name, get_buddy_alias(b), pm, bm );
-					gdk_pixmap_unref(pm);
-					if (bm)
-						gdk_bitmap_unref(bm);
-				}
+
+	for( grps = groups; grps; grps = grps->next ) {
+		g = (struct group *)grps->data;
+		for( buds = g->members; buds; buds = buds->next ) {
+			b = (struct buddy *)buds->data;
+			if( b->present ) {
+				xpm = NULL;
+				if (b->user->gc->prpl->list_icon)
+					xpm = b->user->gc->prpl->list_icon(b->uc);
+				if (xpm == NULL)
+					xpm = (char **)no_icon_xpm;
+				pm = gdk_pixmap_create_from_xpm_d(blist->window, &bm, NULL, xpm);
+				BuddyTickerAddUser( b->name, get_buddy_alias(b), pm, bm );
+				gdk_pixmap_unref(pm);
+				if (bm)
+					gdk_bitmap_unref(bm);
 			}
 		}
 	}
 }
 
 void signon_cb(struct gaim_connection *gc, char *who) {
-	struct buddy *b  = find_buddy(gc, who);
+	struct buddy *b  = find_buddy(gc->user, who);
 	char **xpm = NULL;
 	
 	GdkPixmap *pm;
@@ -393,7 +389,7 @@
 }
 
 void away_cb(struct gaim_connection *gc, char *who) {
-	struct buddy *b  = find_buddy(gc, who);
+	struct buddy *b  = find_buddy(gc->user, who);
 	char **xpm = NULL;
 	
 	GdkPixmap *pm;