summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libdialog/textbox.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-02-15 19:44:08 +0000
committerache <ache@FreeBSD.org>1995-02-15 19:44:08 +0000
commit8606846519fea95655a87c1758e86ea3e8bffc34 (patch)
treea7743d34a6549d3bf5ac9aa482d97aaadd19fe2a /gnu/lib/libdialog/textbox.c
parentc89046c5551c9d22af39898dd39354fd4f5cae44 (diff)
downloadFreeBSD-src-8606846519fea95655a87c1758e86ea3e8bffc34.zip
FreeBSD-src-8606846519fea95655a87c1758e86ea3e8bffc34.tar.gz
file selector, helpline, helpfile and more, with my fixes
Submitted by: wmbfmk@urc.tue.nl
Diffstat (limited to 'gnu/lib/libdialog/textbox.c')
-rw-r--r--gnu/lib/libdialog/textbox.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/lib/libdialog/textbox.c b/gnu/lib/libdialog/textbox.c
index 0479723..a9a3a28 100644
--- a/gnu/lib/libdialog/textbox.c
+++ b/gnu/lib/libdialog/textbox.c
@@ -59,7 +59,7 @@ int dialog_textbox(unsigned char *title, unsigned char *file, int height, int wi
/* Open input file for reading */
if ((fd = open(file, O_RDONLY)) == -1) {
endwin();
- fprintf(stderr, "\nCan't open input file in dialog_textbox().\n");
+ fprintf(stderr, "\nCan't open input file <%s>in dialog_textbox().\n", file);
exit(-1);
}
/* Get file size. Actually, 'file_size' is the real file size - 1,
@@ -139,6 +139,8 @@ int dialog_textbox(unsigned char *title, unsigned char *file, int height, int wi
waddstr(dialog, title);
waddch(dialog, ' ');
}
+ display_helpline(dialog, height-1, width);
+
print_button(dialog, " EXIT ", height-2, width/2-4, TRUE);
wnoutrefresh(dialog);
getyx(dialog, cur_y, cur_x); /* Save cursor position */
@@ -411,6 +413,9 @@ int dialog_textbox(unsigned char *title, unsigned char *file, int height, int wi
break;
case ESC:
break;
+ case KEY_F(1):
+ display_helpfile();
+ break;
}
}
OpenPOWER on IntegriCloud