[nautilus/gnome-3-18] files-view: don't hold a ref to the view on templates items



commit dabd4d93aba1f2beb9949924333f54a517d9dab8
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Nov 26 17:35:54 2015 +0100

    files-view: don't hold a ref to the view on templates items
    
    They shouldn't need to hold a ref to the whole view and makes
    ownership management more complex.

 src/nautilus-files-view.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 7682a8f..0c4d8d7 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1018,7 +1018,6 @@ create_template_parameters_new (NautilusFile      *file,
         CreateTemplateParameters *result;
 
         result = g_new0 (CreateTemplateParameters, 1);
-        g_object_ref (directory_view);
         result->directory_view = directory_view;
         nautilus_file_ref (file);
         result->file = file;
@@ -1029,7 +1028,6 @@ create_template_parameters_new (NautilusFile      *file,
 static void
 create_templates_parameters_free (CreateTemplateParameters *parameters)
 {
-        g_object_unref (parameters->directory_view);
         nautilus_file_unref (parameters->file);
         g_free (parameters);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]