diff options
author | jkh <jkh@FreeBSD.org> | 1996-07-11 18:22:16 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-07-11 18:22:16 +0000 |
commit | d79c848b1509a3db3c92795bb2d684060926908f (patch) | |
tree | f1bb4d5097f04afdc423b04d0bc3634801d4d479 /gnu/lib/libdialog | |
parent | 7df809ca1e4c5eb01cebee1fc92186d23ed0e4f7 (diff) | |
download | FreeBSD-src-d79c848b1509a3db3c92795bb2d684060926908f.zip FreeBSD-src-d79c848b1509a3db3c92795bb2d684060926908f.tar.gz |
1. Remove some ancient bogons from when I initially added dialogMenuItem
support.
2. Have message boxes say "Continue" instead of "Exit"
Diffstat (limited to 'gnu/lib/libdialog')
-rw-r--r-- | gnu/lib/libdialog/checklist.c | 26 | ||||
-rw-r--r-- | gnu/lib/libdialog/menubox.c | 26 | ||||
-rw-r--r-- | gnu/lib/libdialog/msgbox.c | 4 | ||||
-rw-r--r-- | gnu/lib/libdialog/radiolist.c | 26 | ||||
-rw-r--r-- | gnu/lib/libdialog/textbox.c | 2 |
5 files changed, 21 insertions, 63 deletions
diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c index c2c8a8b..98a2a81 100644 --- a/gnu/lib/libdialog/checklist.c +++ b/gnu/lib/libdialog/checklist.c @@ -430,28 +430,14 @@ draw: case KEY_RIGHT: button = !button; if (ditems && result) { - if (button) { - print_button(dialog, ditems[OK_BUTTON].prompt, y, x, - ditems[OK_BUTTON].checked ? ditems[OK_BUTTON].checked(&ditems[OK_BUTTON]) : !button); - print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5, - ditems[CANCEL_BUTTON].checked ? ditems[CANCEL_BUTTON].checked(&ditems[CANCEL_BUTTON]) : button); - } - else { - print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5, - ditems[CANCEL_BUTTON].checked ? ditems[CANCEL_BUTTON].checked(&ditems[CANCEL_BUTTON]) : button); - print_button(dialog, ditems[OK_BUTTON].prompt, y, x, - ditems[OK_BUTTON].checked ? ditems[OK_BUTTON].checked(&ditems[OK_BUTTON]) : !button); - } + print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5, + ditems[CANCEL_BUTTON].checked ? ditems[CANCEL_BUTTON].checked(&ditems[CANCEL_BUTTON]) : button); + print_button(dialog, ditems[OK_BUTTON].prompt, y, x, + ditems[OK_BUTTON].checked ? ditems[OK_BUTTON].checked(&ditems[OK_BUTTON]) : !button); } else { - if (button) { - print_button(dialog, " OK ", y, x, !button); - print_button(dialog, "Cancel", y, x + 14, button); - } - else { - print_button(dialog, "Cancel", y, x + 14, button); - print_button(dialog, " OK ", y, x, !button); - } + print_button(dialog, "Cancel", y, x + 14, button); + print_button(dialog, " OK ", y, x, !button); } wrefresh(dialog); break; diff --git a/gnu/lib/libdialog/menubox.c b/gnu/lib/libdialog/menubox.c index 41cc3c8..3755d82 100644 --- a/gnu/lib/libdialog/menubox.c +++ b/gnu/lib/libdialog/menubox.c @@ -349,28 +349,14 @@ draw: case KEY_RIGHT: button = !button; if (ditems && result) { - if (button) { - print_button(dialog, ditems[OK_BUTTON].prompt, y, x, - ditems[OK_BUTTON].checked ? ditems[OK_BUTTON].checked(&ditems[OK_BUTTON]) : !button); - print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5, - ditems[CANCEL_BUTTON].checked ? ditems[CANCEL_BUTTON].checked(&ditems[CANCEL_BUTTON]) : button); - } - else { - print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5, - ditems[CANCEL_BUTTON].checked ? ditems[CANCEL_BUTTON].checked(&ditems[CANCEL_BUTTON]) : button); - print_button(dialog, ditems[OK_BUTTON].prompt, y, x, - ditems[OK_BUTTON].checked ? ditems[OK_BUTTON].checked(&ditems[OK_BUTTON]) : !button); - } + print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5, + ditems[CANCEL_BUTTON].checked ? ditems[CANCEL_BUTTON].checked(&ditems[CANCEL_BUTTON]) : button); + print_button(dialog, ditems[OK_BUTTON].prompt, y, x, + ditems[OK_BUTTON].checked ? ditems[OK_BUTTON].checked(&ditems[OK_BUTTON]) : !button); } else { - if (button) { - print_button(dialog, " OK ", y, x, !button); - print_button(dialog, "Cancel", y, x + 14, button); - } - else { - print_button(dialog, "Cancel", y, x + 14, button); - print_button(dialog, " OK ", y, x, !button); - } + print_button(dialog, "Cancel", y, x + 14, button); + print_button(dialog, " OK ", y, x, !button); } wrefresh(dialog); break; diff --git a/gnu/lib/libdialog/msgbox.c b/gnu/lib/libdialog/msgbox.c index ebc89eb..ba51628 100644 --- a/gnu/lib/libdialog/msgbox.c +++ b/gnu/lib/libdialog/msgbox.c @@ -171,7 +171,7 @@ dialog_mesgbox(unsigned char *title, unsigned char *prompt, int height, int widt for (i = 0; i < width-2; i++) waddch(dialog, ' '); display_helpline(dialog, height-1, width); - print_button(dialog, " EXIT ", height-2, width/2-4, TRUE); + print_button(dialog, " CONTINUE ", height-2, width/2-8, TRUE); wattrset(dialog, dialog_attr); theight = height - 4; @@ -180,7 +180,7 @@ dialog_mesgbox(unsigned char *title, unsigned char *prompt, int height, int widt max_lines = getnlines(prompt); print_page(dialog, theight, width, prompt, startline, hscroll); print_perc(dialog, height-3, width-9, (float) (startline+theight)/max_lines); - wmove(dialog, height-2, width/2-2); + wmove(dialog, height-2, width/2-6); wrefresh(dialog); while ((key != ESC) && (key != '\n') && (key != '\r')) { key = wgetch(dialog); diff --git a/gnu/lib/libdialog/radiolist.c b/gnu/lib/libdialog/radiolist.c index 1f546fb..f0ad833 100644 --- a/gnu/lib/libdialog/radiolist.c +++ b/gnu/lib/libdialog/radiolist.c @@ -427,28 +427,14 @@ draw: case KEY_RIGHT: button = !button; if (ditems && result) { - if (button) { - print_button(dialog, ditems[OK_BUTTON].prompt, y, x, - ditems[OK_BUTTON].checked ? ditems[OK_BUTTON].checked(&ditems[OK_BUTTON]) : !button); - print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5, - ditems[CANCEL_BUTTON].checked ? ditems[CANCEL_BUTTON].checked(&ditems[CANCEL_BUTTON]) : button); - } - else { - print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5, - ditems[CANCEL_BUTTON].checked ? ditems[CANCEL_BUTTON].checked(&ditems[CANCEL_BUTTON]) : button); - print_button(dialog, ditems[OK_BUTTON].prompt, y, x, - ditems[OK_BUTTON].checked ? ditems[OK_BUTTON].checked(&ditems[OK_BUTTON]) : !button); - } + print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5, + ditems[CANCEL_BUTTON].checked ? ditems[CANCEL_BUTTON].checked(&ditems[CANCEL_BUTTON]) : button); + print_button(dialog, ditems[OK_BUTTON].prompt, y, x, + ditems[OK_BUTTON].checked ? ditems[OK_BUTTON].checked(&ditems[OK_BUTTON]) : !button); } else { - if (button) { - print_button(dialog, " OK ", y, x, !button); - print_button(dialog, "Cancel", y, x + 14, button); - } - else { - print_button(dialog, "Cancel", y, x + 14, button); - print_button(dialog, " OK ", y, x, !button); - } + print_button(dialog, "Cancel", y, x + 14, button); + print_button(dialog, " OK ", y, x, !button); } wrefresh(dialog); break; diff --git a/gnu/lib/libdialog/textbox.c b/gnu/lib/libdialog/textbox.c index 2abd3e9..d706c78 100644 --- a/gnu/lib/libdialog/textbox.c +++ b/gnu/lib/libdialog/textbox.c @@ -136,7 +136,7 @@ int dialog_textbox(unsigned char *title, unsigned char *file, int height, int wi } display_helpline(dialog, height-1, width); - print_button(dialog, " EXIT ", height-2, width/2-4, TRUE); + print_button(dialog, " CONTINUE ", height-2, width/2-8, TRUE); wnoutrefresh(dialog); getyx(dialog, cur_y, cur_x); /* Save cursor position */ |