diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2015-02-23 14:02:03 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2015-02-23 14:02:52 +0100 |
commit | dca7a325576ac89d56910a8ef668d6f66eba7371 (patch) | |
tree | 03f25231e5b4d44c132abe0148d6fcaa27b5473b /src | |
parent | 1ea97795be8f9b8d63c5266ac7ea4889c3224a4d (diff) | |
download | calcurse-dca7a325576ac89d56910a8ef668d6f66eba7371.zip |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/custom.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/custom.c b/src/custom.c index 94290bc..b0cbee2 100644 --- a/src/custom.c +++ b/src/custom.c @@ -1032,6 +1032,26 @@ void custom_keys_config(void) wins_scrollwin_delete(&kwin); 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(); werase(kwin.inner); nbrowelm = @@ -1104,6 +1124,11 @@ void custom_config_main(void) break; } + if (resize) { + resize = 0; + wins_reset(); + } + wins_set_bindings(bindings, ARRAY_SIZE(bindings)); wins_update_border(FLAG_ALL); wins_update_panels(FLAG_ALL); |