label.c: add delwin(window)

mbr.c: use proper dims for newwin, add shadow
both: add ' ' and ESC as valid end-keys
This commit is contained in:
Andrey A. Chernov 1994-10-24 04:14:23 +00:00
parent dfee7da9e7
commit cc1da582a5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3826
2 changed files with 8 additions and 5 deletions

View File

@ -67,8 +67,9 @@ display_disklabel(int disk)
dialog_update();
while (key != '\n')
while (key != '\n' && key != ' ' && key != '\033')
key = wgetch(window);
delwin(window);
dialog_clear();
dialog_update();
}

View File

@ -94,7 +94,9 @@ show_mbr(struct mbr *mbr)
int x, y;
WINDOW *window;
window = newwin(LINES, COLS, 0, 0);
if (use_shadow)
draw_shadow(stdscr, 1, 1, LINES-2, COLS-2);
window = newwin(LINES-2, COLS-2, 1, 1);
keypad(window, TRUE);
draw_box(window, 1, 1, LINES - 2, COLS - 2,
@ -122,14 +124,14 @@ show_mbr(struct mbr *mbr)
mvwprintw(window, y+5, x, "Size (in sectors) %ld", mbr->dospart[(i*2)+j].dp_size);
}
}
refresh();
dialog_update();
while (key != '\n')
while (key != '\n' && key != ' ' && key != '\033')
key = wgetch(window);
delwin(window);
refresh();
dialog_clear();
dialog_update();
}
int