Prefix events handled by root-view with "root-view:"

This commit is contained in:
Nathan Sobo
2012-10-04 12:08:36 -10:00
parent 9906dd41b4
commit ae224ca515
3 changed files with 10 additions and 8 deletions

View File

@@ -20,4 +20,8 @@ window.keymap.bindKeys 'body'
'meta-v': 'core:paste'
pageup: 'core:page-up'
pagedown: 'core:page-down'
'meta-S': 'save-all'
'meta-S': 'root-view:save-all'
'meta-+': 'root-view:increase-font-size'
'meta--': 'root-view:decrease-font-size'
'ctrl-w w': 'root-view:focus-next-pane'

View File

@@ -19,9 +19,7 @@ window.keymap.bindKeys '.editor',
'meta-]': 'editor:indent-selected-rows'
'meta-{': 'editor:show-previous-buffer'
'meta-}': 'editor:show-next-buffer'
'meta-+': 'editor:increase-font-size'
'meta--': 'editor:decrease-font-size'
'meta-/': 'editor:toggle-line-comments'
'ctrl-w w': 'editor:focus-next-pane'
'ctrl-W': 'editor:select-word'
'meta-alt-p': 'editor:log-cursor-scope'

View File

@@ -73,10 +73,10 @@ class RootView extends View
@project.setPath(path) unless @project.getRootDirectory()
@setTitle(path)
@on 'increase-font-size', => @setFontSize(@getFontSize() + 1)
@on 'decrease-font-size', => @setFontSize(@getFontSize() - 1)
@on 'focus-next-pane', => @focusNextPane()
@on 'save-all', => @saveAll()
@on 'root-view:increase-font-size', => @setFontSize(@getFontSize() + 1)
@on 'root-view:decrease-font-size', => @setFontSize(@getFontSize() - 1)
@on 'root-view:focus-next-pane', => @focusNextPane()
@on 'root-view:save-all', => @saveAll()
afterAttach: (onDom) ->
@focus() if onDom