From c900979a808ab602a43318cfb32496d14cd39963 Mon Sep 17 00:00:00 2001 From: "Brian E. Granger" Date: Tue, 6 Sep 2011 16:49:46 -0700 Subject: [PATCH] Misc changes to the notebook. * IPythonNotebookApp->NotebookApp. * Cleaned up html templates of unused stylesheets. --- IPython/frontend/html/notebook/notebookapp.py | 22 +++++++++---------- .../html/notebook/static/js/savewidget.js | 2 +- .../html/notebook/templates/login.html | 21 ++++++++---------- .../html/notebook/templates/nbbrowser.html | 3 --- .../html/notebook/templates/notebook.html | 5 +---- 5 files changed, 22 insertions(+), 31 deletions(-) diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py index 22289627f..469be9e23 100644 --- a/IPython/frontend/html/notebook/notebookapp.py +++ b/IPython/frontend/html/notebook/notebookapp.py @@ -125,11 +125,11 @@ notebook_flags = ['no-browser'] aliases = dict(ipkernel_aliases) aliases.update({ - 'ip': 'IPythonNotebookApp.ip', - 'port': 'IPythonNotebookApp.port', - 'keyfile': 'IPythonNotebookApp.keyfile', - 'certfile': 'IPythonNotebookApp.certfile', - 'ws-hostname': 'IPythonNotebookApp.ws_hostname', + 'ip': 'NotebookApp.ip', + 'port': 'NotebookApp.port', + 'keyfile': 'NotebookApp.keyfile', + 'certfile': 'NotebookApp.certfile', + 'ws-hostname': 'NotebookApp.ws_hostname', 'notebook-dir': 'NotebookManager.notebook_dir', }) @@ -141,10 +141,10 @@ notebook_aliases = [u'port', u'ip', u'keyfile', u'certfile', u'ws-hostname', u'notebook-dir'] #----------------------------------------------------------------------------- -# IPythonNotebookApp +# NotebookApp #----------------------------------------------------------------------------- -class IPythonNotebookApp(BaseIPythonApplication): +class NotebookApp(BaseIPythonApplication): name = 'ipython-notebook' default_config_file_name='ipython_notebook_config.py' @@ -213,7 +213,7 @@ class IPythonNotebookApp(BaseIPythonApplication): return prefix + self.ws_hostname + u':' + unicode(self.port) def parse_command_line(self, argv=None): - super(IPythonNotebookApp, self).parse_command_line(argv) + super(NotebookApp, self).parse_command_line(argv) if argv is None: argv = sys.argv[1:] @@ -254,14 +254,14 @@ class IPythonNotebookApp(BaseIPythonApplication): self.notebook_manager.list_notebooks() def init_logging(self): - super(IPythonNotebookApp, self).init_logging() + super(NotebookApp, self).init_logging() # This prevents double log messages because tornado use a root logger that # self.log is a child of. The logging module dipatches log messages to a log # and all of its ancenstors until propagate is set to False. self.log.propagate = False def initialize(self, argv=None): - super(IPythonNotebookApp, self).initialize(argv) + super(NotebookApp, self).initialize(argv) self.init_configurables() self.web_app = NotebookWebApplication( self, self.kernel_manager, self.notebook_manager, self.log @@ -309,7 +309,7 @@ class IPythonNotebookApp(BaseIPythonApplication): #----------------------------------------------------------------------------- def launch_new_instance(): - app = IPythonNotebookApp() + app = NotebookApp() app.initialize() app.start() diff --git a/IPython/frontend/html/notebook/static/js/savewidget.js b/IPython/frontend/html/notebook/static/js/savewidget.js index f3a7216f0..2c7f631d5 100644 --- a/IPython/frontend/html/notebook/static/js/savewidget.js +++ b/IPython/frontend/html/notebook/static/js/savewidget.js @@ -82,7 +82,7 @@ var IPython = (function (IPython) { SaveWidget.prototype.set_document_title = function () { nbname = this.get_notebook_name(); - document.title = 'IPy: ' + nbname; + document.title = nbname; }; diff --git a/IPython/frontend/html/notebook/templates/login.html b/IPython/frontend/html/notebook/templates/login.html index 043ca09be..817b83352 100644 --- a/IPython/frontend/html/notebook/templates/login.html +++ b/IPython/frontend/html/notebook/templates/login.html @@ -7,21 +7,18 @@ IPython Notebook - - - - + diff --git a/IPython/frontend/html/notebook/templates/nbbrowser.html b/IPython/frontend/html/notebook/templates/nbbrowser.html index 68ec273fa..35eb123b8 100644 --- a/IPython/frontend/html/notebook/templates/nbbrowser.html +++ b/IPython/frontend/html/notebook/templates/nbbrowser.html @@ -7,9 +7,6 @@ IPython Notebook - - - diff --git a/IPython/frontend/html/notebook/templates/notebook.html b/IPython/frontend/html/notebook/templates/notebook.html index 2dde972d6..7dea60fbe 100644 --- a/IPython/frontend/html/notebook/templates/notebook.html +++ b/IPython/frontend/html/notebook/templates/notebook.html @@ -6,10 +6,6 @@ IPython Notebook - - - - +