[nautilus] window-slot-dnd: Fix preferred action when hovering on a tab



commit 748350660b55b12b5037c7ea149774ec9a8311ee
Author: Corey Berla <corey berla me>
Date:   Thu Jun 30 16:17:47 2022 -0700

    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.

 src/nautilus-window-slot-dnd.c | 10 +++++-----
 1 file 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]