changeset 22087:d943df776c09

It turns out the tree-models need to be unref'ed.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 12 Jan 2008 14:44:12 +0000
parents 1d02fa7737eb
children 51d6ae399919 1226083ed7e2
files pidgin/gtkaccount.c pidgin/gtkblist.c pidgin/gtkcertmgr.c pidgin/gtklog.c pidgin/gtknotify.c pidgin/gtkpounce.c pidgin/gtkprivacy.c pidgin/gtkrequest.c pidgin/gtksavedstatuses.c pidgin/gtkstatusbox.c
diffstat 10 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkaccount.c	Sat Jan 12 07:48:38 2008 +0000
+++ b/pidgin/gtkaccount.c	Sat Jan 12 14:44:12 2008 +0000
@@ -2177,6 +2177,7 @@
 	treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(dialog->model));
 	dialog->treeview = treeview;
 	gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview), TRUE);
+	g_object_unref(G_OBJECT(dialog->model));
 
 	sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
 	gtk_tree_selection_set_mode(sel, GTK_SELECTION_MULTIPLE);
--- a/pidgin/gtkblist.c	Sat Jan 12 07:48:38 2008 +0000
+++ b/pidgin/gtkblist.c	Sat Jan 12 14:44:12 2008 +0000
@@ -6069,6 +6069,7 @@
 	gtkblist->timeout = 0;
 	gtkblist->drag_timeout = 0;
 	gtkblist->window = gtkblist->vbox = gtkblist->treeview = NULL;
+	g_object_unref(G_OBJECT(gtkblist->treemodel));
 	gtkblist->treemodel = NULL;
 	g_object_unref(G_OBJECT(gtkblist->ift));
 	g_object_unref(G_OBJECT(gtkblist->empty_avatar));
--- a/pidgin/gtkcertmgr.c	Sat Jan 12 07:48:38 2008 +0000
+++ b/pidgin/gtkcertmgr.c	Sat Jan 12 14:44:12 2008 +0000
@@ -422,6 +422,7 @@
 	
 	tpm_dat->listview = listview =
 		GTK_TREE_VIEW(gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)));
+	g_object_unref(G_OBJECT(store));
 	
 	{
 		GtkCellRenderer *renderer;
--- a/pidgin/gtklog.c	Sat Jan 12 07:48:38 2008 +0000
+++ b/pidgin/gtklog.c	Sat Jan 12 14:44:12 2008 +0000
@@ -614,6 +614,7 @@
 	gtk_paned_add1(GTK_PANED(pane), sw);
 	lv->treestore = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
 	lv->treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (lv->treestore));
+	g_object_unref(G_OBJECT(lv->treestore));
 	rend = gtk_cell_renderer_text_new();
 	col = gtk_tree_view_column_new_with_attributes ("time", rend, "markup", 0, NULL);
 	gtk_tree_view_append_column (GTK_TREE_VIEW(lv->treeview), col);
--- a/pidgin/gtknotify.c	Sat Jan 12 07:48:38 2008 +0000
+++ b/pidgin/gtknotify.c	Sat Jan 12 14:44:12 2008 +0000
@@ -379,6 +379,7 @@
 		mail_dialog->treemodel = gtk_tree_store_new(COLUMNS_PIDGIN_MAIL,
 						GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER);
 		mail_dialog->treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(mail_dialog->treemodel));
+		g_object_unref(G_OBJECT(mail_dialog->treemodel));
 		gtk_tree_view_set_search_column(GTK_TREE_VIEW(mail_dialog->treeview), PIDGIN_MAIL_TEXT);
 		gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(mail_dialog->treeview),
 			             pidgin_tree_view_search_equal_func, NULL, NULL);
@@ -818,6 +819,7 @@
 
 	/* Setup the treeview */
 	treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model));
+	g_object_unref(G_OBJECT(model));
 	gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview), TRUE);
 	gtk_widget_set_size_request(treeview, 500, 400);
 	gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)),
--- a/pidgin/gtkpounce.c	Sat Jan 12 07:48:38 2008 +0000
+++ b/pidgin/gtkpounce.c	Sat Jan 12 14:44:12 2008 +0000
@@ -1237,6 +1237,7 @@
 
 	/* Create the treeview */
 	treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(dialog->model));
+	g_object_unref(G_OBJECT(dialog->model));
 	dialog->treeview = treeview;
 	gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview), TRUE);
 
--- a/pidgin/gtkprivacy.c	Sat Jan 12 07:48:38 2008 +0000
+++ b/pidgin/gtkprivacy.c	Sat Jan 12 14:44:12 2008 +0000
@@ -474,6 +474,8 @@
 	if (privacy_dialog == NULL)
 		return;
 
+	g_object_unref(G_OBJECT(privacy_dialog->allow_store));
+	g_object_unref(G_OBJECT(privacy_dialog->block_store));
 	g_free(privacy_dialog);
 	privacy_dialog = NULL;
 }
--- a/pidgin/gtkrequest.c	Sat Jan 12 07:48:38 2008 +0000
+++ b/pidgin/gtkrequest.c	Sat Jan 12 14:44:12 2008 +0000
@@ -1007,6 +1007,7 @@
 
 	/* Create the tree view */
 	treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
+	g_object_unref(G_OBJECT(store));
 	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE);
 
 	sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
--- a/pidgin/gtksavedstatuses.c	Sat Jan 12 07:48:38 2008 +0000
+++ b/pidgin/gtksavedstatuses.c	Sat Jan 12 14:44:12 2008 +0000
@@ -669,6 +669,7 @@
 	purple_request_close_with_handle(status_window);
 	purple_notify_close_with_handle(status_window);
 	purple_signals_disconnect_by_handle(status_window);
+	g_object_unref(G_OBJECT(status_window->model));
 	g_free(status_window);
 	status_window = NULL;
 }
@@ -723,6 +724,7 @@
 
 	status_editor_remove_dialog(dialog);
 	g_free(dialog->original_title);
+	g_object_unref(G_OBJECT(dialog->model));
 	g_free(dialog);
 
 	return FALSE;
--- a/pidgin/gtkstatusbox.c	Sat Jan 12 07:48:38 2008 +0000
+++ b/pidgin/gtkstatusbox.c	Sat Jan 12 14:44:12 2008 +0000
@@ -513,6 +513,8 @@
 	purple_imgstore_unref(statusbox->buddy_icon_img);
 	g_object_unref(G_OBJECT(statusbox->buddy_icon));
 	g_object_unref(G_OBJECT(statusbox->buddy_icon_hover));
+	g_object_unref(G_OBJECT(statusbox->store));
+	g_object_unref(G_OBJECT(statusbox->dropdown_store));
 
 	if (statusbox->buddy_icon_sel)
 		gtk_widget_destroy(statusbox->buddy_icon_sel);