Mercurial > pidgin
changeset 16563:8f02e8b1c838
merge of '299aeb9deb755c82a0fd53f2a533a8d465f701c0'
and '8166630681e36d59460a341a22457698d23ca192'
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 28 Apr 2007 03:41:35 +0000 |
parents | 6592432bbf91 (current diff) 9e8883a33365 (diff) |
children | 40b90b191ff3 |
files | |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkstatusbox.c Sat Apr 28 03:25:14 2007 +0000 +++ b/pidgin/gtkstatusbox.c Sat Apr 28 03:41:35 2007 +0000 @@ -2014,6 +2014,17 @@ } static void +pixbuf_size_prepared_cb(GdkPixbufLoader *loader, int width, int height, gpointer data) +{ +#if GTK_CHECK_VERSION(2,2,0) + int w, h; + GtkIconSize icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_MEDIUM); + gtk_icon_size_lookup(icon_size, &w, &h); + gdk_pixbuf_loader_set_size(loader, w, h); +#endif +} + +static void pidgin_status_box_redisplay_buddy_icon(PidginStatusBox *status_box) { @@ -2031,6 +2042,7 @@ if (status_box->buddy_icon_img != NULL) { GdkPixbufLoader *loader = gdk_pixbuf_loader_new(); + g_signal_connect(G_OBJECT(loader), "size-prepared", G_CALLBACK(pixbuf_size_prepared_cb), NULL); gdk_pixbuf_loader_write(loader, purple_imgstore_get_data(status_box->buddy_icon_img), purple_imgstore_get_size(status_box->buddy_icon_img), NULL); gdk_pixbuf_loader_close(loader, NULL); @@ -2047,7 +2059,7 @@ } if (status_box->buddy_icon != NULL) { - status_box->icon_opaque = pidgin_gdk_pixbuf_is_opaque(status_box->buddy_icon); + status_box->icon_opaque = pidgin_gdk_pixbuf_is_opaque(status_box->buddy_icon); gtk_image_set_from_pixbuf(GTK_IMAGE(status_box->icon), status_box->buddy_icon); status_box->buddy_icon_hover = gdk_pixbuf_copy(status_box->buddy_icon); do_colorshift(status_box->buddy_icon_hover, status_box->buddy_icon_hover, 32);