add "Empty Cache" item to camino menu that just empties the cache, nothing

more.
This commit is contained in:
pinkerton%aol.net 2004-11-24 15:23:38 +00:00
Родитель 30bf444262
Коммит 838fc9b0f8
6 изменённых файлов: 33 добавлений и 9 удалений

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

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

@ -22,6 +22,7 @@
doSearch = id;
doStop = id;
downloadsWindow = id;
emptyCache = id;
exportBookmarks = id;
feedbackLink = id;
findAgain = id;

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

@ -7,12 +7,12 @@
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>757 833 433 44 0 0 1920 1178 </string>
<string>431 657 433 44 0 0 1280 938 </string>
<key>494</key>
<string>507 508 116 61 0 0 1152 848 </string>
</dict>
<key>IBFramework Version</key>
<string>364.0</string>
<string>362.0</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>

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

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

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

@ -199,4 +199,7 @@ typedef enum EBookmarkOpenBehavior
// security feature to reset browser
-(IBAction)resetBrowser:(id)sender;
// prompts the user to reset the cache, then does it
- (IBAction)emptyCache:(id)sender;
@end

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

@ -1306,13 +1306,33 @@ const int kReuseWindowOnAE = 2;
[self openNewWindowOrTabWithURL:urlString andReferrer:nil];
}
/*
* Here we need to:
* - warn user about what is going to happen
* - if its OK...
* - close all open windows, delete cache, history, cookies, site permissions,
* downloads, saved names and passwords
*/
//
// -emptyCache:
//
// Puts up a modal panel and if the user gives the go-ahead, emtpies the disk and memory
// caches. We keep this separate from |-resetBrowser:| so the user can just clear the cache
// and not have to delete everything (such as their keychain passwords).
//
- (IBAction)emptyCache:(id)sender
{
if (NSRunCriticalAlertPanel(NSLocalizedString(@"EmptyCacheTitle", nil), NSLocalizedString(@"EmptyCacheMessage", nil),
NSLocalizedString(@"EmptyButton", nil), NSLocalizedString(@"CancelButtonText", nil), nil) == NSAlertDefaultReturn) {
// remove cache
nsCOMPtr<nsICacheService> cacheServ (do_GetService("@mozilla.org/network/cache-service;1"));
if (cacheServ)
cacheServ->EvictEntries(nsICache::STORE_ANYWHERE);
}
}
//
// -resetBrowser:
//
// Here we need to:
// - warn user about what is going to happen
// - if its OK...
// - close all open windows, delete cache, history, cookies, site permissions,
// downloads, saved names and passwords
//
- (IBAction)resetBrowser:(id)sender
{
if (NSRunCriticalAlertPanel(NSLocalizedString(@"Reset Camino Title", @"Are you sure you want to reset Camino?"),