Cosmetic tweaks.

This commit is contained in:
Jordan K. Hubbard 1996-04-23 01:25:04 +00:00
parent 44d97e5b42
commit 5553e30b48
2 changed files with 13 additions and 4 deletions

View File

@ -238,6 +238,7 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi
if (st & DITEM_RESTORE) {
touchwin(save);
wrefresh(save);
wmove(dialog, cur_y, cur_x);
}
delwin(save);
}
@ -316,6 +317,7 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi
save = dupwin(newscr);
st = ditems[scroll + choice].fire(&ditems[scroll + choice]);
if (st & DITEM_REDRAW) {
wmove(dialog, cur_y, cur_x); /* Restore cursor to previous position */
for (i = 0; i < item_no; i++)
status[i] = ditems[i].checked ? ditems[i].checked(&ditems[i]) : FALSE;
for (i = 0; i < max_choice; i++) {
@ -457,11 +459,17 @@ dialog_checklist(unsigned char *title, unsigned char *prompt, int height, int wi
case '\r':
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) {
wrefresh(dialog);
continue;
int st;
WINDOW *save = dupwin(newscr);
st = ditems[button ? CANCEL_BUTTON : OK_BUTTON].fire(&ditems[button ? CANCEL_BUTTON : OK_BUTTON]);
if (st & DITEM_RESTORE) {
touchwin(save);
wrefresh(save);
}
delwin(save);
if (st == DITEM_FAILURE)
continue;
}
else {
*result = '\0';

View File

@ -337,6 +337,7 @@ dialog_radiolist(unsigned char *title, unsigned char *prompt, int height, int wi
else if (st & DITEM_RESTORE) {
touchwin(save);
wrefresh(save);
wmove(dialog, cur_y, cur_x);
}
else if (st & DITEM_RECREATE) {
delwin(save);