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:
parent
dfee7da9e7
commit
cc1da582a5
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user