From 55f83db68f05833c4ace552c4d9331b944e479f7 Mon Sep 17 00:00:00 2001 From: "mark%moxienet.com" Date: Sat, 22 Apr 2006 04:12:51 +0000 Subject: [PATCH] Backing out 331576 - API not in 10.2 SDK, nothing to link against. Groan. --- camino/src/preferences/PreferenceManager.h | 2 - camino/src/preferences/PreferenceManager.mm | 51 +-------------------- 2 files changed, 2 insertions(+), 51 deletions(-) diff --git a/camino/src/preferences/PreferenceManager.h b/camino/src/preferences/PreferenceManager.h index 1b13397d3163..7c79cdc20de8 100644 --- a/camino/src/preferences/PreferenceManager.h +++ b/camino/src/preferences/PreferenceManager.h @@ -80,8 +80,6 @@ extern NSString* const kPrefChangedNotificationName; - (void)setPref:(const char*)prefName toInt:(int)value; - (void)setPref:(const char*)prefName toBoolean:(BOOL)value; -- (void)clearPref:(const char*)prefName; - // the path to the user profile's root folder, used by camino 0.8+ - (NSString*) profilePath; diff --git a/camino/src/preferences/PreferenceManager.mm b/camino/src/preferences/PreferenceManager.mm index dcd69dc4f48c..3aa711f93af5 100644 --- a/camino/src/preferences/PreferenceManager.mm +++ b/camino/src/preferences/PreferenceManager.mm @@ -63,13 +63,6 @@ #include "nsNetUtil.h" #include "nsStaticComponents.h" -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3 -// This long-winded function was introduced in 10.3. That's fine, because -// our minimum runtime is now 10.3, but we're still using the 10.2 SDK so -// it must be declared here. -CFStringRef CFLocaleCreateCanonicalLocaleIdentifierFromString(CFAllocatorRef allocator, CFStringRef localeIdentifier); -#endif - #ifndef _BUILD_STATIC_BIN nsStaticModuleInfo const *const kPStaticModules = nsnull; PRUint32 const kStaticModuleCount = 0; @@ -617,47 +610,13 @@ static BOOL gMadePrefManager; // If we understood all the languages in the list set the accept-language header. // Note that necko will determine quality factors itself. + // If we don't set this we'll fall back to the "en-us, en" default from all-camino.js if (languagesOkaySoFar && [acceptableLanguages count] > 0) { NSString* acceptLangHeader = [acceptableLanguages componentsJoinedByString:@","]; [self setPref:"intl.accept_languages" toString:acceptLangHeader]; } - else { - // Fall back to the "en-us, en" default from all-camino.js - clear - // any existing user pref - [self clearPref:"intl.accept_languages"]; - } } - - // Use the user-selected pref for the user agent locale if it exists - NSString* uaLocale = [self getStringPref:"camino.useragent.locale" - withSuccess:nil]; - - if (![uaLocale length]) { - // Find the active localization nib's name and make sure it's in - // ab or ab-CD form - NSArray* localizations = [[NSBundle mainBundle] preferredLocalizations]; - if ([localizations count]) { - CFStringRef activeLocalization = - ::CFLocaleCreateCanonicalLocaleIdentifierFromString( - NULL, (CFStringRef)[localizations objectAtIndex:0]); - if (activeLocalization) { - uaLocale = [PreferenceManager - convertLocaleToHTTPLanguage:(NSString*)activeLocalization]; - ::CFRelease(activeLocalization); - } - } - } - - if (uaLocale && [uaLocale length]) { - [self setPref:"general.useragent.locale" toString:uaLocale]; - } - else { - NSLog(@"Unable to determine user interface locale\n"); - // Fall back to the "en-US" default from all.js. Clear any existing - // user pref. - [self clearPref:"general.useragent.locale"]; - } - + // load up the default stylesheet (is this the best place to do this?) BOOL prefExists = NO; BOOL enableAdBlocking = [self getBooleanPref:"camino.enable_ad_blocking" withSuccess:&prefExists]; @@ -1003,12 +962,6 @@ typedef enum EProxyConfig { (void)mPrefs->SetBoolPref(prefName, (PRBool)value); } -- (void)clearPref:(const char*)prefName -{ - if (mPrefs) - (void)mPrefs->ClearUserPref(prefName); -} - - (NSString *) homePageUsingStartPage:(BOOL)checkStartupPagePref { if (!mPrefs)