From c457b323671eca1a08207c7d3f55e597b27b646d Mon Sep 17 00:00:00 2001 From: Oleksandr Bardanov Date: Fri, 6 Feb 2015 15:01:36 +0200 Subject: [PATCH] "show options" context menu item --- services/contextMenu.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/services/contextMenu.js b/services/contextMenu.js index 04af3e8..74fc736 100644 --- a/services/contextMenu.js +++ b/services/contextMenu.js @@ -52,13 +52,15 @@ define(function(require, exports, module){ storage.setKey(storageRulesKey, colorRules); - console.log(MainViewManager.getPaneIdList()); - _.each(MainViewManager.getPaneIdList(), function(paneId){ MainViewManager.trigger('workingSetUpdate', [null, paneId]); }); }); + this.showOptionsCommand = CommandManager.register('Show extension options', 'dte_showOptions', function(){ + ModalService.showHandler(); + }); + this.moveToOtherPanel = CommandManager.register('Move to another panel', 'dte_moveToAnotherPanel', function(){ //NOT IMPLEMENTED YET UNTIL BRACKETS PANEL API WILL BE USABLE var file = self.context, @@ -113,6 +115,7 @@ define(function(require, exports, module){ self.menu.addMenuItem(self.moveToOtherPanel); self.menu.addMenuDivider(); + self.menu.addMenuItem(self.showOptionsCommand); self.menu.addMenuItem(self.addNewRuleCommand); self.menu.addMenuItem(self.clearRuleCommand); }, 100); @@ -132,7 +135,7 @@ define(function(require, exports, module){ this.menu.addMenuItem(this.clearRuleCommand); this.addNewRuleCommand.setName('Change tab colors'); } else { - this.addNewRuleCommand.setName('Set tab colors'); + this.addNewRuleCommand.setName('Set current tab colors'); } setTimeout(function(){