From f9f2f307c60f47f4c48c377d831e48bd683b309e Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 27 Jul 2020 16:53:46 +0200 Subject: Fix confirm send resize --- wind.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/wind.c b/wind.c index 5015a61..e6fb2ed 100644 --- a/wind.c +++ b/wind.c @@ -86,13 +86,14 @@ void runtimeHelp(void) { clear(); } -int confirmSend(const char* txt, const char* autheur) { +void showConfirmSend(const char* txt, const char* autheur) { int x = COLS/6; int w = (COLS*2)/3; int nbLignes = showMessagePreview(x, 0, w, txt, 0); int y = (LINES - nbLignes - 2) / 2; clear(); + refresh(); move(y,x); printw("Voulez-vous vraiment envoyé ce SMS de %d ligne%s à %s ?", nbLignes, nbLignes > 1 ? "s":"", autheur); y++; @@ -121,13 +122,20 @@ int confirmSend(const char* txt, const char* autheur) { printw("%s", line); } } +} +int confirmSend(const char* txt, const char* autheur) { + showConfirmSend(txt, autheur); int c = 0; - while( (c = getch()) && c != EOF && !strchr("oyneqOYNEQ", c) ) ; + while( (c = getch()) && c != EOF && !strchr("oyneqOYNEQ", c) ) { + if (c == KEY_RESIZE) { + showConfirmSend(txt, autheur); + refresh(); + continue; + } + } clear(); return (c == 'e' || c =='E') ? 2 : (!!strchr("yYoO", c)) ; } - - -- cgit v1.2.3