commit 93446e76246a24c953a59d6ac5c4b95751d602da
Author: Damian Johnson <ata...@torproject.org>
Date:   Thu Sep 3 07:53:36 2015 -0700

    Drop features.connection.showColumn.* config options
    
    More nyxrc options I don't think anybody's ever used.
---
 nyx/connections/conn_entry.py |   24 +++++++++---------------
 nyxrc.sample                  |    6 ------
 2 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/nyx/connections/conn_entry.py b/nyx/connections/conn_entry.py
index 1f2439d..d76808d 100644
--- a/nyx/connections/conn_entry.py
+++ b/nyx/connections/conn_entry.py
@@ -29,10 +29,6 @@ LABEL_MIN_PADDING = 2  # min space between listing label and 
following data
 CONFIG = conf.config_dict('nyx', {
   'features.connection.showIps': True,
   'features.connection.showExitPort': True,
-  'features.connection.showColumn.fingerprint': True,
-  'features.connection.showColumn.nickname': True,
-  'features.connection.showColumn.destination': True,
-  'features.connection.showColumn.expandedIp': True,
 })
 
 
@@ -194,13 +190,13 @@ class ConnectionLine(object):
     etc, used_space = '', 0
 
     if listing_type == nyx.connection_panel.Listing.IP_ADDRESS:
-      if width > used_space + 42 and 
CONFIG['features.connection.showColumn.fingerprint']:
+      if width > used_space + 42:
         # show fingerprint (column width: 42 characters)
 
         etc += '%-40s  ' % self.get_fingerprint('UNKNOWN')
         used_space += 42
 
-      if width > used_space + 10 and 
CONFIG['features.connection.showColumn.nickname']:
+      if width > used_space + 10:
         # show nickname (column width: remainder)
 
         nickname_space = width - used_space
@@ -217,26 +213,24 @@ class ConnectionLine(object):
         # ip/port/locale (column width: 28 characters)
 
         is_locale_included = width > used_space + 45
-        is_locale_included &= 
CONFIG['features.connection.showColumn.destination']
 
         if is_locale_included:
           nickname_space -= 28
 
-        if CONFIG['features.connection.showColumn.nickname']:
-          nickname_label = str_tools.crop(self.get_nickname('UNKNOWN'), 
nickname_space, 0)
-          etc += ('%%-%is  ' % nickname_space) % nickname_label
-          used_space += nickname_space + 2
+        nickname_label = str_tools.crop(self.get_nickname('UNKNOWN'), 
nickname_space, 0)
+        etc += ('%%-%is  ' % nickname_space) % nickname_label
+        used_space += nickname_space + 2
 
         if is_locale_included:
           etc += '%-26s  ' % destination_address
           used_space += 28
     else:
-      if width > used_space + 42 and 
CONFIG['features.connection.showColumn.fingerprint']:
+      if width > used_space + 42:
         # show fingerprint (column width: 42 characters)
         etc += '%-40s  ' % self.get_fingerprint('UNKNOWN')
         used_space += 42
 
-      if width > used_space + 28 and 
CONFIG['features.connection.showColumn.destination']:
+      if width > used_space + 28:
         # show destination ip/port/locale (column width: 28 characters)
         etc += '%-26s  ' % destination_address
         used_space += 28
@@ -305,10 +299,10 @@ class ConnectionLine(object):
 
       is_expanded_address_visible = width > used_space + 28
 
-      if is_expanded_address_visible and 
CONFIG['features.connection.showColumn.fingerprint']:
+      if is_expanded_address_visible:
         is_expanded_address_visible = width < used_space + 42 or width > 
used_space + 70
 
-      if address_differ and is_expansion_type and is_expanded_address_visible 
and self.include_expanded_addresses and 
CONFIG['features.connection.showColumn.expandedIp']:
+      if address_differ and is_expansion_type and is_expanded_address_visible 
and self.include_expanded_addresses:
         # include the internal address in the src (extra 28 characters)
 
         internal_address = self.connection.local_address + local_port
diff --git a/nyxrc.sample b/nyxrc.sample
index e453320..d922081 100644
--- a/nyxrc.sample
+++ b/nyxrc.sample
@@ -205,18 +205,12 @@ features.graph.bw.accounting.show true
 #   false
 # showExitPort
 #   shows port related information of exit connections we relay if true
-# showColumn.*
-#   toggles the visability of the connection table columns
 
 features.connection.listingType IP_ADDRESS
 features.connection.order CATEGORY, LISTING, UPTIME
 features.connection.resolveApps true
 features.connection.showIps true
 features.connection.showExitPort true
-features.connection.showColumn.fingerprint true
-features.connection.showColumn.nickname true
-features.connection.showColumn.destination true
-features.connection.showColumn.expandedIp true
 
 # Caching parameters
 cache.logPanel.size 1000



_______________________________________________
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to