[BRLTTY] [PATCH] add a verbose space speech setting

Dave Mielke dave at mielke.cc
Fri May 18 20:42:07 EDT 2012


[quoted lines by Dave Mielke on 2012/05/18 at 19:29 -0400]

>Actually, it wouldn't be hard to do at all. Probably only three or four lines 
>of code to do it.  :-) I think, though, that having non-text show up on the 
>left when scrolling up/down would actually probably throw a lot of users for a 
>bit of a loop. I don't think that I myself would like it very much, either. Of 
>course, it could just be a matter of getting used to - who knows.

Here's the patch (attached as brltty-submenu-close.patch). Jusgt two changed 
lines and one new line. The colon is still there as it's hard-coded. If this 
way is really better then I'll commit the patch and deal with the colon. 
Please, everyone, let me know what you think.

-- 
Dave Mielke           | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | 2011 May 21 is the End of Salvation.
EMail: dave at mielke.cc | Canada  K2A 1H7   | http://Mielke.cc/now.html
http://FamilyRadio.com/                   | http://Mielke.cc/bible/
-------------- next part --------------
Index: Programs/menu.c
===================================================================
--- Programs/menu.c	(revision 6464)
+++ Programs/menu.c	(working copy)
@@ -645,7 +645,7 @@
 
 static const char *
 getValue_close (const MenuItem *item) {
-  return "<---";
+  return getMenuItemName(getSelectedMenuItem(item->menu->parent))->label;
 }
 
 static const MenuItemMethods menuItemMethods_close = {
@@ -661,9 +661,10 @@
 
   if ((submenu = malloc(sizeof(*submenu)))) {
     if ((submenu->menu = newMenu())) {
+      static const MenuString closeName = {.label="<---"};
       MenuItem *close;
 
-      if ((close = newMenuItem(submenu->menu, NULL, name))) {
+      if ((close = newMenuItem(submenu->menu, NULL, &closeName))) {
         MenuItem *item;
 
         if ((item = newMenuItem(menu, NULL, name))) {


More information about the BRLTTY mailing list