[vlc-commits] macosx: fix drag & drop / double-clicks in Finder to open subtitles files (close #9953)

Felix Paul Kühne git at videolan.org
Sun Nov 24 21:00:06 CET 2013


vlc/vlc-2.1 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Nov 24 20:56:36 2013 +0100| [628a8e751a15ac3becbaa7f15646c0d2a01ebcce] | committer: Felix Paul Kühne

macosx: fix drag & drop / double-clicks in Finder to open subtitles files (close #9953)

(cherry picked from commit 2604049f04c78e0b586d04f780f01d728feb0618)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=628a8e751a15ac3becbaa7f15646c0d2a01ebcce
---

 NEWS                      |    1 +
 modules/gui/macosx/intf.m |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 56571b6..e3b5ead 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Decoders:
 Mac OS X interface:
  * Fix issue which prevented to enable more than one video filter on Mavericks
  * Fix an issue which could prevent automatic UI language settings from working
+ * Fix opening subtitles files through drag & drop or double-clicking
  * Option to control VLC's iTunes pausing behavior is more easy to find
  * Improved UI resetting when requested in the preferences
 
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 59fb2e1..6ca0e1c 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1064,7 +1064,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 
 - (void)application:(NSApplication *)o_app openFiles:(NSArray *)o_names
 {
-    char *psz_uri = vlc_path2uri([[o_names objectAtIndex:0] UTF8String], "file");
+    char *psz_uri = vlc_path2uri([[o_names objectAtIndex:0] UTF8String], NULL);
 
     if (launched == NO) {
         if (items_at_launch) {
@@ -1082,7 +1082,7 @@ static VLCMain *_o_sharedMainInstance = nil;
         input_thread_t * p_input = pl_CurrentInput(VLCIntf);
         if (p_input) {
             BOOL b_returned = NO;
-            b_returned = input_AddSubtitle(p_input, psz_uri, true);
+            b_returned = input_AddSubtitle(p_input, [[o_names objectAtIndex:0] UTF8String], true);
             vlc_object_release(p_input);
             if (!b_returned) {
                 free(psz_uri);



More information about the vlc-commits mailing list