diff --git a/windows.c b/windows.c index d18e54ef..9c069e92 100644 --- a/windows.c +++ b/windows.c @@ -51,6 +51,7 @@ static int dirty; static int max_cols = 0; static void _create_windows(void); +static void _print_splash_logo(WINDOW *win); static int _find_prof_win_index(const char * const contact); static int _new_prof_win(const char * const contact); static void _current_window_refresh(void); @@ -395,14 +396,11 @@ static void _create_windows(void) wattrset(_cons_win, A_BOLD); _win_show_time(_cons_win); - wprintw(_cons_win, "Welcome to\n"); - wprintw(_cons_win, " ___ _ \n"); - wprintw(_cons_win, " / __) (_)_ \n"); - wprintw(_cons_win, " ____ ____ ___ | |__ ____ ____ _| |_ _ _ \n"); - wprintw(_cons_win, "| _ \\ / ___) _ \\| __) _ | _ \\| | _) | | |\n"); - wprintw(_cons_win, "| | | | | | |_| | | ( ( | | | | | | |_| |_| |\n"); - wprintw(_cons_win, "| ||_/|_| \\___/|_| \\_||_|_| |_|_|\\___)__ |\n"); - wprintw(_cons_win, "|_| (____/ \n"); + if (prefs_get_showsplash()) { + _print_splash_logo(_cons_win); + } else { + wprintw(_cons_win, "Welcome to Profanity.\n"); + } prefresh(_cons_win, 0, 0, 1, 0, rows-3, cols-1); dirty = TRUE; @@ -421,6 +419,20 @@ static void _create_windows(void) } } +static void _print_splash_logo(WINDOW *win) +{ + wprintw(win, "Welcome to\n"); + wattron(win, COLOR_PAIR(5)); + wprintw(win, " ___ _ \n"); + wprintw(win, " / __) (_)_ \n"); + wprintw(win, " ____ ____ ___ | |__ ____ ____ _| |_ _ _ \n"); + wprintw(win, "| _ \\ / ___) _ \\| __) _ | _ \\| | _) | | |\n"); + wprintw(win, "| | | | | | |_| | | ( ( | | | | | | |_| |_| |\n"); + wprintw(win, "| ||_/|_| \\___/|_| \\_||_|_| |_|_|\\___)__ |\n"); + wprintw(win, "|_| (____/ \n"); + wattroff(win, COLOR_PAIR(5)); +} + static int _find_prof_win_index(const char * const contact) { // find the chat window for recipient