[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [nyx/master] Always show modified config options in panel
commit a68979dd009cbff62f2811a2357f9f1455d477d0
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Sun Jan 3 15:57:10 2016 -0800
Always show modified config options in panel
In addition to showing important options, showing anything that's modified in
the panel too. If users have set it obviously they're important. ;)
Turns out the previous method we were using to see if options were set was
completely broken. Using the new method stem provides to do this.
---
nyx/config_panel.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/nyx/config_panel.py b/nyx/config_panel.py
index eb12999..47d25b8 100644
--- a/nyx/config_panel.py
+++ b/nyx/config_panel.py
@@ -78,7 +78,7 @@ class ConfigEntry(object):
:returns: **True** if the option has a custom value, **False** otherwise
"""
- return bool(tor_controller().get_conf(self.name, None))
+ return tor_controller().is_set(self.name, False)
def sort_value(self, attr):
"""
@@ -265,7 +265,7 @@ class ConfigPanel(panel.Panel):
('page down', 'scroll down a page', None),
('enter', 'edit configuration option', None),
('w', 'write torrc', None),
- ('a', 'toggle option filtering', None),
+ ('a', 'toggle filtering', None),
('s', 'sort ordering', None),
]
@@ -328,7 +328,7 @@ class ConfigPanel(panel.Panel):
break
def _get_config_options(self):
- return self._contents if self._show_all else filter(lambda entry: stem.manual.is_important(entry.name), self._contents)
+ return self._contents if self._show_all else filter(lambda entry: stem.manual.is_important(entry.name) or entry.is_set(), self._contents)
def _draw_selection_panel(self, selection, width, detail_panel_height, is_scrollbar_visible):
"""
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits