move history prefs into their own pane, part of major prefs reorg

This commit is contained in:
joshmoz%gmail.com 2005-01-18 23:34:29 +00:00
Родитель 055c5e33e4
Коммит 779974320c
15 изменённых файлов: 483 добавлений и 90 удалений

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

@ -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 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
<plist version=\"1.0\">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>HistoryPrefPane</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.HistoryPrefPane</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
</dict>
</plist>
";
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 = "<absolute>";
};
035A4981079DCA100084B05F = {
children = (
035A4982079DCA100084B05F,
035A4986079DCA100084B05F,
035A4988079DCA100084B05F,
035A4989079DCA100084B05F,
035A498A079DCA100084B05F,
);
isa = PBXGroup;
name = History;
path = ../../PreferencePanes/History;
refType = 4;
sourceTree = "<group>";
};
035A4982079DCA100084B05F = {
children = (
035A4983079DCA100084B05F,
);
isa = PBXVariantGroup;
name = History.nib;
path = "";
refType = 4;
sourceTree = "<group>";
};
035A4983079DCA100084B05F = {
isa = PBXFileReference;
lastKnownFileType = wrapper.nib;
name = English;
path = English.lproj/History.nib;
refType = 4;
sourceTree = "<group>";
};
035A4986079DCA100084B05F = {
children = (
035A4987079DCA100084B05F,
);
isa = PBXVariantGroup;
name = Localizable.strings;
path = "";
refType = 4;
sourceTree = "<group>";
};
035A4987079DCA100084B05F = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = text.plist.strings;
name = English;
path = English.lproj/Localizable.strings;
refType = 4;
sourceTree = "<group>";
};
035A4988079DCA100084B05F = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
path = History.h;
refType = 4;
sourceTree = "<group>";
};
035A4989079DCA100084B05F = {
fileEncoding = 30;
isa = PBXFileReference;
lastKnownFileType = sourcecode.cpp.objcpp;
path = History.mm;
refType = 4;
sourceTree = "<group>";
};
035A498A079DCA100084B05F = {
isa = PBXFileReference;
lastKnownFileType = image.tiff;
path = History.tiff;
refType = 4;
sourceTree = "<group>";
};
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,

25
camino/PreferencePanes/History/English.lproj/History.nib/classes.nib сгенерированный Normal file
Просмотреть файл

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

16
camino/PreferencePanes/History/English.lproj/History.nib/info.nib сгенерированный Normal file
Просмотреть файл

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>111 35 522 320 0 0 1920 1178 </string>
<key>IBFramework Version</key>
<string>364.0</string>
<key>IBOpenObjects</key>
<array>
<integer>5</integer>
</array>
<key>IBSystem Version</key>
<string>7S215</string>
</dict>
</plist>

Двоичные данные
camino/PreferencePanes/History/English.lproj/History.nib/keyedobjects.nib сгенерированный Normal file

Двоичный файл не отображается.

Двоичные данные
camino/PreferencePanes/History/English.lproj/Localizable.strings Normal file

Двоичный файл не отображается.

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

@ -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 <Cocoa/Cocoa.h>
#import <PreferencePaneBase.h>
@interface OrgMozillaChimeraPreferenceHistory : PreferencePaneBase
{
IBOutlet NSTextField *textFieldHistoryDays;
}
- (IBAction)historyDaysModified:(id)sender;
- (IBAction)clearGlobalHistory:(id)sender;
- (IBAction)clearDiskCache:(id)aSender;
@end

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

@ -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<nsICacheService> 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<nsIBrowserHistory> hist ( do_GetService("@mozilla.org/browser/global-history;2") );
if ( hist )
hist->RemoveAllPages();
}
@end

Двоичные данные
camino/PreferencePanes/History/History.tiff Normal file

Двоичный файл не отображается.

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

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

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

@ -3,20 +3,13 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>140 56 522 320 0 0 1280 1002 </string>
<string>257 71 522 320 0 0 1920 1178 </string>
<key>IBFramework Version</key>
<string>364.0</string>
<key>IBGroupedObjects</key>
<dict>
<key>8</key>
<array>
<string>331</string>
<string>321</string>
<string>334</string>
</array>
</dict>
<key>IBLastGroupID</key>
<string>9</string>
<key>IBOpenObjects</key>
<array>
<integer>5</integer>
</array>
<key>IBSystem Version</key>
<string>7S215</string>
</dict>

Двоичные данные
camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/keyedobjects.nib сгенерированный

Двоичный файл не отображается.

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

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

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

@ -19,6 +19,7 @@
*
* Contributor(s):
* william@dell.wisner.name (William Dell Wisner)
* joshmoz@gmail.com (Josh Aas)
*/
#import <Carbon/Carbon.h>
@ -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<nsIBrowserHistory> 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<nsICacheService> 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

Двоичный файл не отображается.

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

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