[nautilus/wip/corey/dnd-hack: 1/2] dnd: Cleanup calls to gdk_drop_get_actions()
- From: Corey Berla <coreyberla src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/corey/dnd-hack: 1/2] dnd: Cleanup calls to gdk_drop_get_actions()
- Date: Wed, 31 Aug 2022 03:38:09 +0000 (UTC)
commit e295b82ee89d1b6edbfeac4f364f3b13430fc23c
Author: Corey Berla <corey berla me>
Date: Tue Aug 30 20:35:00 2022 -0700
dnd: Cleanup calls to gdk_drop_get_actions()
In preparation for the next commit.
src/gtk/nautilusgtkplacessidebar.c | 5 ++++-
src/nautilus-window-slot-dnd.c | 4 +++-
2 files changed, 7 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..855cbeb5d 100644
--- a/src/nautilus-window-slot-dnd.c
+++ b/src/nautilus-window-slot-dnd.c
@@ -270,6 +270,8 @@ 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));
@@ -278,7 +280,7 @@ slot_proxy_handle_drop (GtkDropTarget *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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]