[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

cdebconf text frontend: right align menu numbers



Hi,

The text frontend currently prints lists like this:

  8. Detect disks    
  9. Partition disks
  10. Install the base system    
  11. Set up users and passwords    

It would be much nicer if the numbers were right aligned.  What do you
think about the following patch against cdebconf?

--- src/modules/frontend/text/text.c.orig	2008-04-06 23:07:16.737361321 +0200
+++ src/modules/frontend/text/text.c	2008-04-06 23:11:31.873360919 +0200
@@ -237,7 +237,7 @@
 	{
 		/*  Trailing spaces are a placeholder to add [*] for
 		    selected values */
-		asprintf(&(fchoices[i]), "  %d. %s    ", i+1, choices_translated[i]);
+		asprintf(&(fchoices[i]), "%3d. %s    ", i+1, choices_translated[i]);
 		if (selected[tindex[i]])
 			strcpy(fchoices[i]+strlen(fchoices[i])-3, "[*]");
 		if (strwidth(fchoices[i]) < choice_min || choice_min == -1)
-- 
Thanks,
Feri.


Reply to: