diff --git a/IPython/core/display.py b/IPython/core/display.py index 82a9187..5cd6482 100644 --- a/IPython/core/display.py +++ b/IPython/core/display.py @@ -117,7 +117,7 @@ def display(*objs, **kwargs): # If _ipython_display_ is defined, use that to display this object. If # it returns NotImplemented, use the _repr_ logic (default). - if not hasattr(obj, '_ipython_display_') or isinstance(obj._ipython_display_(**kwargs), NotImplemented): + if not hasattr(obj, '_ipython_display_') or obj._ipython_display_(**kwargs) == NotImplemented: if raw: publish_display_data('display', obj, metadata) else: diff --git a/IPython/html/static/notebook/js/widgets/widget_bool.js b/IPython/html/static/notebook/js/widgets/widget_bool.js index b3c032f..bb78b96 100644 --- a/IPython/html/static/notebook/js/widgets/widget_bool.js +++ b/IPython/html/static/notebook/js/widgets/widget_bool.js @@ -15,7 +15,7 @@ **/ define(["notebook/js/widgets/widget"], function(widget_manager){ - var CheckboxView = IPython.DOMWidgetView.extend({ + var CheckBoxView = IPython.DOMWidgetView.extend({ // Called when view is rendered. render : function(){ @@ -60,12 +60,12 @@ define(["notebook/js/widgets/widget"], function(widget_manager){ this.$label.show(); } } - return CheckboxView.__super__.update.apply(this); + return CheckBoxView.__super__.update.apply(this); }, }); - widget_manager.register_widget_view('CheckboxView', CheckboxView); + widget_manager.register_widget_view('CheckBoxView', CheckBoxView); var ToggleButtonView = IPython.DOMWidgetView.extend({ diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index d6b64a9..25bbc9c 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -166,7 +166,7 @@ class Widget(LoggingConfigurable): def _handle_property_changed(self, name, old, new): """Called when a property has been changed.""" # Make sure this isn't information that the front-end just sent us. - if should_send_property(self, name, new): + if self.should_send_property(name, new): # Send new state to front-end self.send_state(key=name) diff --git a/IPython/html/widgets/widget_bool.py b/IPython/html/widgets/widget_bool.py index 830f55a..0ad088a 100644 --- a/IPython/html/widgets/widget_bool.py +++ b/IPython/html/widgets/widget_bool.py @@ -27,6 +27,6 @@ class CheckBoxWidget(DOMWidget): description = Unicode('', help="Description of the boolean (label).", sync=True) disabled = Bool(False, help="Enable or disable user changes.", sync=True) -class ToggleButtonWidget(CheckboxWidget): +class ToggleButtonWidget(CheckBoxWidget): view_name = Unicode('ToggleButtonView', sync=True) \ No newline at end of file diff --git a/IPython/html/widgets/widget_selection.py b/IPython/html/widgets/widget_selection.py index f818963..4605e5a 100644 --- a/IPython/html/widgets/widget_selection.py +++ b/IPython/html/widgets/widget_selection.py @@ -29,13 +29,13 @@ class ToggleButtonsWidget(DOMWidget): description = Unicode(help="Description of the value this widget represents", sync=True) -class DropdownWidget(SelectionWidget): +class DropdownWidget(ToggleButtonsWidget): view_name = Unicode('DropdownView', sync=True) -class RadioButtonsWidget(SelectionWidget): +class RadioButtonsWidget(ToggleButtonsWidget): view_name = Unicode('RadioButtonsView', sync=True) -class ListBoxWidget(SelectionWidget): +class ListBoxWidget(ToggleButtonsWidget): view_name = Unicode('ListBoxView', sync=True)