From 1f891c58bad0b7746659aa4138001b5ee76d9a0e Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Tue, 17 Apr 2012 18:10:39 -0700 Subject: added theme choices for editor Signed-off-by: Ananya Sen --- .../code-editor-view-options.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js') diff --git a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js index a381ae2a..0625dad9 100644 --- a/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js +++ b/js/code-editor/ui/code-editor-view-options.reel/code-editor-view-options.js @@ -45,24 +45,32 @@ var CodeEditorViewOptions = exports.CodeEditorViewOptions = Montage.create(Compo this.format.addEventListener("click", this.handleFormat.bind(this), false); this.comment.addEventListener("click", this.handleComment.bind(this), false); this.uncomment.addEventListener("click", this.handleUncomment.bind(this), false); + this.themeSelect.addEventListener("change", this.handleThemeSelection.bind(this), false); } }, handleFormat:{ - value: function(){ + value: function(evt){ this.application.ninja.codeEditorController.autoFormatSelection(); } }, handleComment:{ - value: function(){ + value: function(evt){ this.application.ninja.codeEditorController.commentSelection(true); } }, handleUncomment:{ - value: function(){ + value: function(evt){ this.application.ninja.codeEditorController.commentSelection(false); } + }, + + handleThemeSelection:{ + value: function(evt){ + var theme = this.themeSelect.options[this.themeSelect.selectedIndex].value; + this.application.ninja.codeEditorController.handleThemeSelection(theme); + } } }); \ No newline at end of file -- cgit v1.2.3