Author: atagar Date: 2011-04-02 22:10:13 +0000 (Sat, 02 Apr 2011) New Revision: 24536
Modified: arm/trunk/src/interface/connections/circEntry.py Log: Alignment fixes for the circ entries.
Modified: arm/trunk/src/interface/connections/circEntry.py =================================================================== --- arm/trunk/src/interface/connections/circEntry.py 2011-04-02 21:54:34 UTC (rev 24535) +++ arm/trunk/src/interface/connections/circEntry.py 2011-04-02 22:10:13 UTC (rev 24536) @@ -127,7 +127,8 @@
for i in range(len(etcAttr), -1, -1): etcLabel = ", ".join(etcAttr[:i]) - if len(etcLabel) <= width: return etcLabel + if len(etcLabel) <= width: + return ("%%-%is" % width) % etcLabel
return ""
@@ -202,8 +203,8 @@ dst = "%-55s" % self.foreign.getFingerprint() etc = self.getEtcContent(width - baselineSpace - len(dst), listingType) else: - # min space for the nickname is 50 characters - etc = self.getEtcContent(width - baselineSpace - 50, listingType) + # min space for the nickname is 56 characters + etc = self.getEtcContent(width - baselineSpace - 56, listingType) dstLayout = "%%-%is" % (width - baselineSpace - len(etc)) dst = dstLayout % self.foreign.getNickname()