References #219

Fri, 20 Apr 2007 01:06:43 +0000

author
Stu Tomlinson <nosnilmot@pidgin.im>
date
Fri, 20 Apr 2007 01:06:43 +0000
changeset 16351
1ac1dbbeb665
parent 16349
1d5c86d8fc15
child 16352
a86a0c22512f

References #219

Fix the absence of "set buddy icon" pixmaps by using the new icons, but
I think we should have the insert-image.png available in something a bit
larger than this!

pidgin/gtkaccount.c file | annotate | diff | comparison | revisions
pidgin/gtkstatusbox.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkaccount.c	Fri Apr 20 00:20:20 2007 +0000
+++ b/pidgin/gtkaccount.c	Fri Apr 20 01:06:43 2007 +0000
@@ -229,11 +229,9 @@
 	if (pixbuf == NULL)
 	{
 		/* Show a placeholder icon */
-		gchar *filename;
-		filename = g_build_filename(DATADIR, "pixmaps",
-				"pidgin", "insert-image.png", NULL);
-		pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
-		g_free(filename);
+		GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL);
+		pixbuf = gtk_widget_render_icon(dialog->window, PIDGIN_STOCK_TOOLBAR_INSERT_IMAGE,
+		                                icon_size, "PidginAccount");
 	}
 
 	gtk_image_set_from_pixbuf(GTK_IMAGE(dialog->icon_entry), pixbuf);
--- a/pidgin/gtkstatusbox.c	Fri Apr 20 00:20:20 2007 +0000
+++ b/pidgin/gtkstatusbox.c	Fri Apr 20 01:06:43 2007 +0000
@@ -2042,11 +2042,10 @@
 	if (status_box->buddy_icon == NULL)
 	{
 		/* Show a placeholder icon */
-		gchar *filename;
-		filename = g_build_filename(DATADIR, "pixmaps",
-				"pidgin", "insert-image.png", NULL);
-		status_box->buddy_icon = gdk_pixbuf_new_from_file(filename, NULL);
-		g_free(filename);
+		GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL);
+		status_box->buddy_icon = gtk_widget_render_icon(GTK_WIDGET(status_box),
+		                                                PIDGIN_STOCK_TOOLBAR_INSERT_IMAGE,
+		                                                icon_size, "PidginStatusBox");
 	}
 
 	if (status_box->buddy_icon != NULL) {

mercurial