[vlc-commits] macosx gui: use vlc_path2uri.

Konstantin Pavlov git at videolan.org
Tue Aug 21 15:29:39 CEST 2012


vlc | branch: master | Konstantin Pavlov <thresh at videolan.org> | Tue Aug 21 15:19:50 2012 +0400| [0db4200314dc7e87c9845f639a45d5ce22299872] | committer: Konstantin Pavlov

macosx gui: use vlc_path2uri.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0db4200314dc7e87c9845f639a45d5ce22299872
---

 modules/gui/macosx/ConvertAndSave.m  |    4 ++--
 modules/gui/macosx/CoreInteraction.m |    4 ++--
 modules/gui/macosx/MainWindow.m      |    2 +-
 modules/gui/macosx/intf.m            |    4 ++--
 modules/gui/macosx/open.m            |    4 ++--
 modules/gui/macosx/playlist.m        |    4 ++--
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/modules/gui/macosx/ConvertAndSave.m b/modules/gui/macosx/ConvertAndSave.m
index 0c51b99..f01d9cd 100644
--- a/modules/gui/macosx/ConvertAndSave.m
+++ b/modules/gui/macosx/ConvertAndSave.m
@@ -305,7 +305,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
 {
     if (returnCode == NSOKButton)
     {
-        [self setMRL: [NSString stringWithUTF8String:make_URI([[[panel URL] path] UTF8String], NULL)]];
+        [self setMRL: [NSString stringWithUTF8String:vlc_path2uri([[[panel URL] path] UTF8String], NULL)]];
         [self updateOKButton];
         [self updateDropView];
     }
@@ -530,7 +530,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
             NSArray *values = [[paste propertyListForType: NSFilenamesPboardType] sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
 
             if ([values count] > 0) {
-                [self setMRL: [NSString stringWithUTF8String:make_URI([[values objectAtIndex:0] UTF8String], NULL)]];
+                [self setMRL: [NSString stringWithUTF8String:vlc_path2uri([[values objectAtIndex:0] UTF8String], NULL)]];
                 [self updateOKButton];
                 [self updateDropView];
                 return YES;
diff --git a/modules/gui/macosx/CoreInteraction.m b/modules/gui/macosx/CoreInteraction.m
index 8a88e79..9c82083 100644
--- a/modules/gui/macosx/CoreInteraction.m
+++ b/modules/gui/macosx/CoreInteraction.m
@@ -553,7 +553,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
 
             if( count == 1 && p_input )
             {
-                b_returned = input_AddSubtitle( p_input, make_URI([[o_values objectAtIndex:0] UTF8String], NULL), true );
+                b_returned = input_AddSubtitle( p_input, vlc_path2uri([[o_values objectAtIndex:0] UTF8String], NULL), true );
                 vlc_object_release( p_input );
                 if( !b_returned )
                     return YES;
@@ -564,7 +564,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
             for( NSUInteger i = 0; i < count; i++)
             {
                 NSDictionary *o_dic;
-                char *psz_uri = make_URI([[o_values objectAtIndex:i] UTF8String], NULL);
+                char *psz_uri = vlc_path2uri([[o_values objectAtIndex:i] UTF8String], NULL);
                 if( !psz_uri )
                     continue;
 
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 95f2c23..0f59ca6 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -2743,7 +2743,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
         for( NSUInteger i = 0; i < count; i++)
         {
             NSDictionary *o_dic;
-            char *psz_uri = make_URI([[o_values objectAtIndex:i] UTF8String], NULL);
+            char *psz_uri = vlc_path2uri([[o_values objectAtIndex:i] UTF8String], NULL);
             if( !psz_uri )
                 continue;
 
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 1e72f49..50ef643 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -918,7 +918,7 @@ static VLCMain *_o_sharedMainInstance = nil;
 - (void)application:(NSApplication *)o_app openFiles:(NSArray *)o_names
 {
     BOOL b_autoplay = config_GetInt( VLCIntf, "macosx-autoplay" );
-    char *psz_uri = make_URI([[o_names objectAtIndex:0] UTF8String], "file" );
+    char *psz_uri = vlc_path2uri([[o_names objectAtIndex:0] UTF8String], "file" );
 
     // try to add file as subtitle
     if( [o_names count] == 1 && psz_uri )
@@ -942,7 +942,7 @@ static VLCMain *_o_sharedMainInstance = nil;
     NSMutableArray *o_result = [NSMutableArray arrayWithCapacity: [o_sorted_names count]];
     for( int i = 0; i < [o_sorted_names count]; i++ )
     {
-        psz_uri = make_URI([[o_sorted_names objectAtIndex: i] UTF8String], "file" );
+        psz_uri = vlc_path2uri([[o_sorted_names objectAtIndex: i] UTF8String], "file" );
         if( !psz_uri )
             continue;
 
diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index 6f7d4b8..6f7078e 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -670,7 +670,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
         for( NSUInteger i = 0; i < count; i++ )
         {
             NSDictionary *o_dic;
-            char *psz_uri = make_URI([[o_values objectAtIndex:i] UTF8String], "file");
+            char *psz_uri = vlc_path2uri([[o_values objectAtIndex:i] UTF8String], "file");
             if( !psz_uri )
                 continue;
 
@@ -699,7 +699,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
 
         [[NSFileManager defaultManager] fileExistsAtPath:o_file_path isDirectory:&b_dir];
 
-        char *psz_uri = make_URI([o_file_path UTF8String], "file");
+        char *psz_uri = vlc_path2uri([o_file_path UTF8String], "file");
         if( !psz_uri ) return;
 
         NSMutableString *o_mrl_string = [NSMutableString stringWithUTF8String: psz_uri ];
diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index cc15f2e..9f42b17 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -1721,7 +1721,7 @@
 
         if (count == 1 && p_input)
         {
-            b_returned = input_AddSubtitle( p_input, make_URI([[o_values objectAtIndex:0] UTF8String], NULL), true );
+            b_returned = input_AddSubtitle( p_input, vlc_path2uri([[o_values objectAtIndex:0] UTF8String], NULL), true );
             vlc_object_release( p_input );
             if(!b_returned)
                 return YES;
@@ -1732,7 +1732,7 @@
         for( NSUInteger i = 0; i < count; i++)
         {
             NSDictionary *o_dic;
-            char *psz_uri = make_URI([[o_values objectAtIndex:i] UTF8String], NULL);
+            char *psz_uri = vlc_path2uri([[o_values objectAtIndex:i] UTF8String], NULL);
             if( !psz_uri )
                 continue;
 



More information about the vlc-commits mailing list