Even more deprecations fixes.
parent
a0afe85130
commit
832fa6dbd0
|
@ -48,7 +48,7 @@
|
|||
if (!type)
|
||||
{
|
||||
ALog(@"GME: No type!");
|
||||
return NO;
|
||||
return nil;
|
||||
}
|
||||
|
||||
Music_Emu* emu;
|
||||
|
@ -56,7 +56,7 @@
|
|||
if (!emu)
|
||||
{
|
||||
ALog(@"GME: No new emu!");
|
||||
return NO;
|
||||
return nil;
|
||||
}
|
||||
|
||||
[source seek:0 whence:SEEK_END];
|
||||
|
@ -68,7 +68,7 @@
|
|||
if (error)
|
||||
{
|
||||
ALog(@"GME: ERROR Loding file!");
|
||||
return NO;
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSURL *m3uurl = [url URLByDeletingPathExtension];
|
||||
|
|
|
@ -112,7 +112,7 @@ void * source_fopen(const char * path)
|
|||
if ( ![[psf_file_container instance] try_hint:[NSString stringWithUTF8String:path] source:&source] )
|
||||
{
|
||||
NSString * urlString = [NSString stringWithUTF8String:path];
|
||||
NSURL * url = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
|
||||
NSURL * url = [NSURL URLWithString:[urlString stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLPathAllowedCharacterSet]];
|
||||
|
||||
id audioSourceClass = NSClassFromString(@"AudioSource");
|
||||
source = [audioSourceClass audioSourceForURL:url];
|
||||
|
@ -1271,7 +1271,7 @@ static int usf_info(void * context, const char * name, const char * value)
|
|||
info.trackPeak = 0;
|
||||
info.volume = 1;
|
||||
|
||||
currentUrl = [[[source url] absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||
currentUrl = [[[source url] absoluteString] stringByRemovingPercentEncoding];
|
||||
|
||||
[[psf_file_container instance] add_hint:currentUrl source:currentSource];
|
||||
hintAdded = YES;
|
||||
|
@ -1706,7 +1706,7 @@ static int usf_info(void * context, const char * name, const char * value)
|
|||
info.tag_length_ms = 0;
|
||||
info.tag_fade_ms = 0;
|
||||
|
||||
NSString * decodedUrl = [[url absoluteString] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||
NSString * decodedUrl = [[url absoluteString] stringByRemovingPercentEncoding];
|
||||
|
||||
psf_load( [decodedUrl UTF8String], &source_callbacks, 0, 0, 0, psf_info_meta, &info, 0 );
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ static SpotlightWindowController * searchController;
|
|||
if (value == nil) return nil;
|
||||
|
||||
// If there's an NS/CFNumber hiding in here...
|
||||
if([value respondsToSelector:@selector(stringValue:)])
|
||||
if([value respondsToSelector:@selector(stringValue)])
|
||||
{
|
||||
return [value stringValue];
|
||||
}
|
||||
|
@ -103,4 +103,4 @@ static SpotlightWindowController * searchController;
|
|||
return value;
|
||||
}
|
||||
|
||||
@end
|
||||
@end
|
||||
|
|
|
@ -203,10 +203,13 @@ typedef id (*myIMP)(id, SEL, ...);
|
|||
}
|
||||
else
|
||||
{
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
alert.messageText = NSLocalizedString(@"InvalidURLShort", @"");
|
||||
alert.informativeText = NSLocalizedString(@"InvalidURLLong", @"");
|
||||
if (mIsSheet)
|
||||
NSRunAlertPanel(NSLocalizedString(@"InvalidURLShort", @""), NSLocalizedString(@"InvalidURLLong", @""), nil, nil, nil);
|
||||
[alert runModal];
|
||||
else
|
||||
NSBeginAlertSheet(NSLocalizedString(@"InvalidURLShort", @""), nil, nil, nil, mPanel, nil, nil, nil, nil, NSLocalizedString(@"InvalidURLLong", @""));
|
||||
[alert beginSheetModalForWindow:mPanel completionHandler:nil];
|
||||
|
||||
informDelegate = NO;
|
||||
}
|
||||
|
@ -240,7 +243,7 @@ typedef id (*myIMP)(id, SEL, ...);
|
|||
[[NSBundle mainBundle] loadNibNamed:@"OpenURLPanel" owner:self topLevelObjects:&objects];
|
||||
|
||||
// start the sheet (or window)
|
||||
[NSApp beginSheet:mPanel modalForWindow:window modalDelegate:nil didEndSelector:nil contextInfo:nil];
|
||||
[window beginSheet:mPanel completionHandler:nil];
|
||||
}
|
||||
|
||||
- (void)close
|
||||
|
|
Loading…
Reference in New Issue