[Xfce4-commits] [xfce/thunar] 01/01: Prefer local (file://) URIs than native ones (e.g. smb://) (Bug #13845)
noreply at xfce.org
noreply at xfce.org
Tue Sep 12 04:18:00 CEST 2017
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/thunar.
commit 5f1c0e8974a7680fa45b4cfbd1ba398d303eeb24
Author: Colin Leroy <colin at colino.net>
Date: Fri Sep 8 09:39:29 2017 +0200
Prefer local (file://) URIs than native ones (e.g. smb://) (Bug #13845)
This allows drag and dropping files from network shares in Thunar
to other applications that don't handle native URIs (Claws Mail,
Chromium, Firefox...)
---
thunar/thunar-gio-extensions.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c
index d365d20..9a87091 100644
--- a/thunar/thunar-gio-extensions.c
+++ b/thunar/thunar-gio-extensions.c
@@ -512,7 +512,19 @@ thunar_g_file_list_to_stringv (GList *list)
uris = g_new0 (gchar *, g_list_length (list) + 1);
for (lp = list, n = 0; lp != NULL; lp = lp->next)
- uris[n++] = g_file_get_uri (G_FILE (lp->data));
+ {
+ /* Prefer native paths for interoperability. */
+ gchar *path = g_file_get_path (G_FILE (lp->data));
+ if (path == NULL)
+ {
+ uris[n++] = g_file_get_uri (G_FILE (lp->data));
+ }
+ else
+ {
+ uris[n++] = g_filename_to_uri (path, NULL, NULL);
+ g_free(path);
+ }
+ }
return uris;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list