summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/caja-window-manage-views.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/caja-window-manage-views.c b/src/caja-window-manage-views.c
index aa18030b..f41d8e5f 100644
--- a/src/caja-window-manage-views.c
+++ b/src/caja-window-manage-views.c
@@ -870,6 +870,14 @@ report_callback (CajaWindowSlot *slot,
return FALSE;
}
+static gpointer
+copy_object (gconstpointer obj,
+ gpointer user_data)
+{
+ (void) user_data;
+ return g_object_ref (G_OBJECT (obj));
+}
+
/*
* begin_location_change
*
@@ -947,7 +955,7 @@ begin_location_change (CajaWindowSlot *slot,
slot->location_change_type = type;
slot->location_change_distance = distance;
slot->tried_mount = FALSE;
- slot->pending_selection = g_list_copy_deep (new_selection, (GCopyFunc) g_object_ref, NULL);
+ slot->pending_selection = g_list_copy_deep (new_selection, copy_object, NULL);
slot->pending_scroll_to = g_strdup (scroll_pos);
@@ -1498,7 +1506,7 @@ load_new_location (CajaWindowSlot *slot,
window = slot->pane->window;
g_assert (CAJA_IS_WINDOW (window));
- selection_copy = g_list_copy_deep (selection, (GCopyFunc) g_object_ref, NULL);
+ selection_copy = g_list_copy_deep (selection, copy_object, NULL);
view = NULL;