diff -r 67d81d0a2445 -r 4999fb10f83f pidgin/gtkstatusbox.c --- a/pidgin/gtkstatusbox.c Mon Jun 22 03:41:21 2009 +0000 +++ b/pidgin/gtkstatusbox.c Mon Jun 22 04:17:03 2009 +0000 @@ -2258,14 +2258,22 @@ if (status_box->buddy_icon_img != NULL) { + GdkPixbuf *buf, *scale; + int scale_width, scale_height; 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); - status_box->buddy_icon = gdk_pixbuf_loader_get_pixbuf(loader); - if (status_box->buddy_icon) - g_object_ref(status_box->buddy_icon); + buf = gdk_pixbuf_loader_get_pixbuf(loader); + scale_width = gdk_pixbuf_get_width(buf); + scale_height = gdk_pixbuf_get_height(buf); + scale = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, scale_width, scale_height); + gdk_pixbuf_fill(scale, 0x00000000); + gdk_pixbuf_copy_area(buf, 0, 0, scale_width, scale_height, scale, 0, 0); + if (pidgin_gdk_pixbuf_is_opaque(scale)) + pidgin_gdk_pixbuf_make_round(scale); + status_box->buddy_icon = scale; g_object_unref(loader); }