From b9d636a5f96e409a1e7ce5a23c05d1c36edd8bcd 2014-02-13 17:36:24 From: Jonathan Frederic Date: 2014-02-13 17:36:24 Subject: [PATCH] Removed 'list' view Only provide 'details' view --- diff --git a/examples/widgets/Variable Inspector.ipynb b/examples/widgets/Variable Inspector.ipynb index 210dba9..7413c21 100644 --- a/examples/widgets/Variable Inspector.ipynb +++ b/examples/widgets/Variable Inspector.ipynb @@ -1,6 +1,7 @@ { "metadata": { - "name": "" + "name": "", + "signature": "sha256:7b872a09743460a3ce0358e9010c3b4baf5136b79a2a075964dea2c2fd85c82e" }, "nbformat": 3, "nbformat_minor": 0, @@ -76,18 +77,12 @@ " self._modal_body_label = widgets.HTMLWidget(value = 'Not hooked')\n", " self._modal_body.children = [self._modal_body_label]\n", "\n", - " self._modal_footer = widgets.ContainerWidget()\n", - " self._var_filter = widgets.ToggleButtonsWidget(description=\"Method:\", values=['List', 'Details'], value='List')\n", - " self._modal_footer.children = [self._var_filter]\n", - "\n", " self._popout.children = [\n", " self._modal_body, \n", - " self._modal_footer,\n", " ]\n", " \n", " self._ipython = ipython\n", " self._ipython.register_post_execute(self._fill)\n", - " self._var_filter.on_trait_change(self._fill, 'value')\n", "\n", " def close(self):\n", " \"\"\"Close and remove hooks.\"\"\"\n", @@ -100,19 +95,14 @@ " def _fill(self):\n", " \"\"\"Fill self with variable information.\"\"\"\n", " values = self.namespace.who_ls()\n", - " mode = self._var_filter.value\n", - " if mode == \"List\":\n", - " self._modal_body_label.value = '
'.join(values)\n", - " elif mode == \"Details\":\n", - " self._modal_body_label.value = '
NameTypeValue
' + \\\n", - " '
'.join(['{0}{1}{2}'.format(v, type(eval(v)).__name__, str(eval(v))) for v in values]) + \\\n", - " '
'\n", + " self._modal_body_label.value = '
NameTypeValue
' + \\\n", + " '
'.join(['{0}{1}{2}'.format(v, type(eval(v)).__name__, str(eval(v))) for v in values]) + \\\n", + " '
'\n", "\n", " def _ipython_display_(self):\n", " \"\"\"Called when display() or pyout is used to display the Variable \n", " Inspector.\"\"\"\n", " self._popout._ipython_display_()\n", - " self._modal_footer.add_class('modal-footer')\n", " self._popout.add_class('vbox')\n", " self._modal_body.add_class('box-flex1')\n" ],