diff options
author | jkh <jkh@FreeBSD.org> | 1996-04-25 13:34:37 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-04-25 13:34:37 +0000 |
commit | 826192f359864f220bbbd7f0ccee114a0d867b8b (patch) | |
tree | 117f3c09726235f9d55671a15160b67e1f0df28e /gnu/lib/libdialog | |
parent | ec76275a92ea39884a03d86d510a9b25a33a5011 (diff) | |
download | FreeBSD-src-826192f359864f220bbbd7f0ccee114a0d867b8b.zip FreeBSD-src-826192f359864f220bbbd7f0ccee114a0d867b8b.tar.gz |
Allow some post-fire actions to be combined in ways that weren't
possible before.
Diffstat (limited to 'gnu/lib/libdialog')
-rw-r--r-- | gnu/lib/libdialog/checklist.c | 8 | ||||
-rw-r--r-- | gnu/lib/libdialog/menubox.c | 2 | ||||
-rw-r--r-- | gnu/lib/libdialog/radiolist.c | 15 |
3 files changed, 9 insertions, 16 deletions
diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c index 55d5138..7714d38 100644 --- a/gnu/lib/libdialog/checklist.c +++ b/gnu/lib/libdialog/checklist.c @@ -316,6 +316,10 @@ draw: save = dupwin(newscr); st = ditems[scroll + choice].fire(&ditems[scroll + choice]); + if (st & DITEM_RESTORE) { + touchwin(save); + wrefresh(save); + } if (st & DITEM_REDRAW) { wmove(dialog, cur_y, cur_x); /* Restore cursor to previous position */ for (i = 0; i < item_no; i++) @@ -329,10 +333,6 @@ draw: cur_x, cur_y); wrefresh(dialog); } - else if (st & DITEM_RESTORE) { - touchwin(save); - wrefresh(save); - } else if (st & DITEM_RECREATE) { delwin(save); delwin(list); diff --git a/gnu/lib/libdialog/menubox.c b/gnu/lib/libdialog/menubox.c index 9e36601..fde4fc6 100644 --- a/gnu/lib/libdialog/menubox.c +++ b/gnu/lib/libdialog/menubox.c @@ -389,7 +389,7 @@ draw: touchwin(save); wrefresh(save); } - else if (status & DITEM_RECREATE) { + if (status & DITEM_RECREATE) { delwin(menu); delwin(dialog); delwin(save); diff --git a/gnu/lib/libdialog/radiolist.c b/gnu/lib/libdialog/radiolist.c index 7ec5a72..0361fe2 100644 --- a/gnu/lib/libdialog/radiolist.c +++ b/gnu/lib/libdialog/radiolist.c @@ -321,6 +321,10 @@ draw: save = dupwin(newscr); st = ditems[scroll + choice].fire(&ditems[scroll + choice]); + if (st & DITEM_RESTORE) { + touchwin(save); + wrefresh(save); + } if (st & DITEM_REDRAW) { for (i = 0; i < item_no; i++) status[i] = ditems[i].checked ? ditems[i].checked(&ditems[i]) : FALSE; @@ -334,11 +338,6 @@ draw: wmove(dialog, cur_y, cur_x); /* Restore cursor to previous position */ wrefresh(dialog); } - else if (st & DITEM_RESTORE) { - touchwin(save); - wrefresh(save); - wmove(dialog, cur_y, cur_x); - } else if (st & DITEM_RECREATE) { delwin(save); delwin(list); @@ -465,12 +464,6 @@ draw: touchwin(save); wrefresh(save); } - else if (st & DITEM_RECREATE) { - delwin(save); - delwin(list); - delwin(dialog); - goto draw; - } delwin(save); } else { |