From 4142911ac78affc4f0f44f3600528ccc9b36b9da Mon Sep 17 00:00:00 2001 From: Paul Ivanov Date: Tue, 11 Mar 2014 18:58:46 -0700 Subject: [PATCH] better fix for starting with Command Mode icon --- IPython/html/static/notebook/js/notebook.js | 1 - IPython/html/static/notebook/js/notificationarea.js | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js index f6f6bc8ac..05cb955c1 100644 --- a/IPython/html/static/notebook/js/notebook.js +++ b/IPython/html/static/notebook/js/notebook.js @@ -2048,7 +2048,6 @@ var IPython = (function (IPython) { } else { this.select(0); this.handle_command_mode(this.get_cell(0)); - $([IPython.events]).trigger('command_mode.Notebook'); } this.set_dirty(false); this.scroll_to_top(); diff --git a/IPython/html/static/notebook/js/notificationarea.js b/IPython/html/static/notebook/js/notificationarea.js index b9b7f1c34..817bd8e2d 100644 --- a/IPython/html/static/notebook/js/notificationarea.js +++ b/IPython/html/static/notebook/js/notificationarea.js @@ -83,6 +83,9 @@ var IPython = (function (IPython) { $modal_ind_icon.attr('class','ipython-command-mode').attr('title','Command Mode'); }); + // Implicitly start off in Command mode, switching to Edit mode will trigger event + $modal_ind_icon.attr('class','ipython-command-mode').attr('title','Command Mode'); + // Kernel events $([IPython.events]).on('status_idle.Kernel',function () { IPython.save_widget.update_document_title(); @@ -105,7 +108,7 @@ var IPython = (function (IPython) { // Start the kernel indicator in the busy state, and send a kernel_info request. // When the kernel_info reply arrives, the kernel is idle. - $kernel_ind_icon.attr('class','icon-circle').attr('title','Kernel Busy'); + $kernel_ind_icon.attr('class','ipython-kernel-busy').attr('title','Kernel Busy'); $([IPython.events]).on('status_started.Kernel', function (evt, data) { data.kernel.kernel_info(function () {