[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [arm/master] Filling blank space in circ entries with nickname
commit 5e1109836be738ce17adf596d5942f8dab98c020
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Fri Jun 17 20:17:56 2011 -0700
Filling blank space in circ entries with nickname
The circuit entries on the connection panel had empty space besides the ip
address field. Using this for the nickname.
---
src/cli/connections/circEntry.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/cli/connections/circEntry.py b/src/cli/connections/circEntry.py
index 82ef0ff..f94f53a 100644
--- a/src/cli/connections/circEntry.py
+++ b/src/cli/connections/circEntry.py
@@ -192,6 +192,10 @@ class CircLine(connEntry.ConnectionLine):
# dst width is derived as:
# src (21) + dst (26) + divider (7) + right gap (2) - bracket (3) = 53 char
dst = "%-53s" % self.getDestinationLabel(53, includeLocale = True)
+
+ # fills the nickname into the empty space here
+ dst = "%s%-25s " % (dst[:25], uiTools.cropStr(self.foreign.getNickname(), 25, 0))
+
etc = self.getEtcContent(width - baselineSpace - len(dst), listingType)
elif listingType == entries.ListingType.HOSTNAME:
# min space for the hostname is 40 characters
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits