qulogic/pidgin

Parents f0614ec30627
Children 1b17478d1d4f
gtkaccount: Port avatar selector default image to GtkIconTheme

GtkStock and gtk_widget_render_icon() are both deprecated. This patch
ports the avatar selector image setting to use GtkIconTheme instead.
--- a/pidgin/gtkaccount.c Mon May 21 21:27:50 2018 -0500
+++ b/pidgin/gtkaccount.c Mon May 21 21:29:30 2018 -0500
@@ -217,14 +217,12 @@
if (pixbuf == NULL)
{
/* Show a placeholder icon */
- GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_SMALL);
- pixbuf = gtk_widget_render_icon(dialog->window, PIDGIN_STOCK_TOOLBAR_SELECT_AVATAR,
- icon_size, "PidginAccount");
+ gtk_image_set_from_icon_name(GTK_IMAGE(dialog->icon_entry),
+ "select-avatar", GTK_ICON_SIZE_LARGE_TOOLBAR);
+ } else {
+ gtk_image_set_from_pixbuf(GTK_IMAGE(dialog->icon_entry), pixbuf);
+ g_object_unref(G_OBJECT(pixbuf));
}
-
- gtk_image_set_from_pixbuf(GTK_IMAGE(dialog->icon_entry), pixbuf);
- if (pixbuf != NULL)
- g_object_unref(G_OBJECT(pixbuf));
}
static void