mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
chore: Enable keyboard shortcuts in Zen browser settings
This commit is contained in:
@@ -72,6 +72,7 @@ pref('zen.view.sidebar-expanded', false);
|
||||
pref('zen.view.sidebar-expanded.show-button', true);
|
||||
pref('zen.view.sidebar-expanded.max-width', 400);
|
||||
pref('zen.keyboard.shortcuts', "{}");
|
||||
pref('zen.keyboard.shortcuts.disable-firefox', false);
|
||||
|
||||
// Pref to enable the new profiles (TODO: Check this out!)
|
||||
//pref("browser.profiles.enabled", true);
|
||||
|
Submodule src/browser/base/content/zen-components updated: f349477728...b1d5b8e642
@@ -62,6 +62,28 @@ var gZenCKSSettings = {
|
||||
this._currentAction = null;
|
||||
this._initializeEvents();
|
||||
this._initializeCKS();
|
||||
this._addPrefObservers();
|
||||
},
|
||||
|
||||
_addPrefObservers() {
|
||||
Services.prefs.addObserver("zen.keyboard.shortcuts.disable-firefox", this.onDisableFirefoxShortcutsChange.bind(this));
|
||||
},
|
||||
|
||||
async onDisableFirefoxShortcutsChange(event) {
|
||||
let checked = Services.prefs.getBoolPref("zen.keyboard.shortcuts.disable-firefox");
|
||||
if (checked) return;
|
||||
let buttonIndex = await confirmRestartPrompt(
|
||||
true,
|
||||
1,
|
||||
true,
|
||||
false
|
||||
);
|
||||
if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
|
||||
Services.startup.quit(
|
||||
Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart
|
||||
);
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
_initializeCKS() {
|
||||
@@ -228,5 +250,10 @@ Preferences.addAll([
|
||||
id: "zen.theme.floating-urlbar",
|
||||
type: "bool",
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
id: "zen.keyboard.shortcuts.disable-firefox",
|
||||
type: "bool",
|
||||
default: false,
|
||||
}
|
||||
]);
|
||||
|
@@ -7,16 +7,14 @@
|
||||
<html:h1 data-l10n-id="pane-zen-CKS-title"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="zenCKSCategory"
|
||||
class="subcategory"
|
||||
hidden="true"
|
||||
data-category="paneZenCKS">
|
||||
</hbox>
|
||||
|
||||
<groupbox id="zenCKSGroup" data-category="paneZenCKS" hidden="true" class="highlighting-group">
|
||||
<label><html:h2 data-l10n-id="zen-settings-CKS-header"/></label>
|
||||
<description class="description-deemphasized" data-l10n-id="zen-settings-CKS-description" />
|
||||
|
||||
<vbox class="indent">
|
||||
<checkbox id="zenKSCDisableFirefoxShortcuts"
|
||||
data-l10n-id="zen-settings-CKS-disable-firefox"
|
||||
preference="zen.keyboard.shortcuts.disable-firefox" />
|
||||
</vbox>
|
||||
<vbox id="zenCKSOptions-wrapper"></vbox>
|
||||
</groupbox>
|
||||
|
||||
|
@@ -68,6 +68,8 @@ pane-settings-CKS-title = { -brand-short-name } Keyboard Shortcuts
|
||||
zen-settings-CKS-header = Customize your keyboard shortcuts
|
||||
zen-settings-CKS-description = Change the default keyboard shortcuts to your liking and improve your browsing experience
|
||||
|
||||
zen-settings-CKS-disable-firefox =
|
||||
.label = Disable { -brand-short-name }'s default keyboard shortcuts
|
||||
|
||||
zen-cks-group-tab-action = Tab Actions
|
||||
zen-cks-group-page-action = Page Actions
|
||||
|
@@ -200,7 +200,7 @@ groupbox h2 {
|
||||
/* CKS */
|
||||
|
||||
#category-zen-CKS > .category-icon {
|
||||
list-style-image: url("chrome://browser/skin/save.svg");
|
||||
list-style-image: url("chrome://browser/skin/quickactions.svg");
|
||||
}
|
||||
|
||||
.zenCKSOption-input {
|
||||
|
Reference in New Issue
Block a user