Blame SOURCES/nautilus-handle-desktop-link-dnd.patch

01a8e4
From 02cf70bf367f445fd81cf2fd4548f0e6db94f45c Mon Sep 17 00:00:00 2001
01a8e4
From: David King <amigadave@amigadave.com>
01a8e4
Date: Tue, 11 Nov 2014 16:37:05 +0000
01a8e4
Subject: [PATCH] Fix moving desktop link files by drag and drop
01a8e4
01a8e4
Rather than populating the drag data using the activation URI, which for
01a8e4
desktop link files is that of the link destination, do so only for
01a8e4
regular files, and for desktop link files use the real file URI instead.
01a8e4
01a8e4
https://bugzilla.redhat.com/show_bug.cgi?id=1080484
01a8e4
---
01a8e4
 libnautilus-private/nautilus-canvas-dnd.c | 11 +++++++++--
01a8e4
 1 file changed, 9 insertions(+), 2 deletions(-)
01a8e4
01a8e4
diff --git a/libnautilus-private/nautilus-canvas-dnd.c b/libnautilus-private/nautilus-canvas-dnd.c
01a8e4
index 3fd46e7..3fdc8a1 100644
01a8e4
--- a/libnautilus-private/nautilus-canvas-dnd.c
01a8e4
+++ b/libnautilus-private/nautilus-canvas-dnd.c
01a8e4
@@ -237,8 +237,15 @@ icon_get_data_binder (NautilusCanvasIcon *icon, gpointer data)
01a8e4
 
01a8e4
 	uri = nautilus_canvas_container_get_icon_uri (container, icon);
01a8e4
 	if (!eel_uri_is_desktop (uri)) {
01a8e4
-		g_free (uri);
01a8e4
-		uri = nautilus_canvas_container_get_icon_activation_uri (container, icon);
01a8e4
+		NautilusFile *file;
01a8e4
+
01a8e4
+		file = nautilus_file_get_existing_by_uri (uri);
01a8e4
+
01a8e4
+		/* TODO: expose nautilus-file.c:is_desktop_file */
01a8e4
+		if (!nautilus_file_is_mime_type (file, "application/x-desktop")) {
01a8e4
+			g_free (uri);
01a8e4
+			uri = nautilus_canvas_container_get_icon_activation_uri (container, icon);
01a8e4
+		}
01a8e4
 	}
01a8e4
 
01a8e4
 	if (uri == NULL) {
01a8e4
-- 
01a8e4
2.1.0
01a8e4