diff --git a/mozilla/camino/Camino.xcode/project.pbxproj b/mozilla/camino/Camino.xcode/project.pbxproj index 40dff06dda7..7401fb79fb0 100644 --- a/mozilla/camino/Camino.xcode/project.pbxproj +++ b/mozilla/camino/Camino.xcode/project.pbxproj @@ -109,6 +109,284 @@ settings = { }; }; + 035A4971079DC83D0084B05F = { + buildActionMask = 2147483647; + files = ( + 035A498B079DCA100084B05F, + 035A498D079DCA100084B05F, + 035A4990079DCA100084B05F, + ); + isa = PBXResourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 035A4972079DC83D0084B05F = { + buildActionMask = 2147483647; + files = ( + 035A4999079DCACD0084B05F, + 035A498F079DCA100084B05F, + ); + isa = PBXSourcesBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 035A4973079DC83D0084B05F = { + buildActionMask = 2147483647; + files = ( + 035A4AA0079DCB0B0084B05F, + 035A4AA1079DCB0B0084B05F, + 035A4AA2079DCB0B0084B05F, + 035A4AA3079DCB0B0084B05F, + ); + isa = PBXFrameworksBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 035A4974079DC83D0084B05F = { + buildPhases = ( + 035A4991079DCA720084B05F, + 035A4971079DC83D0084B05F, + 035A4972079DC83D0084B05F, + 035A4973079DC83D0084B05F, + ); + buildRules = ( + ); + buildSettings = { + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = src/includes/ChimeraPrefix.h; + HEADER_SEARCH_PATHS = "../dist/include/nkcache ../dist/include/webbrwsr ../dist/include/dom ../dist/include/nspr ../dist/include/string ../dist/include/rdf ../dist/include/necko ../dist/include/find ../dist/include/embed_base ../dist/include/windowwatcher ../dist/include/webshell ../dist/include/widget ../dist/include/uriloader ../dist/include/docshell ../dist/include/profile ../dist/include/layout ../dist/include/content ../dist/include/webbrowserpersist ../dist/include/pref ../dist/include/mimetype ../dist/include/shistory ../dist/include/history ../dist/include/view ../dist/include/gfx ../dist/include/xultmpl ../dist/include/xmlextras ../dist/include/htmlparser ../dist/include/locale ../dist/include/unicharutil ../dist/include/appcomps ../dist/include/xpcom ../dist/include/ $(SYSTEM_DEVELOPER_DIR)/Headers/FlatCarbon"; + INFOPLIST_FILE = "Info-HistoryPrefPane.plist"; + INSTALL_PATH = "$(USER_LIBRARY_DIR)/Bundles"; + LIBRARY_SEARCH_PATHS = "../dist/bin ../dist/lib ../intl/unicharutil/util"; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = "-bundle -lxpcom -lxpcom_core -lplds4 -lplc4 -lnspr4 -lpthread -lm"; + OTHER_REZFLAGS = ""; + PRODUCT_NAME = History; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"; + WRAPPER_EXTENSION = prefPane; + }; + dependencies = ( + ); + isa = PBXNativeTarget; + name = HistoryPrefPane; + productName = HistoryPrefPane; + productReference = 035A4975079DC83D0084B05F; + productSettingsXML = " + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + HistoryPrefPane + CFBundleIdentifier + com.yourcompany.HistoryPrefPane + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + + +"; + productType = "com.apple.product-type.bundle"; + }; + 035A4975079DC83D0084B05F = { + explicitFileType = wrapper.cfbundle; + includeInIndex = 0; + isa = PBXFileReference; + path = History.prefPane; + refType = 3; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 035A4976079DC83E0084B05F = { + isa = PBXFileReference; + lastKnownFileType = text.xml; + name = "Info-HistoryPrefPane.plist"; + path = "/Users/josh/src/Camino_Project/camino_opt/mozilla/camino/Info-HistoryPrefPane.plist"; + refType = 0; + sourceTree = ""; + }; + 035A4981079DCA100084B05F = { + children = ( + 035A4982079DCA100084B05F, + 035A4986079DCA100084B05F, + 035A4988079DCA100084B05F, + 035A4989079DCA100084B05F, + 035A498A079DCA100084B05F, + ); + isa = PBXGroup; + name = History; + path = ../../PreferencePanes/History; + refType = 4; + sourceTree = ""; + }; + 035A4982079DCA100084B05F = { + children = ( + 035A4983079DCA100084B05F, + ); + isa = PBXVariantGroup; + name = History.nib; + path = ""; + refType = 4; + sourceTree = ""; + }; + 035A4983079DCA100084B05F = { + isa = PBXFileReference; + lastKnownFileType = wrapper.nib; + name = English; + path = English.lproj/History.nib; + refType = 4; + sourceTree = ""; + }; + 035A4986079DCA100084B05F = { + children = ( + 035A4987079DCA100084B05F, + ); + isa = PBXVariantGroup; + name = Localizable.strings; + path = ""; + refType = 4; + sourceTree = ""; + }; + 035A4987079DCA100084B05F = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = text.plist.strings; + name = English; + path = English.lproj/Localizable.strings; + refType = 4; + sourceTree = ""; + }; + 035A4988079DCA100084B05F = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + path = History.h; + refType = 4; + sourceTree = ""; + }; + 035A4989079DCA100084B05F = { + fileEncoding = 30; + isa = PBXFileReference; + lastKnownFileType = sourcecode.cpp.objcpp; + path = History.mm; + refType = 4; + sourceTree = ""; + }; + 035A498A079DCA100084B05F = { + isa = PBXFileReference; + lastKnownFileType = image.tiff; + path = History.tiff; + refType = 4; + sourceTree = ""; + }; + 035A498B079DCA100084B05F = { + fileRef = 035A4982079DCA100084B05F; + isa = PBXBuildFile; + settings = { + }; + }; + 035A498D079DCA100084B05F = { + fileRef = 035A4986079DCA100084B05F; + isa = PBXBuildFile; + settings = { + }; + }; + 035A498E079DCA100084B05F = { + fileRef = 035A4988079DCA100084B05F; + isa = PBXBuildFile; + settings = { + }; + }; + 035A498F079DCA100084B05F = { + fileRef = 035A4989079DCA100084B05F; + isa = PBXBuildFile; + settings = { + }; + }; + 035A4990079DCA100084B05F = { + fileRef = 035A498A079DCA100084B05F; + isa = PBXBuildFile; + settings = { + }; + }; + 035A4991079DCA720084B05F = { + buildActionMask = 2147483647; + files = ( + 035A4992079DCA8A0084B05F, + 035A498E079DCA100084B05F, + ); + isa = PBXHeadersBuildPhase; + runOnlyForDeploymentPostprocessing = 0; + }; + 035A4992079DCA8A0084B05F = { + fileRef = F5A8CE4102DFEF4C013CA8EC; + isa = PBXBuildFile; + settings = { + }; + }; + 035A4999079DCACD0084B05F = { + fileRef = F5A8CE4202DFEF4C013CA8EC; + isa = PBXBuildFile; + settings = { + }; + }; + 035A4AA0079DCB0B0084B05F = { + fileRef = 1058C7A1FEA54F0111CA2CBB; + isa = PBXBuildFile; + settings = { + }; + }; + 035A4AA1079DCB0B0084B05F = { + fileRef = F557193A022B4102010001CA; + isa = PBXBuildFile; + settings = { + }; + }; + 035A4AA2079DCB0B0084B05F = { + fileRef = F52D5CDB027D412A01A80166; + isa = PBXBuildFile; + settings = { + }; + }; + 035A4AA3079DCB0B0084B05F = { + fileRef = 29B97325FDCFA39411CA2CEA; + isa = PBXBuildFile; + settings = { + }; + }; + 035A4AA4079DCB790084B05F = { + fileRef = 035A4975079DC83D0084B05F; + isa = PBXBuildFile; + settings = { + }; + }; + 0380F470079DCCD90065A7AB = { + containerPortal = 29B97313FDCFA39411CA2CEA; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = 035A4974079DC83D0084B05F; + remoteInfo = HistoryPrefPane; + }; + 0380F471079DCCD90065A7AB = { + isa = PBXTargetDependency; + target = 035A4974079DC83D0084B05F; + targetProxy = 0380F470079DCCD90065A7AB; + }; + 0380F472079DCCEC0065A7AB = { + containerPortal = 29B97313FDCFA39411CA2CEA; + isa = PBXContainerItemProxy; + proxyType = 1; + remoteGlobalIDString = 035A4974079DC83D0084B05F; + remoteInfo = HistoryPrefPane; + }; + 0380F473079DCCEC0065A7AB = { + isa = PBXTargetDependency; + target = 035A4974079DC83D0084B05F; + targetProxy = 0380F472079DCCEC0065A7AB; + }; 0382B4D907303CCA00A0228A = { isa = PBXFileReference; lastKnownFileType = image.tiff; @@ -1124,6 +1402,7 @@ 3F44AFD405BDFBA100CB4B08, 03E2D8530771F73F00BD2443, 03C5AB1007722DFC00EAF77D, + 035A4975079DC83D0084B05F, ); isa = PBXGroup; name = Products; @@ -1174,6 +1453,7 @@ 3F44AFC805BDFBA100CB4B08, 03E2D8520771F73F00BD2443, 03C5AB0F07722DFC00EAF77D, + 035A4974079DC83D0084B05F, ); }; 29B97314FDCFA39411CA2CEA = { @@ -1888,6 +2168,7 @@ 3F44AFE005BDFBA100CB4B08, 03E2D9900771FB9300BD2443, 03C5AB1307722EFC00EAF77D, + 0380F471079DCCD90065A7AB, ); isa = PBXNativeTarget; name = Camino; @@ -4699,6 +4980,7 @@ 3F44AFF205BDFBA100CB4B08, 03E2D9920771FBD400BD2443, 03C5AB1907722F3400EAF77D, + 035A4AA4079DCB790084B05F, ); isa = PBXCopyFilesBuildPhase; runOnlyForDeploymentPostprocessing = 0; @@ -5815,6 +6097,7 @@ 3F44AFEC05BDFBA100CB4B08, 03C5AB1507722F1100EAF77D, 03C5AB1707722F1100EAF77D, + 0380F473079DCCEC0065A7AB, ); isa = PBXNativeTarget; name = CaminoStatic; @@ -9762,6 +10045,7 @@ 3F44AFD305BDFBA100CB4B08, 03E2D8540771F73F00BD2443, 03C5AB1107722DFD00EAF77D, + 035A4976079DC83E0084B05F, ); isa = PBXGroup; name = "Target Plists"; @@ -12707,6 +12991,7 @@ }; F53F21EB022B7C77010001CA = { children = ( + 035A4981079DCA100084B05F, 032FFDCC077351A800440548, 03E2D8590771F78500BD2443, F5CA1A1D02D4ECDA01F34900, diff --git a/mozilla/camino/PreferencePanes/History/English.lproj/History.nib/classes.nib b/mozilla/camino/PreferencePanes/History/English.lproj/History.nib/classes.nib new file mode 100644 index 00000000000..cd4aac2df4d --- /dev/null +++ b/mozilla/camino/PreferencePanes/History/English.lproj/History.nib/classes.nib @@ -0,0 +1,25 @@ +{ + IBClasses = ( + {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, + { + CLASS = NSPreferencePane; + LANGUAGE = ObjC; + OUTLETS = { + "_firstKeyView" = NSView; + "_initialKeyView" = NSView; + "_lastKeyView" = NSView; + "_window" = NSWindow; + }; + SUPERCLASS = NSObject; + }, + { + ACTIONS = {clearDiskCache = id; clearGlobalHistory = id; historyDaysModified = id; }; + CLASS = OrgMozillaChimeraPreferenceHistory; + LANGUAGE = ObjC; + OUTLETS = {textFieldHistoryDays = NSTextField; }; + SUPERCLASS = PreferencePaneBase; + }, + {CLASS = PreferencePaneBase; LANGUAGE = ObjC; SUPERCLASS = NSPreferencePane; } + ); + IBVersion = 1; +} \ No newline at end of file diff --git a/mozilla/camino/PreferencePanes/History/English.lproj/History.nib/info.nib b/mozilla/camino/PreferencePanes/History/English.lproj/History.nib/info.nib new file mode 100644 index 00000000000..cddb067fe0a --- /dev/null +++ b/mozilla/camino/PreferencePanes/History/English.lproj/History.nib/info.nib @@ -0,0 +1,16 @@ + + + + + IBDocumentLocation + 111 35 522 320 0 0 1920 1178 + IBFramework Version + 364.0 + IBOpenObjects + + 5 + + IBSystem Version + 7S215 + + diff --git a/mozilla/camino/PreferencePanes/History/English.lproj/History.nib/keyedobjects.nib b/mozilla/camino/PreferencePanes/History/English.lproj/History.nib/keyedobjects.nib new file mode 100644 index 00000000000..0adfaefc459 Binary files /dev/null and b/mozilla/camino/PreferencePanes/History/English.lproj/History.nib/keyedobjects.nib differ diff --git a/mozilla/camino/PreferencePanes/History/English.lproj/Localizable.strings b/mozilla/camino/PreferencePanes/History/English.lproj/Localizable.strings new file mode 100644 index 00000000000..03755554a02 Binary files /dev/null and b/mozilla/camino/PreferencePanes/History/English.lproj/Localizable.strings differ diff --git a/mozilla/camino/PreferencePanes/History/History.h b/mozilla/camino/PreferencePanes/History/History.h new file mode 100644 index 00000000000..0d464946208 --- /dev/null +++ b/mozilla/camino/PreferencePanes/History/History.h @@ -0,0 +1,37 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- +* +* The contents of this file are subject to the Mozilla Public +* License Version 1.1 (the "License"); you may not use this file +* except in compliance with the License. You may obtain a copy of +* the License at http://www.mozilla.org/MPL/ +* +* Software distributed under the License is distributed on an "AS +* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +* implied. See the License for the specific language governing +* rights and limitations under the License. +* +* The Original Code is the Mozilla browser. +* +* The Initial Developer of the Original Code is Netscape +* Communications Corporation. Portions created by Netscape are +* Copyright (C) 2002 Netscape Communications Corporation. All +* Rights Reserved. +* +* Contributor(s): +* william@dell.wisner.name (William Dell Wisner) +* joshmoz@gmail.com (Josh Aas) +*/ + +#import +#import + +@interface OrgMozillaChimeraPreferenceHistory : PreferencePaneBase +{ + IBOutlet NSTextField *textFieldHistoryDays; +} + +- (IBAction)historyDaysModified:(id)sender; +- (IBAction)clearGlobalHistory:(id)sender; +- (IBAction)clearDiskCache:(id)aSender; + +@end diff --git a/mozilla/camino/PreferencePanes/History/History.mm b/mozilla/camino/PreferencePanes/History/History.mm new file mode 100644 index 00000000000..ea7ecf134d5 --- /dev/null +++ b/mozilla/camino/PreferencePanes/History/History.mm @@ -0,0 +1,97 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- +* +* The contents of this file are subject to the Mozilla Public +* License Version 1.1 (the "License"); you may not use this file +* except in compliance with the License. You may obtain a copy of +* the License at http://www.mozilla.org/MPL/ +* +* Software distributed under the License is distributed on an "AS +* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +* implied. See the License for the specific language governing +* rights and limitations under the License. +* +* The Original Code is the Mozilla browser. +* +* The Initial Developer of the Original Code is Netscape +* Communications Corporation. Portions created by Netscape are +* Copyright (C) 2002 Netscape Communications Corporation. All +* Rights Reserved. +* +* Contributor(s): +* william@dell.wisner.name (William Dell Wisner) +* joshmoz@gmail.com (Josh Aas) +*/ + +#import "History.h" + +#include "nsCOMPtr.h" +#include "nsIServiceManager.h" +#include "nsIBrowserHistory.h" +#include "nsICacheService.h" + +const int kDefaultExpireDays = 9; + +@implementation OrgMozillaChimeraPreferenceHistory + +- (id)initWithBundle:(NSBundle *)bundle +{ + self = [super initWithBundle:bundle]; + return self; +} + +- (void)dealloc +{ + [super dealloc]; +} + +- (void)mainViewDidLoad +{ + if (!mPrefService) + return; + + BOOL gotPref; + int expireDays = [self getIntPref:"browser.history_expire_days" withSuccess:&gotPref]; + if (!gotPref) + expireDays = kDefaultExpireDays; + + [textFieldHistoryDays setIntValue:expireDays]; +} + +- (IBAction)historyDaysModified:(id)sender +{ + if (!mPrefService) + return; + + if (sender == textFieldHistoryDays) { + // If any non-numeric characters were entered make some noise and spit it out. + if (([[textFieldHistoryDays stringValue] rangeOfCharacterFromSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]]).length) { + BOOL gotPref; + int prefValue = [self getIntPref:"browser.history_expire_days" withSuccess:&gotPref]; + if (!gotPref) + prefValue = kDefaultExpireDays; + [textFieldHistoryDays setIntValue:prefValue]; + NSBeep (); + return; + } + } + + [self setPref:"browser.history_expire_days" toInt:[sender intValue]]; +} + +// Clear the user's disk cache +-(IBAction) clearDiskCache:(id)aSender +{ + nsCOMPtr cacheServ ( do_GetService("@mozilla.org/network/cache-service;1") ); + if ( cacheServ ) + cacheServ->EvictEntries(nsICache::STORE_ANYWHERE); +} + +// use the browser history service to clear out the user's global history +- (IBAction)clearGlobalHistory:(id)sender +{ + nsCOMPtr hist ( do_GetService("@mozilla.org/browser/global-history;2") ); + if ( hist ) + hist->RemoveAllPages(); +} + +@end diff --git a/mozilla/camino/PreferencePanes/History/History.tiff b/mozilla/camino/PreferencePanes/History/History.tiff new file mode 100644 index 00000000000..85b58107364 Binary files /dev/null and b/mozilla/camino/PreferencePanes/History/History.tiff differ diff --git a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib index dd2acd223f6..d76a6cae30e 100644 --- a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib +++ b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/classes.nib @@ -13,20 +13,13 @@ SUPERCLASS = NSObject; }, { - ACTIONS = { - checkboxStartPageClicked = id; - checkboxUseSystemHomePageClicked = id; - clearDiskCache = id; - clearGlobalHistory = id; - historyDaysModified = id; - }; + ACTIONS = {checkboxStartPageClicked = id; checkboxUseSystemHomePageClicked = id; }; CLASS = OrgMozillaChimeraPreferenceNavigation; LANGUAGE = ObjC; OUTLETS = { checkboxNewTabBlank = NSButton; checkboxNewWindowBlank = NSButton; checkboxUseSystemHomePage = NSButton; - textFieldHistoryDays = NSTextField; textFieldHomePage = NSTextField; }; SUPERCLASS = PreferencePaneBase; diff --git a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib index 8a2a181cd24..241402ec34c 100644 --- a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib +++ b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib @@ -3,20 +3,13 @@ IBDocumentLocation - 140 56 522 320 0 0 1280 1002 + 257 71 522 320 0 0 1920 1178 IBFramework Version 364.0 - IBGroupedObjects - - 8 - - 331 - 321 - 334 - - - IBLastGroupID - 9 + IBOpenObjects + + 5 + IBSystem Version 7S215 diff --git a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/keyedobjects.nib b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/keyedobjects.nib index de2287f9673..a015d298c16 100644 Binary files a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/keyedobjects.nib and b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/keyedobjects.nib differ diff --git a/mozilla/camino/PreferencePanes/Navigation/Navigation.h b/mozilla/camino/PreferencePanes/Navigation/Navigation.h index 3606f0ae57b..2b14432f63f 100644 --- a/mozilla/camino/PreferencePanes/Navigation/Navigation.h +++ b/mozilla/camino/PreferencePanes/Navigation/Navigation.h @@ -30,14 +30,9 @@ IBOutlet NSButton *checkboxUseSystemHomePage; IBOutlet NSButton *checkboxNewTabBlank; IBOutlet NSButton *checkboxNewWindowBlank; - - IBOutlet NSTextField *textFieldHistoryDays; } - (IBAction)checkboxUseSystemHomePageClicked:(id)sender; - (IBAction)checkboxStartPageClicked:(id)sender; -- (IBAction)historyDaysModified:(id)sender; -- (IBAction)clearGlobalHistory:(id)sender; -- (IBAction)clearDiskCache:(id)aSender; @end diff --git a/mozilla/camino/PreferencePanes/Navigation/Navigation.mm b/mozilla/camino/PreferencePanes/Navigation/Navigation.mm index 985c108fc27..6d8f46758d1 100644 --- a/mozilla/camino/PreferencePanes/Navigation/Navigation.mm +++ b/mozilla/camino/PreferencePanes/Navigation/Navigation.mm @@ -19,6 +19,7 @@ * * Contributor(s): * william@dell.wisner.name (William Dell Wisner) +* joshmoz@gmail.com (Josh Aas) */ #import @@ -27,11 +28,6 @@ #import "Navigation.h" #import "NSString+Utils.h" -#include "nsCOMPtr.h" -#include "nsIServiceManager.h" -#include "nsIBrowserHistory.h" -#include "nsICacheService.h" - const int kDefaultExpireDays = 9; @interface OrgMozillaChimeraPreferenceNavigation(Private) @@ -42,7 +38,6 @@ const int kDefaultExpireDays = 9; @end - @implementation OrgMozillaChimeraPreferenceNavigation - (id)initWithBundle:(NSBundle *)bundle @@ -70,19 +65,13 @@ const int kDefaultExpireDays = 9; if (([self getIntPref:"browser.tabs.startPage" withSuccess:&gotPref] == 1)) [checkboxNewTabBlank setState:YES]; - - int expireDays = [self getIntPref:"browser.history_expire_days" withSuccess:&gotPref]; - if (!gotPref) - expireDays = kDefaultExpireDays; - - [textFieldHistoryDays setIntValue:expireDays]; BOOL useSystemHomePage = [self getBooleanPref:"chimera.use_system_home_page" withSuccess:&gotPref] && gotPref; if (useSystemHomePage) [textFieldHomePage setEnabled:NO]; [checkboxUseSystemHomePage setState:useSystemHomePage]; - [textFieldHomePage setStringValue: [self getCurrentHomePage]]; + [textFieldHomePage setStringValue:[self getCurrentHomePage]]; } - (void) didUnselect @@ -95,8 +84,8 @@ const int kDefaultExpireDays = 9; [self setPref: "browser.startup.homepage" toString: [textFieldHomePage stringValue]]; // ensure that the prefs exist - [self setPref:"browser.startup.page" toInt: [checkboxNewWindowBlank state] ? 1 : 0]; - [self setPref:"browser.tabs.startPage" toInt: [checkboxNewTabBlank state] ? 1 : 0]; + [self setPref:"browser.startup.page" toInt: [checkboxNewWindowBlank state] ? 1 : 0]; + [self setPref:"browser.tabs.startPage" toInt: [checkboxNewTabBlank state] ? 1 : 0]; } - (IBAction)checkboxUseSystemHomePageClicked:(id)sender @@ -108,12 +97,12 @@ const int kDefaultExpireDays = 9; // save the mozilla pref if (useSystemHomePage) - [self setPref: "browser.startup.homepage" toString: [textFieldHomePage stringValue]]; + [self setPref:"browser.startup.homepage" toString:[textFieldHomePage stringValue]]; - [self setPref:"chimera.use_system_home_page" toBoolean: useSystemHomePage]; - [textFieldHomePage setStringValue: [self getCurrentHomePage]]; + [self setPref:"chimera.use_system_home_page" toBoolean:useSystemHomePage]; + [textFieldHomePage setStringValue:[self getCurrentHomePage]]; - [textFieldHomePage setEnabled:!useSystemHomePage]; + [textFieldHomePage setEnabled:!useSystemHomePage]; } - (IBAction)checkboxStartPageClicked:(id)sender @@ -131,39 +120,10 @@ const int kDefaultExpireDays = 9; [self setPref:prefName toInt: [sender state] ? 1 : 0]; } -- (IBAction)historyDaysModified:(id)sender -{ - if (!mPrefService) - return; - - if (sender == textFieldHistoryDays) { - // If any non-numeric characters were entered make some noise and spit it out. - if (([[textFieldHistoryDays stringValue] rangeOfCharacterFromSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]]).length) { - BOOL gotPref; - int prefValue = [self getIntPref:"browser.history_expire_days" withSuccess:&gotPref]; - if (!gotPref) - prefValue = kDefaultExpireDays; - [textFieldHistoryDays setIntValue:prefValue]; - NSBeep (); - return; - } - } - - [self setPref:"browser.history_expire_days" toInt:[sender intValue]]; -} - -// use the browser history service to clear out the user's global history -- (IBAction)clearGlobalHistory:(id)sender -{ - nsCOMPtr hist ( do_GetService("@mozilla.org/browser/global-history;2") ); - if ( hist ) - hist->RemoveAllPages(); -} - - (NSString*)getInternetConfigString:(ConstStr255Param)icPref { - NSString* resultString = @""; - ICInstance icInstance = NULL; + NSString* resultString = @""; + ICInstance icInstance = NULL; // it would be nice to use PreferenceManager, but I don't want to drag // all that code into the plugin @@ -173,12 +133,12 @@ const int kDefaultExpireDays = 9; return resultString; } - ICAttr dummyAttr; - Str255 homePagePStr; - long prefSize = sizeof(homePagePStr); + ICAttr dummyAttr; + Str255 homePagePStr; + long prefSize = sizeof(homePagePStr); error = ICGetPref(icInstance, icPref, &dummyAttr, homePagePStr, &prefSize); if (error == noErr) - resultString = [NSString stringWithCString: (const char*)&homePagePStr[1] length:homePagePStr[0]]; + resultString = [NSString stringWithCString:(const char*)&homePagePStr[1] length:homePagePStr[0]]; else NSLog(@"Error getting pref from Internet Config"); @@ -199,16 +159,7 @@ const int kDefaultExpireDays = 9; if ([self getBooleanPref:"chimera.use_system_home_page" withSuccess:&gotPref] && gotPref) return [self getSystemHomePage]; - return [self getStringPref: "browser.startup.homepage" withSuccess:&gotPref]; -} - - -// Clear the user's disk cache --(IBAction) clearDiskCache:(id)aSender -{ - nsCOMPtr cacheServ ( do_GetService("@mozilla.org/network/cache-service;1") ); - if ( cacheServ ) - cacheServ->EvictEntries(nsICache::STORE_ANYWHERE); + return [self getStringPref:"browser.startup.homepage" withSuccess:&gotPref]; } @end diff --git a/mozilla/camino/PreferencePanes/Navigation/Navigation.tiff b/mozilla/camino/PreferencePanes/Navigation/Navigation.tiff index 3bec440d136..9be78342041 100644 Binary files a/mozilla/camino/PreferencePanes/Navigation/Navigation.tiff and b/mozilla/camino/PreferencePanes/Navigation/Navigation.tiff differ diff --git a/mozilla/camino/src/preferences/MVPreferencePaneDefaults.plist b/mozilla/camino/src/preferences/MVPreferencePaneDefaults.plist index 0ac73d8c708..de834c9834a 100644 --- a/mozilla/camino/src/preferences/MVPreferencePaneDefaults.plist +++ b/mozilla/camino/src/preferences/MVPreferencePaneDefaults.plist @@ -2,7 +2,8 @@ org.mozilla.chimera.preference.appearance, org.mozilla.chimera.preference.privacy, org.mozilla.chimera.preference.security, - org.mozilla.chimera.preference.webfeatures, + org.mozilla.camino.preference.history, org.mozilla.camino.preference.tabs, org.mozilla.camino.preference.downloads, + org.mozilla.chimera.preference.webfeatures, )