diff options
-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)) ; } - - |