diff --git a/Plugins/GME/GameMetadataReader.m b/Plugins/GME/GameMetadataReader.m index 5c77c6752..810c9fecc 100644 --- a/Plugins/GME/GameMetadataReader.m +++ b/Plugins/GME/GameMetadataReader.m @@ -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]; diff --git a/Plugins/HighlyComplete/HighlyComplete/HCDecoder.mm b/Plugins/HighlyComplete/HighlyComplete/HCDecoder.mm index 11494cd24..dc2d4d0de 100644 --- a/Plugins/HighlyComplete/HighlyComplete/HCDecoder.mm +++ b/Plugins/HighlyComplete/HighlyComplete/HCDecoder.mm @@ -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 ); diff --git a/Spotlight/SpotlightTransformers.m b/Spotlight/SpotlightTransformers.m index dc2eaf472..6839234c1 100644 --- a/Spotlight/SpotlightTransformers.m +++ b/Spotlight/SpotlightTransformers.m @@ -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 \ No newline at end of file +@end diff --git a/ThirdParty/OpenURLPanel/OpenURLPanel.m b/ThirdParty/OpenURLPanel/OpenURLPanel.m index f866580fa..f425ab390 100755 --- a/ThirdParty/OpenURLPanel/OpenURLPanel.m +++ b/ThirdParty/OpenURLPanel/OpenURLPanel.m @@ -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