pidgin/pidgin

Parents e199eaa8d89f
Children aa8fc0497d6d
Update PidginProtocolStore to use the icon-name rather than GdkPixbuf

Testing Done:
Opened the new account window and verified that the protocol icons were still working

Reviewed at https://reviews.imfreedom.org/r/1323/
--- a/pidgin/pidginprotocolstore.c Fri Mar 11 01:44:40 2022 -0600
+++ b/pidgin/pidginprotocolstore.c Fri Mar 11 02:22:36 2022 -0600
@@ -37,10 +37,9 @@
PurpleProtocol *protocol)
{
GtkTreeIter iter;
- GdkPixbuf *pixbuf = NULL;
+ const gchar *icon_name = NULL;
- pixbuf = pidgin_create_icon_from_protocol(protocol,
- PIDGIN_PROTOCOL_ICON_SMALL, NULL);
+ icon_name = purple_protocol_get_icon_name(protocol);
gtk_list_store_append(GTK_LIST_STORE(store), &iter);
gtk_list_store_set(
@@ -49,11 +48,9 @@
PIDGIN_PROTOCOL_STORE_COLUMN_PROTOCOL, protocol,
PIDGIN_PROTOCOL_STORE_COLUMN_ID, purple_protocol_get_id(protocol),
PIDGIN_PROTOCOL_STORE_COLUMN_NAME, purple_protocol_get_name(protocol),
- PIDGIN_PROTOCOL_STORE_COLUMN_ICON, pixbuf,
+ PIDGIN_PROTOCOL_STORE_COLUMN_ICON_NAME, icon_name,
-1
);
-
- g_clear_object(&pixbuf);
}
static void
@@ -139,7 +136,7 @@
PURPLE_TYPE_PROTOCOL,
G_TYPE_STRING,
G_TYPE_STRING,
- GDK_TYPE_PIXBUF,
+ G_TYPE_STRING,
};
gtk_list_store_set_column_types(
--- a/pidgin/pidginprotocolstore.h Fri Mar 11 01:44:40 2022 -0600
+++ b/pidgin/pidginprotocolstore.h Fri Mar 11 02:22:36 2022 -0600
@@ -58,7 +58,7 @@
PIDGIN_PROTOCOL_STORE_COLUMN_PROTOCOL,
PIDGIN_PROTOCOL_STORE_COLUMN_ID,
PIDGIN_PROTOCOL_STORE_COLUMN_NAME,
- PIDGIN_PROTOCOL_STORE_COLUMN_ICON,
+ PIDGIN_PROTOCOL_STORE_COLUMN_ICON_NAME,
/*< private >*/
PIDGIN_PROTOCOL_STORE_N_COLUMNS,
} PidginProtocolStoreColumn;
--- a/pidgin/resources/Protocols/chooser.ui Fri Mar 11 01:44:40 2022 -0600
+++ b/pidgin/resources/Protocols/chooser.ui Fri Mar 11 02:22:36 2022 -0600
@@ -37,7 +37,7 @@
<child>
<object class="GtkCellRendererPixbuf" id="icon"/>
<attributes>
- <attribute name="pixbuf">3</attribute>
+ <attribute name="icon-name">3</attribute>
</attributes>
</child>
<child>