Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
nautilus
0001-dnd-fix-dnd-issues-with-Type-Link-desktop-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-dnd-fix-dnd-issues-with-Type-Link-desktop-files.patch of Package nautilus
From 88f2321c20e5c7c1dac0f1f8a9b8a007bf82dcb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= <nbenitezl+gnome@gmail.com> Date: Sat, 27 Dec 2014 20:24:56 +0500 Subject: [PATCH 1/2] dnd: fix dnd issues with Type=Link desktop files When creating NautilusDragSelectionItem items for dnd make sure we use regular uri (instead of activation uri) for Type=Link desktop files. Other types of desktop files were not affected by this bug as their regular uri and activation uri are usually the same. Fixes bug 720390 --- libnautilus-private/nautilus-canvas-dnd.c | 6 +++++- src/nautilus-list-view.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libnautilus-private/nautilus-canvas-dnd.c b/libnautilus-private/nautilus-canvas-dnd.c index 3fd46e7..b4da369 100644 --- a/libnautilus-private/nautilus-canvas-dnd.c +++ b/libnautilus-private/nautilus-canvas-dnd.c @@ -224,6 +224,7 @@ icon_get_data_binder (NautilusCanvasIcon *icon, gpointer data) EelIRect widget_rect; char *uri; NautilusCanvasContainer *container; + NautilusFile *file; context = (CanvasGetDataBinderContext *)data; @@ -236,13 +237,15 @@ icon_get_data_binder (NautilusCanvasIcon *icon, gpointer data) canvas_rect_world_to_widget (EEL_CANVAS (container), &world_rect, &widget_rect); uri = nautilus_canvas_container_get_icon_uri (container, icon); - if (!eel_uri_is_desktop (uri)) { + file = nautilus_file_get_by_uri (uri); + if (!eel_uri_is_desktop (uri) && !nautilus_file_is_nautilus_link (file)) { g_free (uri); uri = nautilus_canvas_container_get_icon_activation_uri (container, icon); } if (uri == NULL) { g_warning ("no URI for one of the iterated icons"); + nautilus_file_unref (file); return TRUE; } @@ -262,6 +265,7 @@ icon_get_data_binder (NautilusCanvasIcon *icon, gpointer data) context->iteratee_data); g_free (uri); + nautilus_file_unref (file); return TRUE; } diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c index d1abe48..a7132a6 100644 --- a/src/nautilus-list-view.c +++ b/src/nautilus-list-view.c @@ -464,7 +464,11 @@ item_get_data_binder (GtkTreeModel *model, column, &cell_area); - uri = nautilus_file_get_activation_uri (file); + if (nautilus_file_is_nautilus_link (file)) { + uri = nautilus_file_get_uri (file); + } else { + uri = nautilus_file_get_activation_uri (file); + } nautilus_file_unref (file); /* pass the uri, mouse-relative x/y and icon width/height */ -- 2.1.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor