changeset 16270:ae8a326b091f

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!
author Stu Tomlinson <stu@nosnilmot.com>
date Fri, 20 Apr 2007 01:06:43 +0000
parents eae8f64218ba
children 0cf176fc9438
files pidgin/gtkaccount.c pidgin/gtkstatusbox.c
diffstat 2 files changed, 7 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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) {