cpw.rekkanoryo.icqxstatus: 24f04cd0: Revert the unnecessary addition of the p...

rlaager at pidgin.im rlaager at pidgin.im
Sun Nov 16 14:20:42 EST 2008


-----------------------------------------------------------------
Revision: 24f04cd02f085fc17de3eb23a60692d28143ec09
Ancestor: 0af228cae6a8bc4ae19914b10e8e1812ae65f780
Author: rlaager at pidgin.im
Date: 2008-11-16T08:16:17
Branch: im.pidgin.cpw.rekkanoryo.icqxstatus
URL: http://d.pidgin.im/viewmtn/revision/info/24f04cd02f085fc17de3eb23a60692d28143ec09

Modified files:
        libpurple/protocols/oscar/oscar.c libpurple/request.c
        libpurple/request.h pidgin/gtkrequest.c

ChangeLog: 

Revert the unnecessary addition of the pixbuf boolean to PurpleRequestField.list

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c	c490e93f7c9a58588c3fffa5036bbcfd1b67ec8b
+++ libpurple/protocols/oscar/oscar.c	c06cdc0eeef800597ff6dfc016c2eb9dbb2d8917
@@ -6784,8 +6784,6 @@ oscar_show_icq_custom_icons(PurplePlugin
 	
 	f = purple_request_field_list_new("customicon", _("XStatus"));
 
-	purple_request_field_list_set_pixbuf(f, TRUE);
-
 	na_fn = g_build_filename("pixmaps", "pidgin", "emblems", "16", "not-authorized.png", NULL);
 
 	purple_request_field_list_add_icon(f, _("None"), na_fn, GINT_TO_POINTER(-1));
============================================================
--- libpurple/request.c	34e899aaec6dc8c20090afc86fcdbd68237c4090
+++ libpurple/request.c	0de4709239063a21296f96ff945b8ddf2233149b
@@ -790,25 +790,6 @@ void
 }
 
 void
-purple_request_field_list_set_pixbuf(PurpleRequestField *field,
-										 gboolean pixbuf)
-{
-	g_return_if_fail(field != NULL);
-	g_return_if_fail(field->type == PURPLE_REQUEST_FIELD_LIST);
-
-	field->u.list.pixbuf = pixbuf;
-}
-
-gboolean
-purple_request_field_list_get_pixbuf(const PurpleRequestField *field)
-{
-	g_return_val_if_fail(field != NULL, FALSE);
-	g_return_val_if_fail(field->type == PURPLE_REQUEST_FIELD_LIST, FALSE);
-
-	return field->u.list.pixbuf;
-}
-
-void
 purple_request_field_list_set_multi_select(PurpleRequestField *field,
 										 gboolean multi_select)
 {
@@ -975,7 +956,6 @@ purple_request_field_list_get_icons(cons
 {
 	g_return_val_if_fail(field != NULL, NULL);
 	g_return_val_if_fail(field->type == PURPLE_REQUEST_FIELD_LIST, NULL);
-	g_return_val_if_fail(field->u.list.pixbuf == TRUE, NULL);
 
 	return field->u.list.icons;
 }
============================================================
--- libpurple/request.h	a7e32128bc8e770fa57ccc1a254406b6e9fc8fa6
+++ libpurple/request.h	68aad8c881d4d2be4cec4ce2d52e71dea3bed89b
@@ -152,7 +152,6 @@ typedef struct
 			GHashTable *selected_table;
 
 			gboolean multiple_selection;
-			gboolean pixbuf;
 
 		} list;
 
@@ -879,26 +878,6 @@ PurpleRequestField *purple_request_field
 PurpleRequestField *purple_request_field_list_new(const char *id, const char *text);
 
 /**
- * Sets whether or not a list field allows icons.
- *
- * @param field        The list field.
- * @param multi_select TRUE if icons are enabled,
- *                     or FALSE otherwise.
- */
-void purple_request_field_list_set_pixbuf(PurpleRequestField *field,
-											  gboolean pixbuf);
-
-/**
- * Returns whether or not a list field allows icons.
- *
- * @param field The list field.
- *
- * @return TRUE if icons are enabled, or FALSE otherwise.
- */
-gboolean purple_request_field_list_get_pixbuf(
-	const PurpleRequestField *field);
-
-/**
  * Sets whether or not a list field allows multiple selection.
  *
  * @param field        The list field.
============================================================
--- pidgin/gtkrequest.c	74416ba6c32104cc1079d2dc1b03af0d5a5e2ce4
+++ pidgin/gtkrequest.c	afe91b559c3619ca39d5cc1c79307806e0a160e9
@@ -995,10 +995,12 @@ create_list_field(PurpleRequestField *fi
 	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);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
@@ -1009,7 +1011,7 @@ create_list_field(PurpleRequestField *fi
 	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 @@ create_list_field(PurpleRequestField *fi
 	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 @@ create_list_field(PurpleRequestField *fi
 		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 @@ create_list_field(PurpleRequestField *fi
 						   1, text,
 						   2, pixbuf,
 						   -1);
-			ic = ic->next;
+			icons = icons->next;
 		}
 		else
 			gtk_list_store_set(store, &iter,


More information about the Commits mailing list