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:
Jessica Lord & Kevin Sawicki
2013-08-09 13:29:12 -07:00
parent ce138b56c0
commit 4491a9302b
2 changed files with 4 additions and 1 deletions

View File

@@ -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:' }

View File

@@ -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)