Commit 0db42003 authored by Konstantin Pavlov's avatar Konstantin Pavlov

macosx gui: use vlc_path2uri.

parent c57446ee
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 ];
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment