Commit 22647270 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Fix regression in the default dnd type. We don't want to look recursively

2009-04-06  Alexander Larsson  <alexl@redhat.com>

	* libnautilus-private/nautilus-dnd.c:
	(nautilus_drag_default_drop_action_for_icons):
	Fix regression in the default dnd type. We don't
	want to look recursively for the parent.
	See https://bugzilla.redhat.com/show_bug.cgi?id=456515
	for details.


svn path=/trunk/; revision=15163
parent c9eb863b
2009-04-06 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-dnd.c:
(nautilus_drag_default_drop_action_for_icons):
Fix regression in the default dnd type. We don't
want to look recursively for the parent.
See https://bugzilla.redhat.com/show_bug.cgi?id=456515
for details.
2009-04-02 Alexander Larsson <alexl@redhat.com>
* configure.in:
......
......@@ -437,7 +437,7 @@ nautilus_drag_default_drop_action_for_icons (GdkDragContext *context,
gboolean target_is_source_parent;
gboolean source_deletable;
const char *dropped_uri;
GFile *target, *dropped;
GFile *target, *dropped, *dropped_directory;
GdkDragAction actions;
NautilusFile *dropped_file, *target_file;
......@@ -519,7 +519,16 @@ nautilus_drag_default_drop_action_for_icons (GdkDragContext *context,
/* Compare the first dropped uri with the target uri for same fs match. */
dropped = g_file_new_for_uri (dropped_uri);
target_is_source_parent = g_file_has_prefix (dropped, target);
dropped_directory = g_file_get_parent (dropped);
target_is_source_parent = FALSE;
if (dropped_directory != NULL) {
/* If the dropped file is already in the same directory but
is in another filesystem we still want to move, not copy
as this is then just a move of a mountpoint to another
position in the dir */
target_is_source_parent = g_file_equal (dropped_directory, target);
g_object_unref (dropped_directory);
}
source_deletable = source_is_deletable (dropped);
if ((same_fs && source_deletable) || target_is_source_parent ||
......
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