[nautilus/gnome-3-18] window-slot: use nautilus ref counting



commit 3b42325ffcad0188c0d3a5650372eb221fda0c44
Author: Carlos Soriano <csoriano gnome org>
Date:   Tue Dec 8 14:50:39 2015 +0100

    window-slot: use nautilus ref counting
    
    So it's consistent with everywhere else.

 src/nautilus-window-slot.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 98907b5..fb1a5d8 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -932,7 +932,7 @@ begin_location_change (NautilusWindowSlot         *slot,
        slot->details->location_change_type = type;
        slot->details->location_change_distance = distance;
        slot->details->tried_mount = FALSE;
-       slot->details->pending_selection = g_list_copy_deep (new_selection, (GCopyFunc) g_object_ref, NULL);
+       slot->details->pending_selection = nautilus_file_list_copy (new_selection);
 
        slot->details->pending_scroll_to = g_strdup (scroll_pos);
 
@@ -1260,7 +1260,7 @@ handle_regular_file_if_needed (NautilusWindowSlot *slot,
         if ((parent_file != NULL) &&
             nautilus_file_get_file_type (file) == G_FILE_TYPE_REGULAR) {
             if (slot->details->pending_selection != NULL) {
-                g_list_free_full (slot->details->pending_selection, (GDestroyNotify) nautilus_file_unref);
+                nautilus_file_list_free (slot->details->pending_selection);
             }
 
             g_clear_object (&slot->details->pending_location);
@@ -1433,7 +1433,7 @@ setup_view (NautilusWindowSlot *slot,
                                   FALSE,
                                   TRUE);
 
-               g_list_free_full (slot->details->pending_selection, g_object_unref);
+               nautilus_file_list_free (slot->details->pending_selection);
                slot->details->pending_selection = NULL;
        } else if (old_location != NULL) {
                 GList *selection;
@@ -1445,7 +1445,7 @@ setup_view (NautilusWindowSlot *slot,
                                   selection,
                                   FALSE,
                                   TRUE);
-               g_list_free_full (selection, g_object_unref);
+               nautilus_file_list_free (selection);
        } else {
                 ret = FALSE;
                 goto out;
@@ -1522,7 +1522,7 @@ static void
 free_location_change (NautilusWindowSlot *slot)
 {
        g_clear_object (&slot->details->pending_location);
-       g_list_free_full (slot->details->pending_selection, g_object_unref);
+       nautilus_file_list_free (slot->details->pending_selection);
        slot->details->pending_selection = NULL;
 
         /* Don't free details->pending_scroll_to, since thats needed until
@@ -1579,7 +1579,7 @@ cancel_location_change (NautilusWindowSlot *slot)
                                   selection,
                                   TRUE,
                                   FALSE);
-               g_list_free_full (selection, g_object_unref);
+               nautilus_file_list_free (selection);
         }
 
         end_location_change (slot);
@@ -1708,7 +1708,7 @@ nautilus_window_slot_force_reload (NautilusWindowSlot *slot)
                 NAUTILUS_LOCATION_CHANGE_RELOAD, 0, current_pos);
         g_free (current_pos);
        g_object_unref (location);
-       g_list_free_full (selection, g_object_unref);
+       nautilus_file_list_free (selection);
 }
 
 void
@@ -2297,7 +2297,7 @@ nautilus_window_slot_dispose (GObject *object)
                 slot->details->view_mode_before_search = NULL;
         }
 
-       g_list_free_full (slot->details->pending_selection, g_object_unref);
+       nautilus_file_list_free (slot->details->pending_selection);
        slot->details->pending_selection = NULL;
 
        g_clear_object (&slot->details->current_location_bookmark);


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