mirror of
https://github.com/Foundry376/Mailspring.git
synced 2026-01-06 17:06:28 +08:00
fix(menus): Always show main win in menu, move Activity #1314
This commit is contained in:
parent
c4b5b4b779
commit
18262d043b
9 changed files with 7 additions and 15 deletions
|
|
@ -3,7 +3,6 @@
|
|||
"application:hide": "command+h",
|
||||
"application:hide-other-applications": "command+alt+h",
|
||||
"application:zoom": "alt+command+ctrl+m",
|
||||
"application:show-work-window": "mod+alt+w",
|
||||
"application:run-all-specs": "mod+alt+s",
|
||||
"application:run-package-specs": "mod+alt+p",
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
"window:toggle-full-screen": "f11",
|
||||
"window:reload": "mod+alt+l",
|
||||
"window:toggle-dev-tools": "mod+alt+i",
|
||||
"application:show-work-window": "mod+alt+w",
|
||||
"application:run-all-specs": "mod+alt+s",
|
||||
"application:run-package-specs": "mod+alt+p"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,8 +95,6 @@
|
|||
{ "label": "Toggle Component Regions", "command": "window:toggle-component-regions" },
|
||||
{ "label": "Toggle Screenshot Mode", "command": "window:toggle-screenshot-mode" },
|
||||
{ "type": "separator" },
|
||||
{ "label": "Open Activity Window", "command": "application:show-work-window" },
|
||||
{ "type": "separator" },
|
||||
{ "label": "Create a Plugin...", "command": "application:create-package" },
|
||||
{ "label": "Install a Plugin...", "command": "application:install-package" },
|
||||
{ "type": "separator" },
|
||||
|
|
|
|||
|
|
@ -70,8 +70,6 @@
|
|||
{ "label": "Toggle Component Regions", "command": "window:toggle-component-regions" },
|
||||
{ "label": "Toggle Screenshot Mode", "command": "window:toggle-screenshot-mode" },
|
||||
{ "type": "separator" },
|
||||
{ "label": "Open Activity Window", "command": "application:show-work-window" },
|
||||
{ "type": "separator" },
|
||||
{ "label": "Create a Plugin...", "command": "application:create-package" },
|
||||
{ "label": "Install a Plugin...", "command": "application:install-package" },
|
||||
{ "type": "separator" },
|
||||
|
|
|
|||
|
|
@ -52,8 +52,6 @@
|
|||
{ "label": "Toggle Component Regions", "command": "window:toggle-component-regions" },
|
||||
{ "label": "Toggle Screenshot Mode", "command": "window:toggle-screenshot-mode" },
|
||||
{ "type": "separator" },
|
||||
{ "label": "Open Activity Window", "command": "application:show-work-window" },
|
||||
{ "type": "separator" },
|
||||
{ "label": "Create a Plugin...", "command": "application:create-package" },
|
||||
{ "label": "Install a Plugin...", "command": "application:install-package" },
|
||||
{ "type": "separator" },
|
||||
|
|
|
|||
|
|
@ -109,9 +109,14 @@ class ApplicationMenu
|
|||
return unless windowMenu
|
||||
idx = _.findIndex(windowMenu.submenu, ({id}) -> id is 'window-list-separator')
|
||||
|
||||
accelerators = {
|
||||
'default': 'CmdOrCtrl+0',
|
||||
'work': 'CmdOrCtrl+alt+w',
|
||||
}
|
||||
windows = global.application.windowManager.getOpenWindows()
|
||||
windowsItems = windows.map (w) => {
|
||||
label: w.loadSettings().title || "Window"
|
||||
accelerator: accelerators[w.windowType]
|
||||
click: ->
|
||||
w.show()
|
||||
w.focus()
|
||||
|
|
|
|||
|
|
@ -325,12 +325,6 @@ export default class Application extends EventEmitter {
|
|||
this.openWindowsForTokenState();
|
||||
});
|
||||
|
||||
this.on('application:show-work-window', () => {
|
||||
const win = this.windowManager.get(WindowManager.WORK_WINDOW)
|
||||
win.show()
|
||||
win.focus()
|
||||
});
|
||||
|
||||
this.on('application:check-for-update', () => {
|
||||
this.autoUpdateManager.check();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ export default class WindowLauncher {
|
|||
// This will fire `NylasEnv::populateHotWindow` and reload the
|
||||
// packages.
|
||||
win.windowKey = opts.windowKey;
|
||||
win.windowType = opts.windowType;
|
||||
win.setLoadSettings(newLoadSettings);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export default class WindowManager {
|
|||
const values = [];
|
||||
Object.keys(this._windows).forEach((key) => {
|
||||
const win = this._windows[key];
|
||||
if (win.isVisible() || win.isMinimized()) {
|
||||
if (win.windowType !== WindowLauncher.EMPTY_WINDOW) {
|
||||
values.push(win);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue