From f37975332ae0901d63cae2e2f8ca2ef4dc8fa929 Mon Sep 17 00:00:00 2001 From: Jeroen van Warmerdam Date: Mon, 25 May 2015 16:32:53 +0200 Subject: [PATCH] :bug: Renamed commands. Fixes #40 --- README.md | 8 ++++++++ lib/tool-bar-view.coffee | 8 ++++---- menus/tool-bar.cson | 16 ++++++++-------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index c241fe7..c282866 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,14 @@ The remaining properties `tooltip`, `iconset` (defaults `Octicons`), `data` and * [Ionicons](http://ionicons.com/) * [FontAwesome](http://fortawesome.github.io/Font-Awesome/) +## Supported commands + +* `tool-bar:toggle` +* `tool-bar:position-top` +* `tool-bar:position-right` +* `tool-bar:position-bottom` +* `tool-bar:position-left` + ## Authors * [Wojtek Siudzinski](http://suda.pl) diff --git a/lib/tool-bar-view.coffee b/lib/tool-bar-view.coffee index c7d1fca..ad31922 100644 --- a/lib/tool-bar-view.coffee +++ b/lib/tool-bar-view.coffee @@ -31,16 +31,16 @@ module.exports = class ToolBarView extends View @subscriptions = new CompositeDisposable @subscriptions.add atom.commands.add 'atom-workspace', 'tool-bar:toggle', => @toggle() - @subscriptions.add atom.commands.add 'atom-workspace', 'tool-bar:position:top', => + @subscriptions.add atom.commands.add 'atom-workspace', 'tool-bar:position-top', => @updatePosition 'Top' atom.config.set 'tool-bar.position', 'Top' - @subscriptions.add atom.commands.add 'atom-workspace', 'tool-bar:position:right', => + @subscriptions.add atom.commands.add 'atom-workspace', 'tool-bar:position-right', => @updatePosition 'Right' atom.config.set 'tool-bar.position', 'Right' - @subscriptions.add atom.commands.add 'atom-workspace', 'tool-bar:position:bottom', => + @subscriptions.add atom.commands.add 'atom-workspace', 'tool-bar:position-bottom', => @updatePosition 'Bottom' atom.config.set 'tool-bar.position', 'Bottom' - @subscriptions.add atom.commands.add 'atom-workspace', 'tool-bar:position:left', => + @subscriptions.add atom.commands.add 'atom-workspace', 'tool-bar:position-left', => @updatePosition 'Left' atom.config.set 'tool-bar.position', 'Left' diff --git a/menus/tool-bar.cson b/menus/tool-bar.cson index 0c58b45..2b0e9f8 100644 --- a/menus/tool-bar.cson +++ b/menus/tool-bar.cson @@ -9,10 +9,10 @@ menu: [ { label: '&Position', submenu: [ - { label: 'Top', command: 'tool-bar:position:top', type: 'radio' } - { label: 'Right', command: 'tool-bar:position:right', type: 'radio' } - { label: 'Bottom', command: 'tool-bar:position:bottom', type: 'radio' } - { label: 'Left', command: 'tool-bar:position:left', type: 'radio' } + { label: 'Top', command: 'tool-bar:position-top', type: 'radio' } + { label: 'Right', command: 'tool-bar:position-right', type: 'radio' } + { label: 'Bottom', command: 'tool-bar:position-bottom', type: 'radio' } + { label: 'Left', command: 'tool-bar:position-left', type: 'radio' } ] } ] @@ -26,10 +26,10 @@ menu: [ { label: '&Position', submenu: [ - { label: 'Top', command: 'tool-bar:position:top' } - { label: 'Right', command: 'tool-bar:position:right' } - { label: 'Bottom', command: 'tool-bar:position:bottom' } - { label: 'Left', command: 'tool-bar:position:left' } + { label: 'Top', command: 'tool-bar:position-top' } + { label: 'Right', command: 'tool-bar:position-right' } + { label: 'Bottom', command: 'tool-bar:position-bottom' } + { label: 'Left', command: 'tool-bar:position-left' } ] } ]