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/textbox.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/textbox.c')
-rw-r--r-- | gnu/lib/libdialog/textbox.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gnu/lib/libdialog/textbox.c b/gnu/lib/libdialog/textbox.c index 91f43a2..a617ac8 100644 --- a/gnu/lib/libdialog/textbox.c +++ b/gnu/lib/libdialog/textbox.c @@ -18,6 +18,10 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef lint +static const char rcsid[] = + "$FreeBSD$"; +#endif #include <dialog.h> #include "dialog.priv.h" @@ -147,7 +151,7 @@ int dialog_textbox(unsigned char *title, unsigned char *file, int height, int wi wmove(dialog, cur_y, cur_x); /* Restore cursor position */ wrefresh(dialog); - while ((key != ESC) && (key != '\n') && (key != '\r')) { + while ((key != ESC) && (key != '\n') && (key != '\r') && (key != ' ')) { key = wgetch(dialog); switch (key) { case 'E': /* Exit */ |