Mercurial > pidgin.yaz
changeset 16022:ec049b8a8619
Fix #54 (weird blist overlay icons) and a refcount leak (which matters more since the image is being copied now).
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 09 Apr 2007 02:17:25 +0000 |
parents | 5b9a35f9b2e4 |
children | fab49f913709 |
files | pidgin/gtksavedstatuses.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;