Support resize in all configuration menus

Add missing resize support in the configuration main menu and in the key
bindings menu.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2015-02-23 14:02:03 +01:00
parent 1ea97795be
commit dca7a32557

View File

@ -1032,6 +1032,26 @@ void custom_keys_config(void)
wins_scrollwin_delete(&kwin); wins_scrollwin_delete(&kwin);
return; return;
} }
if (resize) {
resize = 0;
wins_reset_noupdate();
nbdisplayed = ((notify_bar() ? row - 3 : row - 2) -
LABELLINES) / LINESPERKEY;
lastrow = firstrow + nbdisplayed - 1;
wins_scrollwin_resize(&kwin, 0, 0,
notify_bar() ? row - 3 : row - 2, col);
wins_scrollwin_draw_deco(&kwin, 0);
delwin(win[STA].p);
win[STA].p = newwin(win[STA].h, win[STA].w, win[STA].y,
win[STA].x);
keypad(win[STA].p, TRUE);
if (notify_bar()) {
notify_reinit_bar();
notify_update_bar();
}
}
custom_keys_config_bar(); custom_keys_config_bar();
werase(kwin.inner); werase(kwin.inner);
nbrowelm = nbrowelm =
@ -1104,6 +1124,11 @@ void custom_config_main(void)
break; break;
} }
if (resize) {
resize = 0;
wins_reset();
}
wins_set_bindings(bindings, ARRAY_SIZE(bindings)); wins_set_bindings(bindings, ARRAY_SIZE(bindings));
wins_update_border(FLAG_ALL); wins_update_border(FLAG_ALL);
wins_update_panels(FLAG_ALL); wins_update_panels(FLAG_ALL);