Backing out 331576 - API not in 10.2 SDK, nothing to link against. Groan.

This commit is contained in:
mark%moxienet.com 2006-04-22 04:12:51 +00:00
Родитель 4139329ea6
Коммит 55f83db68f
2 изменённых файлов: 2 добавлений и 51 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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)