]> granicus.if.org Git - mutt/commitdiff
Mixmaster user interface beautification.
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 14 Jan 1999 13:08:46 +0000 (13:08 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 14 Jan 1999 13:08:46 +0000 (13:08 +0000)
compose.c

index 4aa5bdf939da039328bb9fcfc5495ea59bd3aab8..402558110c7696fd12100dfa12051f9ebbc7db75 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -225,27 +225,31 @@ static int pgp_send_menu (int bits, int *redraw)
 static void redraw_mix_line (LIST *chain)
 {
   int c;
+  char *t;
 
   mvaddstr (HDR_MIX, 0,     "     Mix: ");
 
   if (!chain)
   {
-    addstr ("no");
+    addstr ("<no chain defined>");
     clrtoeol ();
     return;
   }
   
   for (c = 12; chain; chain = chain->next)
   {
-    if (c + mutt_strlen ((char *) chain->data) + 2 >= COLS)
+    t = chain->data;
+    if (t && t[0] == '0' && t[1] == '\0')
+      t = "<random>";
+    
+    if (c + mutt_strlen (t) + 2 >= COLS)
       break;
 
-    
-    addstr (NONULL((char *) chain->data));
+    addstr (NONULL(t));
     if (chain->next)
       addstr (", ");
 
-    c += mutt_strlen ((char *) chain->data) + 2;
+    c += mutt_strlen (t) + 2;
   }
 }
 #endif