diff options
author | eric <eric@FreeBSD.org> | 2001-07-18 05:21:37 +0000 |
---|---|---|
committer | eric <eric@FreeBSD.org> | 2001-07-18 05:21:37 +0000 |
commit | 8add8ad5e6825c9194d41c0c0834752ab813670e (patch) | |
tree | 45df167134c7d6b83d8a366ba206a62d45e7d802 /gnu/lib/libdialog/tree.c | |
parent | d329620fddc96c45ac2ce6cd2a74189d6ab7e106 (diff) | |
download | FreeBSD-src-8add8ad5e6825c9194d41c0c0834752ab813670e.zip FreeBSD-src-8add8ad5e6825c9194d41c0c0834752ab813670e.tar.gz |
Improve the interface provided by libdialog. Move a cursor around over
the components and trigger actions based on its position. This reduces
the need to remember the functions of various keys, and makes the
interface more consistant across library.
~
Diffstat (limited to 'gnu/lib/libdialog/tree.c')
-rw-r--r-- | gnu/lib/libdialog/tree.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/lib/libdialog/tree.c b/gnu/lib/libdialog/tree.c index 43c7399..f40fb15 100644 --- a/gnu/lib/libdialog/tree.c +++ b/gnu/lib/libdialog/tree.c @@ -8,6 +8,11 @@ * */ +#ifndef lint +static const char rcsid[] = + "$FreeBSD$"; +#endif + #include <stdlib.h> #include <strings.h> #include <stdio.h> @@ -387,7 +392,7 @@ int dialog_treemenu(unsigned char *title, unsigned char *prompt, redraw_menu = TRUE; break; case KEY_NPAGE: - case ' ' : + case 'f' : if (scroll + menu_height >= item_no-1 - menu_height) { /* can we go down a full page? */ scroll = item_no - menu_height; if (scroll < 0) scroll = 0; @@ -434,6 +439,7 @@ int dialog_treemenu(unsigned char *title, unsigned char *prompt, } wrefresh(dialog); break; + case ' ': case '\r': case '\n': delwin(dialog); |