diff options
author | Thierry Crozat | 2012-11-17 23:31:08 +0000 |
---|---|---|
committer | Thierry Crozat | 2012-11-18 01:29:09 +0000 |
commit | 40941af7b9ffeeee0e328fc86e5749b9043c9113 (patch) | |
tree | 486c0dfb61c60c54622881046bfa9355f875a073 /backends/updates/macosx | |
parent | 5de0d081b7824dc1b398bc20d1b4d113ddc15af1 (diff) | |
download | scummvm-rg350-40941af7b9ffeeee0e328fc86e5749b9043c9113.tar.gz scummvm-rg350-40941af7b9ffeeee0e328fc86e5749b9043c9113.tar.bz2 scummvm-rg350-40941af7b9ffeeee0e328fc86e5749b9043c9113.zip |
OSX: Fix Sparkle compilation on older systems
This patch was provided by fingolfin (see patch #3582260). It replaces
use of methods introduced in MacOS X 10.4 with methods that exists
since MacOS X 10.0.
Diffstat (limited to 'backends/updates/macosx')
-rw-r--r-- | backends/updates/macosx/macosx-updates.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm index 741e89891c..f3b221cabf 100644 --- a/backends/updates/macosx/macosx-updates.mm +++ b/backends/updates/macosx/macosx-updates.mm @@ -59,10 +59,14 @@ MacOSXUpdateManager::MacOSXUpdateManager() { [sparkleUpdater setFeedURL:[NSURL URLWithString:feedbackURL]]; // Get current encoding - NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)[NSString stringWithCString:(TransMan.getCurrentCharset()).c_str() encoding:NSASCIIStringEncoding])); + CFStringRef encStr = CFStringCreateWithCString(NULL, TransMan.getCurrentCharset().c_str(), kCFStringEncodingASCII); + CFStringEncoding stringEncoding = CFStringConvertIANACharSetNameToEncoding(encStr); + CFRelease(encStr); // Add "Check for Updates..." menu item - NSMenuItem *updateMenuItem = [applicationMenu insertItemWithTitle:[NSString stringWithCString:_("Check for Updates...") encoding:stringEncoding] action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1]; + CFStringRef title = CFStringCreateWithCString(NULL, _("Check for Updates..."), stringEncoding); + NSMenuItem *updateMenuItem = [applicationMenu insertItemWithTitle:(NSString *)title action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1]; + CFRelease(title); // Set the target of the new menu item [updateMenuItem setTarget:sparkleUpdater]; |