--- a/pidgin/plugins/disco/gtkdisco.c Sat Jan 21 22:49:50 2023 -0600
+++ b/pidgin/plugins/disco/gtkdisco.c Mon Jan 23 20:51:42 2023 -0600
@@ -36,7 +36,7 @@
@@ -103,45 +103,24 @@
-pidgin_disco_load_icon(XmppDiscoService *service, const char *size)
+pidgin_disco_get_icon_name(XmppDiscoService *service) - GdkPixbuf *pixbuf = NULL;
+ char *icon_name = NULL; g_return_val_if_fail(service != NULL, NULL);
- g_return_val_if_fail(size != NULL, NULL);
- tmp_size = g_strdup_printf("%sx%s", size, size);
if (service->type == XMPP_DISCO_SERVICE_TYPE_GATEWAY && service->gateway_type) {
- char *tmp = g_strconcat("im-", service->gateway_type,
- filename = g_build_filename(PURPLE_DATADIR,
- "pidgin", "icons", "hicolor", tmp_size, "apps",
+ icon_name = g_strconcat("im-", service->gateway_type, NULL); } else if (service->type == XMPP_DISCO_SERVICE_TYPE_USER) {
- filename = g_build_filename(PURPLE_DATADIR,
- "pixmaps", "pidgin", "status", size, "person.png", NULL);
+ icon_name = g_strdup("person"); } else if (service->type == XMPP_DISCO_SERVICE_TYPE_CHAT) {
- filename = g_build_filename(PURPLE_DATADIR,
- "pidgin", "icons", "hicolor", tmp_size, "status",
+ icon_name = g_strdup("chat");
- pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
@@ -677,7 +656,7 @@
PidginDiscoDialog *dialog;
GtkTreeIter iter, parent_iter, child;
- GdkPixbuf *pixbuf = NULL;
+ char *icon_name = NULL; @@ -745,14 +724,12 @@
gtk_tree_path_free(path);
- pixbuf = pidgin_disco_load_icon(service, "16");
+ icon_name = pidgin_disco_get_icon_name(service); - gtk_tree_store_set(dialog->model, &iter, PIXBUF_COLUMN, pixbuf,
+ gtk_tree_store_set(dialog->model, &iter, ICON_NAME_COLUMN, icon_name, NAME_COLUMN, service->name, DESCRIPTION_COLUMN,
service->description, SERVICE_COLUMN, service, -1);
- g_object_unref(pixbuf);
--- a/pidgin/plugins/disco/resources/disco.ui Sat Jan 21 22:49:50 2023 -0600
+++ b/pidgin/plugins/disco/resources/disco.ui Mon Jan 23 20:51:42 2023 -0600
@@ -39,8 +39,8 @@
<object class="GtkTreeStore" id="model">
- <!-- column-name pixbuf -->
- <column type="GdkPixbuf"/>
+ <!-- column-name icon-name --> + <column type="gchararray"/> <!-- column-name name -->
<column type="gchararray"/>
<!-- column-name description -->
@@ -123,7 +123,7 @@
<object class="GtkCellRendererPixbuf"/>
- <attribute name="pixbuf">0</attribute>
+ <attribute name="icon-name">0</attribute>