# HG changeset patch # User Daniel Atallah # Date 1176085045 0 # Node ID ec049b8a8619033382531fdda3e20c20875b0c18 # Parent 5b9a35f9b2e461add57daafc40ca5d31b5ed27bc Fix #54 (weird blist overlay icons) and a refcount leak (which matters more since the image is being copied now). diff -r 5b9a35f9b2e4 -r ec049b8a8619 pidgin/gtksavedstatuses.c --- a/pidgin/gtksavedstatuses.c Mon Apr 09 02:04:03 2007 +0000 +++ b/pidgin/gtksavedstatuses.c Mon Apr 09 02:17:25 2007 +0000 @@ -1704,8 +1704,14 @@ GTK_STOCK_SAVE, GTK_ICON_SIZE_MENU, "PidginStatusMenu"); if (emblem != NULL) { + /* copy the pixbuf so we're not modifying the stock image data when we overlay the disk */ + GdkPixbuf *pixbuf2 = gdk_pixbuf_copy(pixbuf); int width = gdk_pixbuf_get_width(pixbuf) / 2; int height = gdk_pixbuf_get_height(pixbuf) / 2; + + g_object_unref(G_OBJECT(pixbuf)); + pixbuf = pixbuf2; + gdk_pixbuf_composite(emblem, pixbuf, 0, height, width, height, 0, height, 0.5, 0.5, GDK_INTERP_BILINEAR, 255); @@ -1719,6 +1725,7 @@ SS_MENU_TEXT_COLUMN, purple_savedstatus_get_title(status), SS_MENU_DATA_COLUMN, GINT_TO_POINTER(purple_savedstatus_get_creation_time(status)), -1); + g_object_unref(G_OBJECT(pixbuf)); if (status == current_status) index = i;