[Commits] [SCM] claws branch, master, updated. 3.16.0-69-g789fd96

ticho at claws-mail.org ticho at claws-mail.org
Sat Feb 24 22:33:51 CET 2018


The branch, master has been updated
       via  789fd968bfc3df5647505487e4de6e59ca11ff44 (commit)
      from  81997a20d4e7a9e2b468871d0906ee90d6ea6c36 (commit)

Summary of changes:
 src/addressadd.c                        |    1 +
 src/addrgather.c                        |    1 +
 src/editldap_basedn.c                   |    1 +
 src/gtk/foldersort.c                    |    1 +
 src/importldif.c                        |    1 +
 src/mimeview.c                          |    1 +
 src/plugins/pdf_viewer/poppler_viewer.c |    2 ++
 src/plugins/pgpcore/select-keys.c       |    1 +
 src/prefs_filtering.c                   |    6 ++++--
 9 files changed, 13 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 789fd968bfc3df5647505487e4de6e59ca11ff44
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sat Feb 24 22:30:51 2018 +0100

    Unreference GtkTreeModel pointers after they've been added to a tree view.
    
    This was forgotten in only a few cases.

diff --git a/src/addressadd.c b/src/addressadd.c
index b4874d8..44e28ca 100644
--- a/src/addressadd.c
+++ b/src/addressadd.c
@@ -272,6 +272,7 @@ static void addressadd_create( void ) {
 			GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER);
 
 	tree_folder = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
+	g_object_unref(store);
 	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree_folder), TRUE);
 	gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(tree_folder), FALSE);
 	gtk_tree_view_set_search_column(GTK_TREE_VIEW(tree_folder),
diff --git a/src/addrgather.c b/src/addrgather.c
index 2fded27..92da1a6 100644
--- a/src/addrgather.c
+++ b/src/addrgather.c
@@ -481,6 +481,7 @@ static void addrgather_page_finish( gint pageNum, gchar *pageLbl ) {
 			G_TYPE_STRING, G_TYPE_STRING, -1));
 
 	viewCount = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model));
+	g_object_unref(model);
 	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(viewCount), TRUE);
 	gtk_tree_view_set_reorderable(GTK_TREE_VIEW(viewCount), FALSE);
 	sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(viewCount));
diff --git a/src/editldap_basedn.c b/src/editldap_basedn.c
index 70df32b..07a8fc5 100644
--- a/src/editldap_basedn.c
+++ b/src/editldap_basedn.c
@@ -216,6 +216,7 @@ static void edit_ldap_bdn_create(void) {
 	store = gtk_list_store_new(1, G_TYPE_STRING, -1);
 
 	basedn_list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
+	g_object_unref(store);
 	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(basedn_list), TRUE);
 	sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(basedn_list));
 	gtk_tree_selection_set_mode(sel, GTK_SELECTION_BROWSE);
diff --git a/src/gtk/foldersort.c b/src/gtk/foldersort.c
index 79f85a8..8160235 100644
--- a/src/gtk/foldersort.c
+++ b/src/gtk/foldersort.c
@@ -295,6 +295,7 @@ void foldersort_open()
 
 	/* Create the view widget */
 	folderlist = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
+	g_object_unref(store);
 	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(folderlist), TRUE);
 	gtk_tree_view_set_reorderable(GTK_TREE_VIEW(folderlist), TRUE);
 	selector = gtk_tree_view_get_selection(GTK_TREE_VIEW(folderlist));
diff --git a/src/importldif.c b/src/importldif.c
index e10c344..379ea7c 100644
--- a/src/importldif.c
+++ b/src/importldif.c
@@ -700,6 +700,7 @@ static void imp_ldif_page_fields( gint pageNum, gchar *pageLbl ) {
 			-1);
 
 	view_fields = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
+	g_object_unref(store);
 	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view_fields), TRUE);
 	gtk_tree_view_set_reorderable(GTK_TREE_VIEW(view_fields), FALSE);
 	sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(view_fields));
diff --git a/src/mimeview.c b/src/mimeview.c
index dbb6259..223af09 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -286,6 +286,7 @@ MimeView *mimeview_create(MainWindow *mainwin)
 				   G_TYPE_POINTER);
 
 	ctree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model));
+	g_object_unref(model);
 	gtk_tree_view_set_enable_search(GTK_TREE_VIEW(ctree), FALSE);
 	gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(ctree),
 					prefs_common.use_stripes_everywhere);
diff --git a/src/plugins/pdf_viewer/poppler_viewer.c b/src/plugins/pdf_viewer/poppler_viewer.c
index effd911..8949098 100644
--- a/src/plugins/pdf_viewer/poppler_viewer.c
+++ b/src/plugins/pdf_viewer/poppler_viewer.c
@@ -1822,6 +1822,8 @@ static MimeViewer *pdf_viewer_create(void)
 					G_TYPE_DOUBLE);
 
 	viewer->index_list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(tree_store));
+	g_object_unref(tree_store);
+
 	renderer = gtk_cell_renderer_text_new();
 	column = gtk_tree_view_column_new_with_attributes(_("Name"),  renderer, "text", 0,  NULL);
 	gtk_tree_view_append_column(GTK_TREE_VIEW(viewer->index_list), column);		
diff --git a/src/plugins/pgpcore/select-keys.c b/src/plugins/pgpcore/select-keys.c
index 407d7c2..f558f6b 100644
--- a/src/plugins/pgpcore/select-keys.c
+++ b/src/plugins/pgpcore/select-keys.c
@@ -454,6 +454,7 @@ create_dialog (struct select_keys_s *sk)
 				-1);
 
 		view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
+		g_object_unref(store);
 		gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(view), TRUE);
 		gtk_tree_view_set_reorderable(GTK_TREE_VIEW(view), FALSE);
 		sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
diff --git a/src/prefs_filtering.c b/src/prefs_filtering.c
index 799b54e..d18aed1 100644
--- a/src/prefs_filtering.c
+++ b/src/prefs_filtering.c
@@ -1798,9 +1798,11 @@ static GtkWidget *prefs_filtering_list_view_create(void)
 {
 	GtkTreeView *list_view;
 	GtkTreeSelection *selector;
+	GtkListStore *store = prefs_filtering_create_data_store();
 
-	list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(GTK_TREE_MODEL
-		(prefs_filtering_create_data_store())));
+	list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(
+				GTK_TREE_MODEL(store)));
+	g_object_unref(store);
 #ifdef GENERIC_UMPC
 	g_object_set(list_view, "allow-checkbox-mode", FALSE, NULL);
 #endif

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list