commit 2b8b732d4e2d996c19353e453ddbc95eeeb88a2e Author: Damian Johnson atagar@torproject.org Date: Mon Sep 28 22:21:16 2015 +0200
Drop menu option to toggle filtering
We already show "press 'a' to show all options". Menu option doesn't provide any value. --- nyx/config_panel.py | 15 +-------------- nyx/menu/actions.py | 8 -------- 2 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/nyx/config_panel.py b/nyx/config_panel.py index 83c4d4b..03a44fc 100644 --- a/nyx/config_panel.py +++ b/nyx/config_panel.py @@ -191,9 +191,7 @@ class ConfigPanel(panel.Panel): config_names = tor_controller().get_info('config/names', None)
if config_names: - config_option_lines = config_names.strip().split('\n') - - for line in config_option_lines: + for line in config_names.strip().split('\n'): # lines are of the form "<option> <type>[ <documentation>]", like: # UseEntryGuards Boolean # documentation is aparently only in older versions (for instance, @@ -230,17 +228,6 @@ class ConfigPanel(panel.Panel):
return self.scroller.get_cursor_selection(self._get_config_options())
- def set_filtering(self, is_filtered): - """ - Sets if configuration options are filtered or not. - - Arguments: - is_filtered - if true then only relatively important options will be - shown, otherwise everything is shown - """ - - self.show_all = not is_filtered - def show_sort_dialog(self): """ Provides the dialog for sorting our configuration options. diff --git a/nyx/menu/actions.py b/nyx/menu/actions.py index 884d550..32313b4 100644 --- a/nyx/menu/actions.py +++ b/nyx/menu/actions.py @@ -275,14 +275,6 @@ def make_configuration_menu(config_panel): config_menu = nyx.menu.item.Submenu('Configuration') config_menu.add(nyx.menu.item.MenuItem('Save Config...', config_panel.show_write_dialog)) config_menu.add(nyx.menu.item.MenuItem('Sorting...', config_panel.show_sort_dialog)) - - if config_panel.show_all: - label, arg = 'Filter', True - else: - label, arg = 'Unfilter', False - - config_menu.add(nyx.menu.item.MenuItem('%s Options' % label, functools.partial(config_panel.set_filtering, arg))) - return config_menu
tor-commits@lists.torproject.org