aboutsummaryrefslogtreecommitdiff
path: root/gnu/lib
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1996-04-08 10:02:55 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1996-04-08 10:02:55 +0000
commit3d681421e0bc2e3c5ca9ce878b9a4a5d3ff0d1da (patch)
tree4be3224ee16df0029cf314f8467a1df6e4169ced /gnu/lib
parenta925b654ee9da829bb4e7f999014a02ceb89ad20 (diff)
Notes
Diffstat (limited to 'gnu/lib')
-rw-r--r--gnu/lib/libdialog/checklist.c16
-rw-r--r--gnu/lib/libdialog/menubox.c12
-rw-r--r--gnu/lib/libdialog/radiolist.c16
3 files changed, 33 insertions, 11 deletions
diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c
index 391e351b07d5..b93baf5e6826 100644
--- a/gnu/lib/libdialog/checklist.c
+++ b/gnu/lib/libdialog/checklist.c
@@ -199,8 +199,10 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi
/* Shortcut to OK? */
if (toupper(key) == okButton) {
if (ditems && result && ditems[OK_BUTTON].fire) {
- if (ditems[OK_BUTTON].fire(&ditems[OK_BUTTON]) == DITEM_FAILURE)
+ if (ditems[OK_BUTTON].fire(&ditems[OK_BUTTON]) == DITEM_FAILURE) {
+ wrefresh(dialog);
continue;
+ }
else
delwin(dialog);
}
@@ -219,8 +221,10 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi
/* Shortcut to cancel? */
else if (toupper(key) == cancelButton) {
if (ditems && result && ditems[CANCEL_BUTTON].fire) {
- if (ditems[CANCEL_BUTTON].fire(&ditems[CANCEL_BUTTON]) == DITEM_FAILURE)
+ if (ditems[CANCEL_BUTTON].fire(&ditems[CANCEL_BUTTON]) == DITEM_FAILURE) {
+ wrefresh(dialog);
continue;
+ }
}
delwin(dialog);
return 1;
@@ -297,8 +301,10 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi
key = ESC;
break;
}
- else if (st == DITEM_FAILURE)
+ else if (st == DITEM_FAILURE) {
+ wrefresh(dialog);
continue;
+ }
else if (st == DITEM_REDRAW) {
for (i = 0; i < max_choice; i++) {
status[scroll + i] = ditems[scroll + i].checked ?
@@ -425,8 +431,10 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi
if (!button && result) {
if (ditems && ditems[button ? CANCEL_BUTTON : OK_BUTTON].fire) {
if (ditems[button ? CANCEL_BUTTON : OK_BUTTON].fire(&ditems[button ? CANCEL_BUTTON : OK_BUTTON]) ==
- DITEM_FAILURE)
+ DITEM_FAILURE) {
+ wrefresh(dialog);
continue;
+ }
}
else {
*result = '\0';
diff --git a/gnu/lib/libdialog/menubox.c b/gnu/lib/libdialog/menubox.c
index 650d0907389c..c213d087028b 100644
--- a/gnu/lib/libdialog/menubox.c
+++ b/gnu/lib/libdialog/menubox.c
@@ -188,8 +188,10 @@ dialog_menu(unsigned char *title, unsigned char *prompt, int height, int width,
/* Shortcut to OK? */
if (toupper(key) == okButton) {
if (ditems && result && ditems[OK_BUTTON].fire) {
- if (ditems[OK_BUTTON].fire(&ditems[OK_BUTTON]) == DITEM_FAILURE)
+ if (ditems[OK_BUTTON].fire(&ditems[OK_BUTTON]) == DITEM_FAILURE) {
+ wrefresh(dialog);
continue;
+ }
else
delwin(dialog);
}
@@ -202,8 +204,10 @@ dialog_menu(unsigned char *title, unsigned char *prompt, int height, int width,
/* Shortcut to cancel? */
else if (toupper(key) == cancelButton) {
if (ditems && result && ditems[CANCEL_BUTTON].fire) {
- if (ditems[CANCEL_BUTTON].fire(&ditems[CANCEL_BUTTON]) == DITEM_FAILURE)
+ if (ditems[CANCEL_BUTTON].fire(&ditems[CANCEL_BUTTON]) == DITEM_FAILURE) {
+ wrefresh(dialog);
continue;
+ }
}
delwin(dialog);
return 1;
@@ -359,8 +363,10 @@ dialog_menu(unsigned char *title, unsigned char *prompt, int height, int width,
case '\n':
if (!button) {
if (ditems && ditems[scroll + choice].fire) {
- if (ditems[scroll + choice].fire(&ditems[scroll + choice]) == DITEM_FAILURE)
+ if (ditems[scroll + choice].fire(&ditems[scroll + choice]) == DITEM_FAILURE) {
+ wrefresh(dialog);
continue;
+ }
}
else if (result)
strcpy(result, items[(scroll+choice)*2]);
diff --git a/gnu/lib/libdialog/radiolist.c b/gnu/lib/libdialog/radiolist.c
index 8ae84c29753f..3443eceb10dc 100644
--- a/gnu/lib/libdialog/radiolist.c
+++ b/gnu/lib/libdialog/radiolist.c
@@ -208,8 +208,10 @@ dialog_radiolist(unsigned char *title, unsigned char *prompt, int height, int wi
/* See if its the short-cut to "OK" */
if (toupper(key) == okButton) {
if (ditems && result && ditems[OK_BUTTON].fire) {
- if (ditems[OK_BUTTON].fire(&ditems[OK_BUTTON]) == DITEM_FAILURE)
+ if (ditems[OK_BUTTON].fire(&ditems[OK_BUTTON]) == DITEM_FAILURE) {
+ wrefresh(dialog);
continue;
+ }
else
delwin(dialog);
}
@@ -228,8 +230,10 @@ dialog_radiolist(unsigned char *title, unsigned char *prompt, int height, int wi
/* Shortcut to cancel */
else if (toupper(key) == cancelButton) {
if (ditems && result && ditems[CANCEL_BUTTON].fire) {
- if (ditems[CANCEL_BUTTON].fire(&ditems[CANCEL_BUTTON]) == DITEM_FAILURE)
+ if (ditems[CANCEL_BUTTON].fire(&ditems[CANCEL_BUTTON]) == DITEM_FAILURE) {
+ wrefresh(dialog);
continue;
+ }
}
delwin(dialog);
return 1;
@@ -304,8 +308,10 @@ dialog_radiolist(unsigned char *title, unsigned char *prompt, int height, int wi
key = ESC;
break;
}
- else if (st == DITEM_FAILURE)
+ else if (st == DITEM_FAILURE) {
+ wrefresh(dialog);
continue;
+ }
}
for (i = 0; i < item_no; i++)
status[i] = ditems[i].checked ? ditems[i].checked(&ditems[i]) : FALSE;
@@ -413,8 +419,10 @@ dialog_radiolist(unsigned char *title, unsigned char *prompt, int height, int wi
if (!button && result) {
if (ditems && ditems[button ? CANCEL_BUTTON : OK_BUTTON].fire) {
if (ditems[button ? CANCEL_BUTTON : OK_BUTTON].fire(&ditems[button ? CANCEL_BUTTON : OK_BUTTON]) ==
- DITEM_FAILURE)
+ DITEM_FAILURE) {
+ wrefresh(dialog);
continue;
+ }
}
else {
*result = '\0';