зеркало из https://github.com/mozilla/pjs.git
Updating some class/method names, adding "clear global history" button
This commit is contained in:
Родитель
fc4379e2f1
Коммит
620cfe1020
|
@ -14,10 +14,11 @@
|
|||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
buttonSystemPreferencesClicked = id;
|
||||
checkboxClicked = id;
|
||||
checkboxStartPageClicked = id;
|
||||
clearGlobalHistory = id;
|
||||
historyDaysModified = id;
|
||||
openSystemInternetPanel = id;
|
||||
};
|
||||
CLASS = OrgMozillaChimeraPreferenceNavigation;
|
||||
LANGUAGE = ObjC;
|
||||
|
@ -30,6 +31,26 @@
|
|||
textFieldHistoryDays = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
checkboxClicked = id;
|
||||
checkboxStartPageClicked = id;
|
||||
clearGlobalHistory = id;
|
||||
historyDaysModified = id;
|
||||
openSystemInternetPanel = id;
|
||||
};
|
||||
CLASS = OrgMozillaNavigatorPreferenceNavigation;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
buttonSystemPreferences = NSButton;
|
||||
checkboxNewTabBlank = NSButton;
|
||||
checkboxNewWindowBlank = NSButton;
|
||||
checkboxOpenTabs = NSButton;
|
||||
sliderHistoryDays = NSSlider;
|
||||
textFieldHistoryDays = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
</dict>
|
||||
<key>IBLastGroupID</key>
|
||||
<string>8</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
</dict>
|
||||
|
|
Двоичные данные
camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib
сгенерированный
Двоичные данные
camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -26,7 +26,7 @@
|
|||
|
||||
class nsIPref;
|
||||
|
||||
@interface OrgMozillaNavigatorPreferenceNavigation : NSPreferencePane
|
||||
@interface OrgMozillaChimeraPreferenceNavigation : NSPreferencePane
|
||||
{
|
||||
IBOutlet NSButton *buttonSystemPreferences;
|
||||
IBOutlet NSButton *checkboxNewTabBlank;
|
||||
|
@ -37,8 +37,9 @@ class nsIPref;
|
|||
|
||||
nsIPref* mPrefService; // strong, but can't use a comptr here
|
||||
}
|
||||
- (IBAction)buttonSystemPreferencesClicked:(id)sender;
|
||||
- (IBAction)openSystemInternetPanel:(id)sender;
|
||||
- (IBAction)checkboxClicked:(id)sender;
|
||||
- (IBAction)checkboxStartPageClicked:(id)sender;
|
||||
- (IBAction)historyDaysModified:(id)sender;
|
||||
- (IBAction)clearGlobalHistory:(id)sender;
|
||||
@end
|
||||
|
|
|
@ -25,10 +25,11 @@
|
|||
#include "nsIServiceManager.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIBrowserHistory.h"
|
||||
|
||||
const int kDefaultExpireDays = 9;
|
||||
|
||||
@implementation OrgMozillaNavigatorPreferenceNavigation
|
||||
@implementation OrgMozillaChimeraPreferenceNavigation
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
|
@ -75,7 +76,7 @@ const int kDefaultExpireDays = 9;
|
|||
[checkboxOpenTabs setState:YES];
|
||||
}
|
||||
|
||||
- (IBAction)buttonSystemPreferencesClicked:(id)sender
|
||||
- (IBAction)openSystemInternetPanel:(id)sender
|
||||
{
|
||||
if ([[NSWorkspace sharedWorkspace] openFile:@"/System/Library/PreferencePanes/Internet.prefPane"] == NO) {
|
||||
// XXXw. pop up a dialog warning that System Preferences couldn't be launched?
|
||||
|
@ -130,4 +131,17 @@ const int kDefaultExpireDays = 9;
|
|||
mPrefService->SetIntPref("browser.history_expire_days", [sender intValue]);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// clearGlobalHistory:
|
||||
//
|
||||
// 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;1") );
|
||||
if ( hist )
|
||||
hist->RemoveAllPages();
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -14,10 +14,11 @@
|
|||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
buttonSystemPreferencesClicked = id;
|
||||
checkboxClicked = id;
|
||||
checkboxStartPageClicked = id;
|
||||
clearGlobalHistory = id;
|
||||
historyDaysModified = id;
|
||||
openSystemInternetPanel = id;
|
||||
};
|
||||
CLASS = OrgMozillaChimeraPreferenceNavigation;
|
||||
LANGUAGE = ObjC;
|
||||
|
@ -30,6 +31,26 @@
|
|||
textFieldHistoryDays = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
checkboxClicked = id;
|
||||
checkboxStartPageClicked = id;
|
||||
clearGlobalHistory = id;
|
||||
historyDaysModified = id;
|
||||
openSystemInternetPanel = id;
|
||||
};
|
||||
CLASS = OrgMozillaNavigatorPreferenceNavigation;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
buttonSystemPreferences = NSButton;
|
||||
checkboxNewTabBlank = NSButton;
|
||||
checkboxNewWindowBlank = NSButton;
|
||||
checkboxOpenTabs = NSButton;
|
||||
sliderHistoryDays = NSSlider;
|
||||
textFieldHistoryDays = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
</dict>
|
||||
<key>IBLastGroupID</key>
|
||||
<string>8</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
</dict>
|
||||
|
|
Двоичный файл не отображается.
|
@ -14,10 +14,11 @@
|
|||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
buttonSystemPreferencesClicked = id;
|
||||
checkboxClicked = id;
|
||||
checkboxStartPageClicked = id;
|
||||
clearGlobalHistory = id;
|
||||
historyDaysModified = id;
|
||||
openSystemInternetPanel = id;
|
||||
};
|
||||
CLASS = OrgMozillaChimeraPreferenceNavigation;
|
||||
LANGUAGE = ObjC;
|
||||
|
@ -30,6 +31,26 @@
|
|||
textFieldHistoryDays = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
checkboxClicked = id;
|
||||
checkboxStartPageClicked = id;
|
||||
clearGlobalHistory = id;
|
||||
historyDaysModified = id;
|
||||
openSystemInternetPanel = id;
|
||||
};
|
||||
CLASS = OrgMozillaNavigatorPreferenceNavigation;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
buttonSystemPreferences = NSButton;
|
||||
checkboxNewTabBlank = NSButton;
|
||||
checkboxNewWindowBlank = NSButton;
|
||||
checkboxOpenTabs = NSButton;
|
||||
sliderHistoryDays = NSSlider;
|
||||
textFieldHistoryDays = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
</dict>
|
||||
<key>IBLastGroupID</key>
|
||||
<string>8</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
</dict>
|
||||
|
|
Двоичные данные
chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib
сгенерированный
Двоичные данные
chimera/PreferencePanes/Navigation/English.lproj/Navigation.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -26,7 +26,7 @@
|
|||
|
||||
class nsIPref;
|
||||
|
||||
@interface OrgMozillaNavigatorPreferenceNavigation : NSPreferencePane
|
||||
@interface OrgMozillaChimeraPreferenceNavigation : NSPreferencePane
|
||||
{
|
||||
IBOutlet NSButton *buttonSystemPreferences;
|
||||
IBOutlet NSButton *checkboxNewTabBlank;
|
||||
|
@ -37,8 +37,9 @@ class nsIPref;
|
|||
|
||||
nsIPref* mPrefService; // strong, but can't use a comptr here
|
||||
}
|
||||
- (IBAction)buttonSystemPreferencesClicked:(id)sender;
|
||||
- (IBAction)openSystemInternetPanel:(id)sender;
|
||||
- (IBAction)checkboxClicked:(id)sender;
|
||||
- (IBAction)checkboxStartPageClicked:(id)sender;
|
||||
- (IBAction)historyDaysModified:(id)sender;
|
||||
- (IBAction)clearGlobalHistory:(id)sender;
|
||||
@end
|
||||
|
|
|
@ -25,10 +25,11 @@
|
|||
#include "nsIServiceManager.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsIBrowserHistory.h"
|
||||
|
||||
const int kDefaultExpireDays = 9;
|
||||
|
||||
@implementation OrgMozillaNavigatorPreferenceNavigation
|
||||
@implementation OrgMozillaChimeraPreferenceNavigation
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
|
@ -75,7 +76,7 @@ const int kDefaultExpireDays = 9;
|
|||
[checkboxOpenTabs setState:YES];
|
||||
}
|
||||
|
||||
- (IBAction)buttonSystemPreferencesClicked:(id)sender
|
||||
- (IBAction)openSystemInternetPanel:(id)sender
|
||||
{
|
||||
if ([[NSWorkspace sharedWorkspace] openFile:@"/System/Library/PreferencePanes/Internet.prefPane"] == NO) {
|
||||
// XXXw. pop up a dialog warning that System Preferences couldn't be launched?
|
||||
|
@ -130,4 +131,17 @@ const int kDefaultExpireDays = 9;
|
|||
mPrefService->SetIntPref("browser.history_expire_days", [sender intValue]);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// clearGlobalHistory:
|
||||
//
|
||||
// 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;1") );
|
||||
if ( hist )
|
||||
hist->RemoveAllPages();
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -14,10 +14,11 @@
|
|||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
buttonSystemPreferencesClicked = id;
|
||||
checkboxClicked = id;
|
||||
checkboxStartPageClicked = id;
|
||||
clearGlobalHistory = id;
|
||||
historyDaysModified = id;
|
||||
openSystemInternetPanel = id;
|
||||
};
|
||||
CLASS = OrgMozillaChimeraPreferenceNavigation;
|
||||
LANGUAGE = ObjC;
|
||||
|
@ -30,6 +31,26 @@
|
|||
textFieldHistoryDays = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
},
|
||||
{
|
||||
ACTIONS = {
|
||||
checkboxClicked = id;
|
||||
checkboxStartPageClicked = id;
|
||||
clearGlobalHistory = id;
|
||||
historyDaysModified = id;
|
||||
openSystemInternetPanel = id;
|
||||
};
|
||||
CLASS = OrgMozillaNavigatorPreferenceNavigation;
|
||||
LANGUAGE = ObjC;
|
||||
OUTLETS = {
|
||||
buttonSystemPreferences = NSButton;
|
||||
checkboxNewTabBlank = NSButton;
|
||||
checkboxNewWindowBlank = NSButton;
|
||||
checkboxOpenTabs = NSButton;
|
||||
sliderHistoryDays = NSSlider;
|
||||
textFieldHistoryDays = NSTextField;
|
||||
};
|
||||
SUPERCLASS = NSPreferencePane;
|
||||
}
|
||||
);
|
||||
IBVersion = 1;
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
</dict>
|
||||
<key>IBLastGroupID</key>
|
||||
<string>8</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5Q125</string>
|
||||
</dict>
|
||||
|
|
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче