changeset 1711:9b86520e04ac

[gaim-migrate @ 1721] whoops committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 13 Apr 2001 17:35:34 +0000
parents f42ce672c560
children 560b3117aedf
files src/buddy.c src/prefs.c
diffstat 2 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy.c	Fri Apr 13 10:50:33 2001 +0000
+++ b/src/buddy.c	Fri Apr 13 17:35:34 2001 +0000
@@ -191,6 +191,27 @@
 	}
 }
 
+void toggle_buddy_pixmaps() {
+	GSList *s = shows;
+	struct group_show *g;
+	GSList *m;
+	struct buddy_show *b;
+
+	while (s) {
+		g = s->data;
+		m = g->members;
+		while (m) {
+			b = m->data;
+			if (display_options & OPT_DISP_SHOW_PIXMAPS)
+				gtk_widget_show(b->pix);
+			else
+				gtk_widget_hide(b->pix);
+			m = m->next;
+		}
+		s = s->next;
+	}
+}
+
 static void update_num_group(struct group_show *gs) {
 	GSList *c = connections;
 	struct gaim_connection *gc;
@@ -1740,6 +1761,8 @@
 	b->pix = gtk_pixmap_new(pm, bm);
 	gtk_box_pack_start(GTK_BOX(box), b->pix, FALSE, FALSE, 1);
 	gtk_widget_show(b->pix);
+	if (!(display_options & OPT_DISP_SHOW_PIXMAPS))
+		gtk_widget_hide(b->pix);
 	gdk_pixmap_unref(pm);
 	gdk_bitmap_unref(bm);
 
@@ -1825,6 +1848,8 @@
 		gtk_widget_hide(b->pix);
 		gtk_pixmap_set(GTK_PIXMAP(b->pix), pm, bm);
 		gtk_widget_show(b->pix);
+		if (!(display_options & OPT_DISP_SHOW_PIXMAPS))
+			gtk_widget_hide(b->pix);
 		if (ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER)
 			BuddyTickerSetPixmap(b->name, pm, bm);
 		gdk_pixmap_unref(pm);
@@ -2034,6 +2059,8 @@
 			gtk_widget_hide(bs->pix);
 			gtk_pixmap_set(GTK_PIXMAP(bs->pix), pm, bm);
 			gtk_widget_show(bs->pix);
+			if (!(display_options & OPT_DISP_SHOW_PIXMAPS))
+				gtk_widget_hide(bs->pix);
 			if (ticker_prefs & OPT_DISP_SHOW_BUDDYTICKER)
 				BuddyTickerSetPixmap(b->name, pm, bm);
 			gdk_pixmap_unref(pm);
--- a/src/prefs.c	Fri Apr 13 10:50:33 2001 +0000
+++ b/src/prefs.c	Fri Apr 13 17:35:34 2001 +0000
@@ -2122,6 +2122,9 @@
 	if ((int)option == OPT_DISP_ONE_CHAT_WINDOW)
 		chat_tabize();
 
+	if ((int)option == OPT_DISP_SHOW_PIXMAPS)
+		toggle_buddy_pixmaps();
+
 #ifdef USE_APPLET
 	update_pixmaps();
 #endif