summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Berla <corey@berla.me>2022-08-30 20:35:00 -0700
committerAntónio Fernandes <antoniof@gnome.org>2022-08-31 22:16:17 +0000
commitf328288dc2e8ba7f1e801a10175d090aef33f2e9 (patch)
tree871bce5f365bc9d6be170e2a08de89ff7b41cef1
parent79c363d55eed892aca750ff4fff9a600a9e4d5f5 (diff)
downloadnautilus-f328288dc2e8ba7f1e801a10175d090aef33f2e9.tar.gz
dnd: Cleanup calls to gdk_drop_get_actions()
In preparation for the next commit.
-rw-r--r--src/gtk/nautilusgtkplacessidebar.c5
-rw-r--r--src/nautilus-window-slot-dnd.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/gtk/nautilusgtkplacessidebar.c b/src/gtk/nautilusgtkplacessidebar.c
index fbf1470ec..76fb98627 100644
--- a/src/gtk/nautilusgtkplacessidebar.c
+++ b/src/gtk/nautilusgtkplacessidebar.c
@@ -1879,11 +1879,14 @@ drag_drop_callback (GtkDropTarget *target,
else
{
GFile *dest_file = g_file_new_for_uri (target_uri);
+ GdkDragAction actions;
+
+ actions = gdk_drop_get_actions (gtk_drop_target_get_current_drop (target));
emit_drag_perform_drop (sidebar,
dest_file,
g_value_get_boxed (value),
- gdk_drop_get_actions (gtk_drop_target_get_current_drop (target)));
+ actions);
g_object_unref (dest_file);
}
diff --git a/src/nautilus-window-slot-dnd.c b/src/nautilus-window-slot-dnd.c
index 8645d472d..5d7267d38 100644
--- a/src/nautilus-window-slot-dnd.c
+++ b/src/nautilus-window-slot-dnd.c
@@ -270,15 +270,19 @@ slot_proxy_handle_drop (GtkDropTarget *target,
if (G_VALUE_HOLDS (value, GDK_TYPE_FILE_LIST))
{
GSList *items = g_value_get_boxed (value);
+ GdkDragAction actions;
+
for (GSList *l = items; l != NULL; l = l->next)
{
uri_list = g_list_prepend (uri_list, g_file_get_uri (l->data));
}
+ actions = gdk_drop_get_actions (gtk_drop_target_get_current_drop (target));
+
nautilus_files_view_drop_proxy_received_uris (target_view,
uri_list,
target_uri,
- gdk_drop_get_actions (gtk_drop_target_get_current_drop (target)));
+ actions);
g_list_free_full (uri_list, g_free);
}
}