diff options
author | ache <ache@ache.one> | 2020-07-27 16:53:46 +0200 |
---|---|---|
committer | ache <ache@ache.one> | 2020-07-27 16:53:46 +0200 |
commit | f9f2f307c60f47f4c48c377d831e48bd683b309e (patch) | |
tree | c6112b85286a1a270a1588473df547f1008d3594 | |
parent | Center message preview (diff) |
Fix confirm send resize
-rw-r--r-- | wind.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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)) ; } - - |