mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use @command to register EventPalette commands
This is at the moment a bit redundant, since you're already in the EventPalette when you see this. But we intend `@command` to communicate intent in the codebase, and its may also end up being used in other ways later.
This commit is contained in:
@@ -9,7 +9,7 @@ class EventPalette extends SelectList
|
||||
@activate: (rootView) ->
|
||||
requireStylesheet 'event-palette/event-palette.css'
|
||||
@instance = new EventPalette(rootView)
|
||||
rootView.on 'event-palette:toggle', => @instance.attach()
|
||||
rootView.command 'event-palette:toggle', => @instance.attach()
|
||||
|
||||
@viewClass: ->
|
||||
"#{super} event-palette"
|
||||
@@ -20,7 +20,7 @@ class EventPalette extends SelectList
|
||||
keyBindings: null
|
||||
|
||||
initialize: (@rootView) ->
|
||||
@on 'event-palette:toggle', => @cancel()
|
||||
@command 'event-palette:toggle', => @cancel()
|
||||
super
|
||||
|
||||
attach: ->
|
||||
|
||||
Reference in New Issue
Block a user