summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1996-04-13 13:13:32 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1996-04-13 13:13:32 +0000
commit056985cc1768648f9f91cbe5e7f27763bd2ac0d2 (patch)
treea145639c7969f7f178e04e299c60e0bee6a1a12b
parentbc9eb1f2fee55e597131ea64346dee451b35d271 (diff)
Notes
-rw-r--r--gnu/lib/libdialog/menubox.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/gnu/lib/libdialog/menubox.c b/gnu/lib/libdialog/menubox.c
index 6bbe13266166..572463a61121 100644
--- a/gnu/lib/libdialog/menubox.c
+++ b/gnu/lib/libdialog/menubox.c
@@ -188,15 +188,7 @@ 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) {
- WINDOW *w;
- int x;
-
- w = dupwin(newscr);
- x = ditems[OK_BUTTON].fire(&ditems[OK_BUTTON]);
- touchwin(w);
- wrefresh(w);
- delwin(w);
- if (x == DITEM_FAILURE)
+ if (ditems[OK_BUTTON].fire(&ditems[OK_BUTTON]) == DITEM_FAILURE)
continue;
else
delwin(dialog);
@@ -210,15 +202,7 @@ 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) {
- WINDOW *w;
- int x;
-
- w = dupwin(newscr);
- x = ditems[CANCEL_BUTTON].fire(&ditems[CANCEL_BUTTON]);
- touchwin(w);
- wrefresh(w);
- delwin(w);
- if (x == DITEM_FAILURE)
+ if (ditems[CANCEL_BUTTON].fire(&ditems[CANCEL_BUTTON]) == DITEM_FAILURE)
continue;
}
delwin(dialog);
@@ -375,15 +359,7 @@ dialog_menu(unsigned char *title, unsigned char *prompt, int height, int width,
case '\n':
if (!button) {
if (ditems && ditems[scroll + choice].fire) {
- WINDOW *w;
- int x;
-
- w = dupwin(newscr);
- x = ditems[scroll + choice].fire(&ditems[scroll + choice]);
- touchwin(w);
- wrefresh(w);
- delwin(w);
- if (x == DITEM_FAILURE)
+ if (ditems[scroll + choice].fire(&ditems[scroll + choice]) == DITEM_FAILURE)
continue;
}
else if (result)