Mercurial > pidgin.yaz
changeset 20834:6b9e5bbab0fe
We need to unref the pixmaps after adding them to a list store.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 09 Oct 2007 00:24:45 +0000 |
parents | 062ed5f59ada |
children | 3de6fbc79134 |
files | pidgin/gtkblist.c pidgin/gtkconv.c |
diffstat | 2 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Mon Oct 08 20:46:00 2007 +0000 +++ b/pidgin/gtkblist.c Tue Oct 09 00:24:45 2007 +0000 @@ -5367,7 +5367,7 @@ BUDDY_ICON_COLUMN, avatar, BUDDY_ICON_VISIBLE_COLUMN, biglist, EMBLEM_COLUMN, emblem, - EMBLEM_VISIBLE_COLUMN, emblem, + EMBLEM_VISIBLE_COLUMN, (emblem != NULL), PROTOCOL_ICON_COLUMN, pidgin_create_prpl_icon(buddy->account, PIDGIN_PRPL_ICON_SMALL), PROTOCOL_ICON_VISIBLE_COLUMN, purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_protocol_icons"), BGCOLOR_COLUMN, NULL, @@ -5378,6 +5378,8 @@ g_free(mark); g_free(idle); + if(emblem) + g_object_unref(emblem); if(status) g_object_unref(status); if(avatar) @@ -5549,6 +5551,8 @@ -1); g_free(mark); + if(emblem) + g_object_unref(emblem); if(status) g_object_unref(status); if(avatar)
--- a/pidgin/gtkconv.c Mon Oct 08 20:46:00 2007 +0000 +++ b/pidgin/gtkconv.c Tue Oct 09 00:24:45 2007 +0000 @@ -2498,11 +2498,16 @@ gtk_list_store_set(GTK_LIST_STORE(gtkconv->infopane_model), &(gtkconv->infopane_iter), CONV_EMBLEM_COLUMN, emblem, -1); + if (emblem) + g_object_unref(emblem); if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_protocol_icons")) { + emblem = pidgin_create_prpl_icon(gtkconv->active_conv->account, PIDGIN_PRPL_ICON_SMALL); gtk_list_store_set(GTK_LIST_STORE(gtkconv->infopane_model), &(gtkconv->infopane_iter), - CONV_PROTOCOL_ICON_COLUMN, pidgin_create_prpl_icon(gtkconv->active_conv->account, PIDGIN_PRPL_ICON_SMALL), -1); + CONV_PROTOCOL_ICON_COLUMN, emblem, -1); + if (emblem) + g_object_unref(emblem); } /* XXX seanegan Why do I have to do this? */ @@ -4728,7 +4733,6 @@ g_object_set(rend, "ellipsize", PANGO_ELLIPSIZE_END, NULL); #endif - rend = gtk_cell_renderer_pixbuf_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(gtkconv->infopane), rend, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(gtkconv->infopane), rend, "pixbuf", CONV_PROTOCOL_ICON_COLUMN, NULL);