Mercurial > pidgin.yaz
comparison pidgin/gtkstatusbox.c @ 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 | 4e01fc165b28 |
children | 78f798d99d3a |
comparison
equal
deleted
inserted
replaced
16268:eae8f64218ba | 16270:ae8a326b091f |
---|---|
2040 status_box->icon_size, status_box->icon_size, FALSE, NULL); | 2040 status_box->icon_size, status_box->icon_size, FALSE, NULL); |
2041 | 2041 |
2042 if (status_box->buddy_icon == NULL) | 2042 if (status_box->buddy_icon == NULL) |
2043 { | 2043 { |
2044 /* Show a placeholder icon */ | 2044 /* Show a placeholder icon */ |
2045 gchar *filename; | 2045 GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL); |
2046 filename = g_build_filename(DATADIR, "pixmaps", | 2046 status_box->buddy_icon = gtk_widget_render_icon(GTK_WIDGET(status_box), |
2047 "pidgin", "insert-image.png", NULL); | 2047 PIDGIN_STOCK_TOOLBAR_INSERT_IMAGE, |
2048 status_box->buddy_icon = gdk_pixbuf_new_from_file(filename, NULL); | 2048 icon_size, "PidginStatusBox"); |
2049 g_free(filename); | |
2050 } | 2049 } |
2051 | 2050 |
2052 if (status_box->buddy_icon != NULL) { | 2051 if (status_box->buddy_icon != NULL) { |
2053 status_box->icon_opaque = pidgin_gdk_pixbuf_is_opaque(status_box->buddy_icon); | 2052 status_box->icon_opaque = pidgin_gdk_pixbuf_is_opaque(status_box->buddy_icon); |
2054 gtk_image_set_from_pixbuf(GTK_IMAGE(status_box->icon), status_box->buddy_icon); | 2053 gtk_image_set_from_pixbuf(GTK_IMAGE(status_box->icon), status_box->buddy_icon); |