comparison pidgin/gtkconv.c @ 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 f4001b1bf14a
children ccb728fa5af8
comparison
equal deleted inserted replaced
20833:062ed5f59ada 20834:6b9e5bbab0fe
2496 CONV_ICON_COLUMN, infopane_status, -1); 2496 CONV_ICON_COLUMN, infopane_status, -1);
2497 2497
2498 gtk_list_store_set(GTK_LIST_STORE(gtkconv->infopane_model), 2498 gtk_list_store_set(GTK_LIST_STORE(gtkconv->infopane_model),
2499 &(gtkconv->infopane_iter), 2499 &(gtkconv->infopane_iter),
2500 CONV_EMBLEM_COLUMN, emblem, -1); 2500 CONV_EMBLEM_COLUMN, emblem, -1);
2501 if (emblem)
2502 g_object_unref(emblem);
2501 2503
2502 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_protocol_icons")) { 2504 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/blist/show_protocol_icons")) {
2505 emblem = pidgin_create_prpl_icon(gtkconv->active_conv->account, PIDGIN_PRPL_ICON_SMALL);
2503 gtk_list_store_set(GTK_LIST_STORE(gtkconv->infopane_model), 2506 gtk_list_store_set(GTK_LIST_STORE(gtkconv->infopane_model),
2504 &(gtkconv->infopane_iter), 2507 &(gtkconv->infopane_iter),
2505 CONV_PROTOCOL_ICON_COLUMN, pidgin_create_prpl_icon(gtkconv->active_conv->account, PIDGIN_PRPL_ICON_SMALL), -1); 2508 CONV_PROTOCOL_ICON_COLUMN, emblem, -1);
2509 if (emblem)
2510 g_object_unref(emblem);
2506 } 2511 }
2507 2512
2508 /* XXX seanegan Why do I have to do this? */ 2513 /* XXX seanegan Why do I have to do this? */
2509 gtk_widget_queue_draw(gtkconv->infopane); 2514 gtk_widget_queue_draw(gtkconv->infopane);
2510 2515
4725 g_object_set(rend, "ypad", 0, "yalign", 0.5, NULL); 4730 g_object_set(rend, "ypad", 0, "yalign", 0.5, NULL);
4726 4731
4727 #if GTK_CHECK_VERSION(2, 6, 0) 4732 #if GTK_CHECK_VERSION(2, 6, 0)
4728 g_object_set(rend, "ellipsize", PANGO_ELLIPSIZE_END, NULL); 4733 g_object_set(rend, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
4729 #endif 4734 #endif
4730
4731 4735
4732 rend = gtk_cell_renderer_pixbuf_new(); 4736 rend = gtk_cell_renderer_pixbuf_new();
4733 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(gtkconv->infopane), rend, FALSE); 4737 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(gtkconv->infopane), rend, FALSE);
4734 gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(gtkconv->infopane), rend, "pixbuf", CONV_PROTOCOL_ICON_COLUMN, NULL); 4738 gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(gtkconv->infopane), rend, "pixbuf", CONV_PROTOCOL_ICON_COLUMN, NULL);
4735 g_object_set(rend, "xalign", 0.0, "xpad", 3, "ypad", 0, NULL); 4739 g_object_set(rend, "xalign", 0.0, "xpad", 3, "ypad", 0, NULL);