summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2015-12-08 14:50:39 +0100
committerCarlos Soriano <csoriano@gnome.org>2015-12-11 23:13:34 +0100
commit3b42325ffcad0188c0d3a5650372eb221fda0c44 (patch)
tree56e01c3dc0b30b57a2e7e12770b7430240c3af08
parentbaaa7370bcb2c84fd92e43e1eb6a41f64cd06a2e (diff)
downloadnautilus-3b42325ffcad0188c0d3a5650372eb221fda0c44.tar.gz
window-slot: use nautilus ref counting
So it's consistent with everywhere else.
-rw-r--r--src/nautilus-window-slot.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 98907b5f3..fb1a5d8c5 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);