Package: aumix
Version: 2.8-17
Severity: wishlist
Tags: patch

To show that a control has the focus, a character like '<' or '>' is
printed close to it. However, this makes it hard for a blind person to
determine which control has the focus. The most conventient way for a
blind person to see which part of the screen contains the important piece
of information is to put the cursor at the beginning of this part of
screen.

This is precisely what the included patch does: it puts the cursor on the
control which has the focus.
This is a patch against upstream sources. Don't know how to apply it to
a Debian package properly. Thanks a lot in advance to the maintainer
of the aumix Debian package for modifying / applying this patch, if he
feels this is a good idea.

Two things that should be precised :

(1) The patch contains just the idea. Anybody should feel free to modify
    it.

(2) This patch might affect the visual look of aumix on some terminals
    where the cursor can't be hidden. So perhaps the modifications
    should be guarded by a command-line option, an environment variable,
    or so. To be discussed with upstream, probably.

The patch itself :

--- src/curses.c        2005-12-25 09:56:07.000000000 +0100
+++ src/curses.c.new    2005-12-25 09:54:50.000000000 +0100
@@ -29,6 +29,7 @@
 char           *chark, *charl, *charm, *charo, *charq, *chars, *charu, *lang;
 int             current_dev, level_increment, balance_increment, menu_width, 
level_width, label_width, balance_width, levelbalmode, cols_saved, lines_saved;
 int             in_keysbox = FALSE;
+static int cursorX = -1, cursorY = -1;
 
 void            InitScreenCurses(void)
 {
@@ -140,7 +141,12 @@
        refresh();
        attrset(COLOR_PAIR(MENU_COLOR) | A_UNDERLINE);
        mvaddch(0, 4, 'x');
+       if (cursorY>=0) {
+               move(cursorY, cursorX);
+               leaveok(stdscr, FALSE);
+       }
        refresh();
+       if (cursorY>=0) leaveok(stdscr, TRUE);
 }
 
 void            HighlightLabelCurses(void)
@@ -487,8 +493,12 @@
        if ((1 << dev) & devmask) {
                if ((mode) && ((1 << dev) & stereodevs)) {
                        mvaddch(YOFFSET + y, XOFFSET + menu_width + R_P_WIDTH + 
level_width + ARROW_WIDTH + label_width, '>');
+                       cursorY = YOFFSET + y;
+                       cursorX = XOFFSET + menu_width + R_P_WIDTH + 
level_width + ARROW_WIDTH + label_width;
                } else {
                        mvaddch(YOFFSET + y, XOFFSET + menu_width + R_P_WIDTH + 
level_width, '<');
+                       cursorY = YOFFSET + y;
+                       cursorX = XOFFSET + menu_width;
                }
        }
        PlaceCursor();


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13.4
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages aumix depends on:
ii  libc6                         2.3.5-9    GNU C Library: Shared libraries an
ii  libgpmg1                      1.19.6-21  General Purpose Mouse - shared lib
ii  libncurses5                   5.5-1      Shared libraries for terminal hand

aumix recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to