aboutsummaryrefslogtreecommitdiffstats
path: root/main/nautilus/010-localpath-preview.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-04-25 18:06:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-04-25 19:53:02 +0000
commit286429b1aa72ee964ba0cac4b79c754859b1c60a (patch)
tree33c01e6792fd99a430be126c19b9b71947ffd060 /main/nautilus/010-localpath-preview.patch
parent3597c695c8ae4a22da8bd26c363aa8ceae267be3 (diff)
downloadaports-286429b1aa72ee964ba0cac4b79c754859b1c60a.tar.bz2
aports-286429b1aa72ee964ba0cac4b79c754859b1c60a.tar.xz
main/nautilus: upgrade to 2.32.2.1
Diffstat (limited to 'main/nautilus/010-localpath-preview.patch')
-rw-r--r--main/nautilus/010-localpath-preview.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/main/nautilus/010-localpath-preview.patch b/main/nautilus/010-localpath-preview.patch
new file mode 100644
index 0000000000..736559ad92
--- /dev/null
+++ b/main/nautilus/010-localpath-preview.patch
@@ -0,0 +1,46 @@
+From ebcbb167876f8b4491af0bc86bc29015c211b3af Mon Sep 17 00:00:00 2001
+From: Olivier Tilloy <olivier@tilloy.net>
+Date: Tue, 17 Aug 2010 11:42:36 +0000
+Subject: icon-view: if possible, use the local path for the preview (#624841)
+
+This solves issues where the audio previewer is not capable of
+understanding some GVfs URIs.
+---
+diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c
+index 7277a9b..755ed8c 100644
+--- a/src/file-manager/fm-icon-view.c
++++ b/src/file-manager/fm-icon-view.c
+@@ -2027,6 +2027,8 @@ play_file (gpointer callback_data)
+ char **argv;
+ GError *error;
+ char *uri;
++ GFile *gfile;
++ char *path;
+
+ icon_view = FM_ICON_VIEW (callback_data);
+
+@@ -2034,7 +2036,21 @@ play_file (gpointer callback_data)
+ icon_view->details->audio_preview_timeout = 0;
+
+ file = icon_view->details->audio_preview_file;
+- uri = nautilus_file_get_uri (file);
++ gfile = nautilus_file_get_location (file);
++ path = g_file_get_path (gfile);
++
++ /* if we have a local path, use that instead of the native URI.
++ * this can be useful for special GVfs mounts, such as cdda://
++ */
++ if (path) {
++ uri = g_filename_to_uri (path, NULL, NULL);
++ } else {
++ uri = nautilus_file_get_uri (file);
++ }
++
++ g_object_unref (gfile);
++ g_free (path);
++
+ argv = get_preview_argv (uri);
+ g_free (uri);
+ if (argv == NULL) {
+--
+cgit v0.9