[nautilus] files-view: don't open folder with timer for drag&drop



commit ec2b9674b0025bcd8cd30246135962d5a77d9685
Author: Carlos Soriano <csoriano gnome org>
Date:   Mon Aug 31 12:51:57 2015 +0200

    files-view: don't open folder with timer for drag&drop
    
    We were opening the hovered folder after a timeout when performing a
    drag and drop operation.
    However, this causes that the user could lose track of were the user was
    and fail the dnd operation, or even worse, drop in a unknow location and
    makes the whole operation rather anoying.
    Also looks like could be a problem for disabled people.
    
    So instead just don't open locations on hover for the main view.
    
    Pathbar remains opening with the timer on hover, since the pathbar
    itself doesn't change and therefore the user don't lose the track.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727790

 src/nautilus-canvas-view.c    |   10 ----------
 src/nautilus-files-view-dnd.c |   25 -------------------------
 src/nautilus-files-view-dnd.h |    2 --
 src/nautilus-list-view.c      |   10 ----------
 4 files changed, 0 insertions(+), 47 deletions(-)
---
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
index 6ab9a8b..2c2113c 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -1773,14 +1773,6 @@ canvas_view_handle_raw (NautilusCanvasContainer *container, const char *raw_data
                                       raw_data, length, target_uri, direct_save_uri, action, x, y);
 }
 
-static void
-canvas_view_handle_hover (NautilusCanvasContainer *container,
-                         const char *target_uri,
-                         NautilusCanvasView *view)
-{
-       nautilus_files_view_handle_hover (NAUTILUS_FILES_VIEW (view), target_uri);
-}
-
 static char *
 canvas_view_get_first_visible_file (NautilusFilesView *view)
 {
@@ -2006,8 +1998,6 @@ nautilus_canvas_view_init (NautilusCanvasView *canvas_view)
                                 G_CALLBACK (canvas_view_handle_text), canvas_view, 0);
        g_signal_connect_object (canvas_container, "handle-raw",
                                 G_CALLBACK (canvas_view_handle_raw), canvas_view, 0);
-       g_signal_connect_object (canvas_container, "handle-hover",
-                                G_CALLBACK (canvas_view_handle_hover), canvas_view, 0);
 
        canvas_view->details->clipboard_handler_id =
                g_signal_connect (nautilus_clipboard_monitor_get (),
diff --git a/src/nautilus-files-view-dnd.c b/src/nautilus-files-view-dnd.c
index 6ce84be..14d82b5 100644
--- a/src/nautilus-files-view-dnd.c
+++ b/src/nautilus-files-view-dnd.c
@@ -523,28 +523,3 @@ nautilus_files_view_drop_proxy_received_uris (NautilusFilesView *view,
 
         g_free (container_uri);
 }
-
-void
-nautilus_files_view_handle_hover (NautilusFilesView *view,
-                                  const char        *target_uri)
-{
-        NautilusWindowSlot *slot;
-        GFile *location;
-        GFile *current_location;
-        NautilusFile *target_file;
-        gboolean target_is_dir;
-
-        slot = nautilus_files_view_get_nautilus_window_slot (view);
-
-        location = g_file_new_for_uri (target_uri);
-        target_file = nautilus_file_get_existing (location);
-        target_is_dir = nautilus_file_get_file_type (target_file) == G_FILE_TYPE_DIRECTORY;
-        current_location = nautilus_window_slot_get_location (slot);
-        if (target_is_dir && ! (current_location != NULL && g_file_equal(location, current_location))) {
-                nautilus_application_open_location_full (NAUTILUS_APPLICATION (g_application_get_default ()),
-                                                         location, 
NAUTILUS_WINDOW_OPEN_FLAG_DONT_MAKE_ACTIVE,
-                                                         NULL, NULL, slot);
-        }
-        g_object_unref (location);
-        nautilus_file_unref (target_file);
-}
diff --git a/src/nautilus-files-view-dnd.h b/src/nautilus-files-view-dnd.h
index 1f12358..f7e7bdc 100644
--- a/src/nautilus-files-view-dnd.h
+++ b/src/nautilus-files-view-dnd.h
@@ -56,8 +56,6 @@ void nautilus_files_view_handle_raw_drop          (NautilusFilesView *view,
                                                    GdkDragAction      action,
                                                    int                x,
                                                    int                y);
-void nautilus_files_view_handle_hover             (NautilusFilesView *view,
-                                                   const char        *target_uri);
 
 void nautilus_files_view_drop_proxy_received_uris (NautilusFilesView *view,
                                                    const GList       *uris,
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 9eac2d5..5816003 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -1295,14 +1295,6 @@ list_view_handle_raw (NautilusTreeViewDragDest *dest, const char *raw_data,
 }
 
 static void
-list_view_handle_hover (NautilusTreeViewDragDest *dest,
-                       const char *target_uri,
-                       NautilusListView *view)
-{
-       nautilus_files_view_handle_hover (NAUTILUS_FILES_VIEW (view), target_uri);
-}
-
-static void
 move_copy_items_callback (NautilusTreeViewDragDest *dest,
                          const GList *item_uris,
                          const char *target_uri,
@@ -1834,8 +1826,6 @@ create_and_set_up_tree_view (NautilusListView *view)
                                 G_CALLBACK (list_view_handle_text), view, 0);
        g_signal_connect_object (view->details->drag_dest, "handle-raw",
                                 G_CALLBACK (list_view_handle_raw), view, 0);
-       g_signal_connect_object (view->details->drag_dest, "handle-hover",
-                                G_CALLBACK (list_view_handle_hover), view, 0);
 
        g_signal_connect_object (gtk_tree_view_get_selection (view->details->tree_view),
                                 "changed",


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