Commit e0b864ee authored by Cosimo Cecchi's avatar Cosimo Cecchi

dnd: only allow the desktop as target for special desktop items

When a special desktop item (Home, Trash and the volumes shortcut) is
dragged, only the desktop itself is a valid destination target.
parent a0782078
......@@ -461,6 +461,13 @@ nautilus_drag_default_drop_action_for_icons (GdkDragContext *context,
dropped_file = ((NautilusDragSelectionItem *)items->data)->file;
target_file = nautilus_file_get_existing_by_uri (target_uri_string);
if (eel_uri_is_desktop (dropped_uri) &&
!eel_uri_is_desktop (target_uri_string)) {
/* Desktop items only move on the desktop */
*action = 0;
return;
}
/*
* Check for trash URI. We do a find_directory for any Trash directory.
* Passing 0 permissions as gnome-vfs would override the permissions
......
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