[or-cvs] r23742: {arm} Hiding virtual options by default. (in arm/trunk: . src/interface)

Damian Johnson atagar1 at gmail.com
Wed Nov 3 16:45:00 UTC 2010


Author: atagar
Date: 2010-11-03 16:45:00 +0000 (Wed, 03 Nov 2010)
New Revision: 23742

Modified:
   arm/trunk/armrc.sample
   arm/trunk/src/interface/configStatePanel.py
Log:
Hiding virtual options by default.



Modified: arm/trunk/armrc.sample
===================================================================
--- arm/trunk/armrc.sample	2010-11-03 16:39:29 UTC (rev 23741)
+++ arm/trunk/armrc.sample	2010-11-03 16:45:00 UTC (rev 23742)
@@ -67,6 +67,9 @@
 # showPrivateOptions
 #   tor provides config options of the form "__<option>" that can be dangerous
 #   to set, if true arm provides these on the config panel
+# showVirtualOptions
+#   virtual options are placeholders for other option groups, never having
+#   values or being setable themselves
 
 features.config.type 0
 features.config.state.colWidth.option 25
@@ -74,6 +77,7 @@
 features.config.file.showScrollbars true
 features.config.file.maxLinesPerEntry 8
 features.config.showPrivateOptions false
+features.config.showVirtualOptions false
 
 # Descriptions for tor's configuration options can be loaded from its man page
 # to give usage information on the settings page. They can also be persisted to

Modified: arm/trunk/src/interface/configStatePanel.py
===================================================================
--- arm/trunk/src/interface/configStatePanel.py	2010-11-03 16:39:29 UTC (rev 23741)
+++ arm/trunk/src/interface/configStatePanel.py	2010-11-03 16:45:00 UTC (rev 23742)
@@ -9,6 +9,7 @@
 from util import conf, panel, torTools, torConfig, uiTools
 
 DEFAULT_CONFIG = {"features.config.showPrivateOptions": False,
+                  "features.config.showVirtualOptions": False,
                   "features.config.state.colWidth.option": 25,
                   "features.config.state.colWidth.value": 15}
 
@@ -126,9 +127,11 @@
         line = configOptionQuery[lineNum]
         confOption, confType = line.strip().split(" ", 1)
         
-        # skips private entires if not set to show them
+        # skips private and virtual entires if not set to show them
         if not self._config["features.config.showPrivateOptions"] and confOption.startswith("__"):
           continue
+        elif not self._config["features.config.showVirtualOptions"] and confType == "Virtual":
+          continue
         
         cat, arg, desc = None, "", ""
         descriptionComp = torConfig.getConfigDescription(confOption)



More information about the tor-commits mailing list