--- a/pidgin/gtkutils.c Fri Oct 01 01:06:04 2021 -0500
+++ b/pidgin/gtkutils.c Fri Oct 01 03:51:58 2021 -0500
@@ -227,27 +227,27 @@
PidginProtocolIconSize size,
- GInputStream *stream = NULL;
const char *protoname = NULL;
const gchar *icon_name = NULL;
+ GtkIconTheme *theme = NULL; + theme = gtk_icon_theme_get_default(); + if(size == PIDGIN_PROTOCOL_ICON_SMALL) { + } else if(size == PIDGIN_PROTOCOL_ICON_MEDIUM) { /* If the protocol specified an icon-name try to load it from the icon
icon_name = purple_protocol_get_icon_name(protocol);
- GtkIconTheme *theme = gtk_icon_theme_get_default();
- if(size == PIDGIN_PROTOCOL_ICON_SMALL) {
- } else if(size == PIDGIN_PROTOCOL_ICON_MEDIUM) {
pixbuf = gtk_icon_theme_load_icon(theme, icon_name, dimensions,
GTK_ICON_LOOKUP_FORCE_SIZE, NULL);
@@ -258,26 +258,19 @@
protoname = purple_protocol_get_list_icon(protocol, account, NULL);
+ if (protoname == NULL) { * Status icons will be themeable too, and then it will look up
* protoname from the theme
- tmp = g_strconcat("im-", protoname, ".png", NULL);
- filename = g_build_filename(PURPLE_DATADIR,
- "pidgin", "icons", "hicolor",
- (size == PIDGIN_PROTOCOL_ICON_SMALL) ? "16x16" :
- ((size == PIDGIN_PROTOCOL_ICON_MEDIUM) ? "22x22" :
+ tmp = g_strconcat("im-", protoname, NULL); + pixbuf = gtk_icon_theme_load_icon(theme, tmp, dimensions, + GTK_ICON_LOOKUP_FORCE_SIZE, NULL); - pixbuf = pidgin_pixbuf_new_from_file(filename);