summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neumair <chris@gnome-de.org>2005-07-28 12:26:17 +0000
committerChristian Neumair <cneumair@src.gnome.org>2005-07-28 12:26:17 +0000
commit1f85a7b419ea61c5355c3e0061dc1d20309ca338 (patch)
treeacabe95b31f1ab0b0c9bc4b00007e080b6eea8e6
parent577f0ab0ba16ad5fae4d3a682b14ce14fa30efb9 (diff)
downloadnautilus-1f85a7b419ea61c5355c3e0061dc1d20309ca338.tar.gz
Default to move action for locations on other file systems if they should
2005-07-28 Christian Neumair <chris@gnome-de.org> * src/nautilus-dnd.c: (nautilus_drag_default_drop_action_for_icons): Default to move action for locations on other file systems if they should be moved to their parent folder. Fixes #61269.
-rw-r--r--ChangeLog6
-rw-r--r--libnautilus-private/nautilus-dnd.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index dcacee441..bcef40f06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-07-28 Christian Neumair <chris@gnome-de.org>
+
+ * src/nautilus-dnd.c: (nautilus_drag_default_drop_action_for_icons):
+ Default to move action for locations on other file systems if they
+ should be moved to their parent folder. Fixes #61269.
+
2005-07-26 Martin Wehner <martin.wehner@gmail.com>
* src/nautilus-pathbar.c: (get_display_name_for_folder):
diff --git a/libnautilus-private/nautilus-dnd.c b/libnautilus-private/nautilus-dnd.c
index f7083a9d8..975082f8b 100644
--- a/libnautilus-private/nautilus-dnd.c
+++ b/libnautilus-private/nautilus-dnd.c
@@ -309,6 +309,7 @@ nautilus_drag_default_drop_action_for_icons (GdkDragContext *context,
int *action)
{
gboolean same_fs;
+ gboolean target_is_source_parent;
GnomeVFSURI *target_uri;
GnomeVFSURI *dropped_uri;
GdkDragAction actions;
@@ -379,14 +380,16 @@ nautilus_drag_default_drop_action_for_icons (GdkDragContext *context,
/* Compare the first dropped uri with the target uri for same fs match. */
dropped_uri = gnome_vfs_uri_new (((NautilusDragSelectionItem *)items->data)->uri);
same_fs = TRUE;
+ target_is_source_parent = FALSE;
if (dropped_uri != NULL) {
gnome_vfs_check_same_fs_uris (dropped_uri, target_uri, &same_fs);
+ target_is_source_parent = gnome_vfs_uri_is_parent (target_uri, dropped_uri, FALSE);
gnome_vfs_uri_unref (dropped_uri);
}
gnome_vfs_uri_unref (target_uri);
- if (same_fs) {
+ if (same_fs || target_is_source_parent) {
if (actions & GDK_ACTION_MOVE) {
*action = GDK_ACTION_MOVE;
} else {