From 8add8ad5e6825c9194d41c0c0834752ab813670e Mon Sep 17 00:00:00 2001 From: eric Date: Wed, 18 Jul 2001 05:21:37 +0000 Subject: 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. ~ --- gnu/lib/libdialog/tree.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gnu/lib/libdialog/tree.c') 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 #include #include @@ -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); -- cgit v1.1