diff pidgin/gtkrequest.c @ 29814:2d04fb25c6db

Revert the unnecessary addition of the pixbuf boolean to PurpleRequestField.list
author Richard Laager <rlaager@wiktel.com>
date Sun, 16 Nov 2008 08:16:17 +0000
parents 365b90fa23cf
children 245f3432a5ab
line wrap: on
line diff
--- a/pidgin/gtkrequest.c	Sun Nov 16 08:11:33 2008 +0000
+++ b/pidgin/gtkrequest.c	Sun Nov 16 08:16:17 2008 +0000
@@ -995,9 +995,11 @@
 	GtkTreeSelection *sel;
 	GtkTreeViewColumn *column;
 	GtkTreeIter iter;
-	GList *l, *ic = NULL;
+	GList *l;
+	GList *icons = NULL;
 	GdkPixbuf* pixbuf;
-	gboolean icon = purple_request_field_list_get_pixbuf(field);
+
+	icons = purple_request_field_list_get_icons(field);
 
 	/* Create the scrolled window */
 	sw = gtk_scrolled_window_new(NULL, NULL);
@@ -1009,7 +1011,7 @@
 	gtk_widget_show(sw);
 
 	/* Create the list store */
-	if (icon)
+	if (icons)
 		store = gtk_list_store_new(3, G_TYPE_POINTER, G_TYPE_STRING, GDK_TYPE_PIXBUF);
 	else
 		store = gtk_list_store_new(2, G_TYPE_POINTER, G_TYPE_STRING);
@@ -1031,7 +1033,7 @@
 	gtk_tree_view_column_pack_start(column, renderer, TRUE);
 	gtk_tree_view_column_add_attribute(column, renderer, "text", 1);
 
-	if(icon == TRUE)
+	if (icons)
 	{
 		renderer = gtk_cell_renderer_pixbuf_new();
 		gtk_tree_view_column_pack_start(column, renderer, TRUE);
@@ -1040,18 +1042,15 @@
 		gtk_widget_set_size_request(treeview, 200, 400);
 	}
 
-	if(icon == TRUE)
-		ic = purple_request_field_list_get_icons(field);
-
 	for (l = purple_request_field_list_get_items(field); l != NULL; l = l->next)
 	{
 		const char *text = (const char *)l->data;
 
 		gtk_list_store_append(store, &iter);
 
-		if(icon == TRUE)
+		if (icons)
 		{
-			const char *icon_path = (const char *)ic->data;
+			const char *icon_path = (const char *)icons->data;
 			char* filename = g_build_filename(DATADIR, icon_path, NULL);
 
 			pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
@@ -1063,7 +1062,7 @@
 						   1, text,
 						   2, pixbuf,
 						   -1);
-			ic = ic->next;
+			icons = icons->next;
 		}
 		else
 			gtk_list_store_set(store, &iter,