diff options
Diffstat (limited to 'src/nautilus-dnd.c')
-rw-r--r-- | src/nautilus-dnd.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/src/nautilus-dnd.c b/src/nautilus-dnd.c index 575d12f2a..4ead3f831 100644 --- a/src/nautilus-dnd.c +++ b/src/nautilus-dnd.c @@ -332,42 +332,6 @@ nautilus_drag_items_local (const char *target_uri_string, ((NautilusDragSelectionItem *) selection_list->data)->uri); } -gboolean -nautilus_drag_items_on_desktop (const GList *selection_list) -{ - char *uri; - GFile *desktop, *item, *parent; - gboolean result; - - /* check if the first item on the list is in trash. - * FIXME: - * we should really test each item but that would be slow for large selections - * and currently dropped items can only be from the same container - */ - uri = ((NautilusDragSelectionItem *) selection_list->data)->uri; - if (eel_uri_is_desktop (uri)) - { - return TRUE; - } - - desktop = nautilus_get_desktop_location (); - - item = g_file_new_for_uri (uri); - parent = g_file_get_parent (item); - g_object_unref (item); - - result = FALSE; - - if (parent) - { - result = g_file_equal (desktop, parent); - g_object_unref (parent); - } - g_object_unref (desktop); - - return result; -} - GdkDragAction nautilus_drag_default_drop_action_for_netscape_url (GdkDragContext *context) { @@ -535,14 +499,6 @@ nautilus_drag_default_drop_action_for_icons (GdkDragContext *context, dropped_file = ((NautilusDragSelectionItem *) items->data)->file; target_file = nautilus_file_get_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 @@ -567,26 +523,6 @@ nautilus_drag_default_drop_action_for_icons (GdkDragContext *context, nautilus_file_unref (target_file); return; } - else if (eel_uri_is_desktop (target_uri_string)) - { - target = nautilus_get_desktop_location (); - - nautilus_file_unref (target_file); - target_file = nautilus_file_get (target); - - if (eel_uri_is_desktop (dropped_uri)) - { - /* Only move to Desktop icons */ - if (actions & GDK_ACTION_MOVE) - { - *action = GDK_ACTION_MOVE; - } - - g_object_unref (target); - nautilus_file_unref (target_file); - return; - } - } else if (target_file != NULL && nautilus_file_is_archive (target_file)) { *action = GDK_ACTION_COPY; @@ -1050,22 +986,3 @@ nautilus_drag_autoscroll_stop (NautilusDragInfo *drag_info) drag_info->auto_scroll_timeout_id = 0; } } - -gboolean -nautilus_drag_selection_includes_special_link (GList *selection_list) -{ - GList *node; - char *uri; - - for (node = selection_list; node != NULL; node = node->next) - { - uri = ((NautilusDragSelectionItem *) node->data)->uri; - - if (eel_uri_is_desktop (uri)) - { - return TRUE; - } - } - - return FALSE; -} |