# HG changeset patch # User Paul Aurich # Date 1245644223 0 # Node ID f55455c7ae277d96bf94065786d91dd3f51ea368 # Parent e4421eaae7dd70a66784f5aa77d056d1d93de450 Draw the user's buddy icon (in the status box) with curves, to match the buddy list icons. I fixed the ref-counting to not leak. Refs #8691 (waiting for the name to put in COPYRIGHT). diff -r e4421eaae7dd -r f55455c7ae27 ChangeLog --- a/ChangeLog Mon Jun 22 03:41:21 2009 +0000 +++ b/ChangeLog Mon Jun 22 04:17:03 2009 +0000 @@ -96,6 +96,9 @@ * Support for keyboard navigation on the status icon. (Li Yuan) * IMG tags without 'id' attributes are turned into links to the image URL. (Dmitry Petroff) + * Draw the user's buddy icon at the bottom of the Buddy List with rounded + corners for visual consistency with the actual icons in the Buddy List. + (kostaa) Finch: * The hardware cursor is updated correctly. This will be useful diff -r e4421eaae7dd -r f55455c7ae27 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); }