[svn] r4920 - trunk/tools/dstat

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Tue Nov 21 20:35:51 CET 2006


Author: dag
Date: 2006-11-21 20:35:49 +0100 (Tue, 21 Nov 2006)
New Revision: 4920

Modified:
   trunk/tools/dstat/ChangeLog
   trunk/tools/dstat/dstat
Log:
Underline the counter titles.

Modified: trunk/tools/dstat/ChangeLog
===================================================================
--- trunk/tools/dstat/ChangeLog	2006-11-21 19:11:57 UTC (rev 4919)
+++ trunk/tools/dstat/ChangeLog	2006-11-21 19:35:49 UTC (rev 4920)
@@ -2,6 +2,7 @@
 - Fixed dstat_clock to use localtime() instead of gmtime()
 - Added external plugin dstat_vz for openvz cpu statistics
 - Removed the underscoring of the counter titles
+- Added underlining for the counter titles
 
 * 0.6.3 - Amsterdam - released 26/06/2006
 - Changed default (silver) color of delimiter to gray

Modified: trunk/tools/dstat/dstat
===================================================================
--- trunk/tools/dstat/dstat	2006-11-21 19:11:57 UTC (rev 4919)
+++ trunk/tools/dstat/dstat	2006-11-21 19:35:49 UTC (rev 4920)
@@ -309,30 +309,28 @@
 		if isinstance(self.name, types.StringType):
 			max = self.statwidth()
 			return ansi['darkblue'] + self.name[0:max].center(max).replace(' ', '-') + ansi['default']
-		ret = ''
+		ret = ansi['darkblue']
 		for i, name in enumerate(self.name):
 			max = self.width()
 			ret = ret + name[0:max].center(max).replace(' ', '-')
 			if i + 1 != len(self.name): ret = ret + ansi['blue'] + char['dash'] + ansi['darkblue']
-		return ansi['darkblue'] + ret
+		return ret
 
 	def title2(self):
 		if isinstance(self.name, types.StringType):
 			ret = ''
 			for i, nick in enumerate(self.nick):
-#				ret = ret + nick.center(self.format[1]).replace(' ', '_')
-				ret = ret + nick.center(self.format[1])
+				ret = ret + ansi['blue'] + ansi['underline'] + nick.center(self.format[1]) + ansi['default']
 				if i + 1 != len(self.nick): ret = ret + char['space']
-			return ansi['blue'] + ret
+			return ret
 		else:
 			ret = ''
 			for i, name in enumerate(self.name):
 				for j, nick in enumerate(self.nick):
-#					ret = ret + ansi['blue'] + nick.center(self.format[1]).replace(' ', '_')
-					ret = ret + ansi['blue'] + nick.center(self.format[1])
+					ret = ret + ansi['blue'] + ansi['underline'] + nick.center(self.format[1]) + ansi['default']
 					if j + 1 != len(self.nick): ret = ret + char['space']
 				if i + 1 != len(self.name): ret = ret + ansi['gray'] + char['colon']
-			return ansi['blue'] + ret
+			return ret
 
 	def titlecsv(self, nr):
 		if nr == 1:




More information about the commits mailing list