mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 22:19:58 +02:00
Refactor ZenKeyboardShortcuts to add reset functionality for pinned tabs
This commit is contained in:
parent
327380907e
commit
cbeb9d7b68
1 changed files with 12 additions and 11 deletions
|
@ -648,17 +648,6 @@ function zenGetDefaultShortcuts() {
|
|||
'zen-sidebar-shortcut-toggle'
|
||||
)
|
||||
);
|
||||
newShortcutList.push(
|
||||
new KeyShortcut(
|
||||
'zen-pinned-tab-reset-shortcut',
|
||||
'',
|
||||
'',
|
||||
ZEN_OTHER_SHORTCUTS_GROUP,
|
||||
KeyShortcutModifiers.fromObject({}),
|
||||
'code:gZenPinnedTabManager.resetPinnedTab(gBrowser.selectedTab)',
|
||||
'zen-pinned-tab-shortcut-reset'
|
||||
)
|
||||
);
|
||||
|
||||
// Split view
|
||||
newShortcutList.push(
|
||||
|
@ -776,6 +765,17 @@ class ZenKeyboardShortcutsVersioner {
|
|||
shortcut.setNewBinding(shortcut.getKeyName());
|
||||
}
|
||||
}
|
||||
data.push(
|
||||
new KeyShortcut(
|
||||
'zen-pinned-tab-reset-shortcut',
|
||||
'',
|
||||
'',
|
||||
ZEN_OTHER_SHORTCUTS_GROUP,
|
||||
KeyShortcutModifiers.fromObject({}),
|
||||
'code:gZenPinnedTabManager.resetPinnedTab(gBrowser.selectedTab)',
|
||||
'zen-pinned-tab-shortcut-reset'
|
||||
)
|
||||
);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
@ -887,6 +887,7 @@ var gZenKeyboardShortcutsManager = {
|
|||
|
||||
async resetAllShortcuts() {
|
||||
await this.loader.remove();
|
||||
Services.prefs.clearUserPref('zen.keyboard.shortcuts.version');
|
||||
},
|
||||
|
||||
async _saveShortcuts() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue