diff options
author | Corey Berla <corey@berla.me> | 2022-06-30 16:17:47 -0700 |
---|---|---|
committer | António Fernandes <antoniojpfernandes@gmail.com> | 2022-07-02 18:35:30 +0000 |
commit | 748350660b55b12b5037c7ea149774ec9a8311ee (patch) | |
tree | ce4a915cf0a19d24686c5319c55d874bc45db9a5 | |
parent | e39102ede3e4cf4c9c3a8bc28e268cae6f340838 (diff) | |
download | nautilus-748350660b55b12b5037c7ea149774ec9a8311ee.tar.gz |
window-slot-dnd: Fix preferred action when hovering on a tab
Hovering on a tab would result in no available drop and logging
"NAUITLUS_IS_FILE FAILED" because the drag_info->target_file
is not set for tabs. Use the existing NautilusFile that is already
retrieved for tabs and pathbar.
-rw-r--r-- | src/nautilus-window-slot-dnd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nautilus-window-slot-dnd.c b/src/nautilus-window-slot-dnd.c index 3d929a3f3..556d18f4f 100644 --- a/src/nautilus-window-slot-dnd.c +++ b/src/nautilus-window-slot-dnd.c @@ -193,12 +193,12 @@ slot_proxy_drag_motion (GtkDropTarget *target, action = 0; goto out; } - } - if (G_VALUE_HOLDS (value, GDK_TYPE_FILE_LIST)) - { - GSList *items = g_value_get_boxed (value); - action = nautilus_dnd_get_prefered_action (drag_info->target_file, items->data); + if (G_VALUE_HOLDS (value, GDK_TYPE_FILE_LIST)) + { + GSList *items = g_value_get_boxed (value); + action = nautilus_dnd_get_prefered_action (file, items->data); + } } g_free (target_uri); |