diff --git a/src/main.c b/src/main.c index 0193e003..03d1ad21 100644 --- a/src/main.c +++ b/src/main.c @@ -559,9 +559,6 @@ static void ui_init() { exit(EXIT_FAILURE); } - InitSearchPanel(); /* at least one panel has to be defined - for refreshp() to work */ - getmaxyx(stdscr, ymax, xmax); if ((ymax < 22) || (xmax < 80)) { char c; diff --git a/src/showmsg.c b/src/showmsg.c index b185f3c4..4fb04881 100644 --- a/src/showmsg.c +++ b/src/showmsg.c @@ -30,7 +30,7 @@ static int linectr = 0; void clearmsg() { clear(); linectr = 0; - refreshp(); + refresh(); } @@ -41,7 +41,6 @@ void clearmsg_wait(void) { mvaddstr(LINES - 2, 0, "Press any key to continue!"); move(LINES - 1, 0); clrtoeol(); - refreshp(); IGNORE(key_get()); } else { sleep(1); @@ -50,11 +49,11 @@ void clearmsg_wait(void) { } -static int has_room_for_message() { +static bool has_room_for_message() { if (linectr < LINES - 3) - return 1; + return true; else - return 0; + return false; } void show_formatted(char *fmt, ...) { @@ -68,7 +67,7 @@ void show_formatted(char *fmt, ...) { va_end(args); mvaddstr(linectr, 0, str); g_free(str); - refreshp(); + refresh(); linectr++; } diff --git a/src/showmsg.h b/src/showmsg.h index da392650..a7657a2c 100644 --- a/src/showmsg.h +++ b/src/showmsg.h @@ -21,6 +21,11 @@ #ifndef STARTMSG_H #define STARTMSG_H +/* + * These functions provide progress and error reporting at start-up phase + * !!! Do not call them after switching to the main screen !!! + * For runtime notifications use TLF_SHOW_* macros instead + */ void clearmsg(void); void clearmsg_wait(void);