Commit ec2b9674 by Carlos Soriano

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
parent 1b68777c
......@@ -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 (),
......
......@@ -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);
}
......@@ -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,
......
......@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment