]> granicus.if.org Git - mutt/commitdiff
Add $braille_friendly. Behavior originally suggested by Sébastien
authorThomas Roessler <roessler@does-not-exist.org>
Sun, 12 Jun 2005 18:24:31 +0000 (18:24 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Sun, 12 Jun 2005 18:24:31 +0000 (18:24 +0000)
Hinderer <Sebastien.Hinderer@libertysurf.fr>.

curs_main.c
init.h
menu.c
mutt.h

index ff55f1869b953acb2ec816569470e4adb3421c1d..4b6ded44aa73f41ef778d6a5a4719faec18ecc17 100644 (file)
@@ -576,6 +576,8 @@ int mutt_index_menu (void)
 
       if (option (OPTARROWCURSOR))
        move (menu->current - menu->top + menu->offset, 2);
+      else if (option (OPTBRAILLEFRIENDLY))
+       move (menu->current - menu->top + menu->offset, 0);
       else
        move (menu->current - menu->top + menu->offset, COLS - 1);
       mutt_refresh ();
diff --git a/init.h b/init.h
index 9bb00e4d734c544bc2fed04e75ba20b0854f17e0..13d04eac65a80b192474f535f6a92777043154e8 100644 (file)
--- a/init.h
+++ b/init.h
@@ -276,6 +276,15 @@ struct option_t MuttVars[] = {
   ** When this variable is set, mutt will include Delivered-To headers when
   ** bouncing messages.  Postfix users may wish to unset this variable.
   */
+  { "braille_friendly", DT_BOOL, R_NONE, OPTBRAILLEFRIENDLY, 0 },
+  /*
+  ** .pp
+  ** When this variable is set, mutt will place the cursor at the beginning
+  ** of the current line in menus, even when the arrow_cursor variable
+  ** is unset, making it easier for blind persons using Braille displays to 
+  ** follow these menus.  The option is disabled by default because many 
+  ** visual terminals don't permit making the cursor invisible.
+  */
   { "charset",         DT_STR,  R_NONE, UL &Charset, UL 0 },
   /*
   ** .pp
diff --git a/menu.c b/menu.c
index 0600c03e2b08a02656e9cbfd70f9043ad47ca8cb..b5eec902da5310541e3748864d5b86e27d404bfa 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -870,8 +870,14 @@ int mutt_menuLoop (MUTTMENU *menu)
 
 
     /* move the cursor out of the way */
-    move (menu->current - menu->top + menu->offset,
-         (option (OPTARROWCURSOR) ? 2 : COLS-1));
+    
+    
+    if (option (OPTARROWCURSOR))
+      move (menu->current - menu->top + menu->offset, 2);
+    else if (option (OPTBRAILLEFRIENDLY))
+      move (menu->current - menu->top + menu->offset, 0);
+    else
+      move (menu->current - menu->top + menu->offset, COLS - 1);
 
     mutt_refresh ();
     
diff --git a/mutt.h b/mutt.h
index dc92151f77ef686e199671e361c97ec614f19ce9..86e3162352637303ffbf3babda2b59101b58a286 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -334,6 +334,7 @@ enum
   OPTBEEP,
   OPTBEEPNEW,
   OPTBOUNCEDELIVERED,
+  OPTBRAILLEFRIENDLY,
   OPTCHECKNEW,
   OPTCOLLAPSEUNREAD,
   OPTCONFIRMAPPEND,