mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Forward config menu click event to focused window
Previously the Atom > Preferences... menu just logged an error message. Now it fires a window:open-config event to the focused window.
This commit is contained in:
@@ -96,7 +96,7 @@ class AtomApplication
|
||||
submenu: [
|
||||
{ label: 'About Atom', selector: 'orderFrontStandardAboutPanel:' }
|
||||
{ type: 'separator' }
|
||||
{ label: 'Preferences...', accelerator: 'Command+,', click: => console.error("preferences not setup yet") }
|
||||
{ label: 'Preferences...', accelerator: 'Command+,', click: => @sendCommand('window:open-config') }
|
||||
{ type: 'separator' }
|
||||
{ label: 'Hide Atom', accelerator: 'Command+H', selector: 'hide:' }
|
||||
{ label: 'Hide Others', accelerator: 'Command+Shift+H', selector: 'hideOtherApplications:' }
|
||||
|
||||
@@ -25,6 +25,9 @@ class SettingsView extends ScrollView
|
||||
rootView.command 'settings-view:toggle', ->
|
||||
rootView.open(configUri)
|
||||
|
||||
$(window).on 'window:open-config', ->
|
||||
rootView.open(configUri)
|
||||
|
||||
@deserialize: ({activePanelName}={}) ->
|
||||
new SettingsView(activePanelName)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user