From 18beaff887e8e3cd0b2d91add4d0071ce4500a50 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Tue, 31 Dec 2013 11:10:27 -0700 Subject: [PATCH] Remove unused code and debugging statements --- IPython/html/static/notebook/js/widgets/base.js | 4 ---- IPython/html/static/notebook/js/widgets/container.js | 6 ------ IPython/html/static/notebook/js/widgets/multicontainer.js | 1 - IPython/html/widgets/widget.py | 3 --- IPython/html/widgets/widget_container.py | 3 +-- IPython/html/widgets/widget_multicontainer.py | 3 +-- 6 files changed, 2 insertions(+), 18 deletions(-) diff --git a/IPython/html/static/notebook/js/widgets/base.js b/IPython/html/static/notebook/js/widgets/base.js index d453055c0..a8218b5d3 100644 --- a/IPython/html/static/notebook/js/widgets/base.js +++ b/IPython/html/static/notebook/js/widgets/base.js @@ -46,7 +46,6 @@ function(widget_manager, underscore, backbone){ send: function (content, callbacks) { - console.log('send',content, callbacks); if (this.comm !== undefined) { var data = {method: 'custom', custom_content: content}; this.comm.send(data, callbacks); @@ -172,7 +171,6 @@ function(widget_manager, underscore, backbone){ // Build a callback dict. cell_callbacks: function (cell) { var callbacks = {}; - console.log('cell_callbacks A', cell); if (cell === undefined) { // Used the last modified view as the sender of the message. This // will insure that any python code triggered by the sent message @@ -184,7 +182,6 @@ function(widget_manager, underscore, backbone){ cell = null; } } - console.log('cell_callbacks B', cell); if (cell !== null) { // Try to get output handlers @@ -215,7 +212,6 @@ function(widget_manager, underscore, backbone){ }, }; } - console.log('constructed callbacks for',cell); return callbacks; }, }); diff --git a/IPython/html/static/notebook/js/widgets/container.js b/IPython/html/static/notebook/js/widgets/container.js index aba568fe2..85cd444d8 100644 --- a/IPython/html/static/notebook/js/widgets/container.js +++ b/IPython/html/static/notebook/js/widgets/container.js @@ -230,12 +230,6 @@ define(["notebook/js/widgets/base"], function(widget_manager) { return IPython.WidgetView.prototype.update.call(this); }, - - add_child_view: function(attr, view) { - if (attr==='children') { - this.$body.append(view.$el); - } - }, _get_selector_element: function(selector) { diff --git a/IPython/html/static/notebook/js/widgets/multicontainer.js b/IPython/html/static/notebook/js/widgets/multicontainer.js index e3202cb45..09a2ef52f 100644 --- a/IPython/html/static/notebook/js/widgets/multicontainer.js +++ b/IPython/html/static/notebook/js/widgets/multicontainer.js @@ -108,7 +108,6 @@ define(["notebook/js/widgets/base"], function(widget_manager){ }, render: function(){ - console.log('rendering tabs', this); var uuid = 'tabs'+IPython.utils.uuid(); var that = this; this.$tabs = $('
', {id: uuid}) diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index b1f2909ee..74bf6c33d 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -70,9 +70,6 @@ class BaseWidget(LoggingConfigurable): self._msg_callbacks = [] super(BaseWidget, self).__init__(**kwargs) - # Register after init to allow default values to be specified - # TODO: register three different handlers, one for each list, and abstract out the common parts - #print self.keys, self._children_attr, self._children_lists_attr self.on_trait_change(self._handle_property_changed, self.keys) Widget._handle_widget_constructed(self) diff --git a/IPython/html/widgets/widget_container.py b/IPython/html/widgets/widget_container.py index 754a96716..b1528ab66 100644 --- a/IPython/html/widgets/widget_container.py +++ b/IPython/html/widgets/widget_container.py @@ -23,8 +23,7 @@ class ContainerWidget(Widget): target_name = Unicode('ContainerWidgetModel') default_view_name = Unicode('ContainerView') - children = []#List(Instance('IPython.html.widgets.widget.Widget')) - _children_lists_attr = List(Unicode, ['children']) + children = [] #List(Instance('IPython.html.widgets.widget.Widget')) # Keys, all private and managed by helper methods. Flexible box model # classes... diff --git a/IPython/html/widgets/widget_multicontainer.py b/IPython/html/widgets/widget_multicontainer.py index 9835c082c..149a6b0a9 100644 --- a/IPython/html/widgets/widget_multicontainer.py +++ b/IPython/html/widgets/widget_multicontainer.py @@ -29,8 +29,7 @@ class MulticontainerWidget(Widget): _titles = Dict(help="Titles of the pages") selected_index = Int(0) - children = []#List(Instance('IPython.html.widgets.widget.Widget')) - _children_lists_attr = List(Unicode, ['children']) + children = [] #List(Instance('IPython.html.widgets.widget.Widget')) # Public methods def set_title(self, index, title):