diff options
author | James Booth <jamesbooth2000@hotmail.com> | 2012-06-04 08:47:54 -0700 |
---|---|---|
committer | James Booth <jamesbooth2000@hotmail.com> | 2012-06-04 08:47:54 -0700 |
commit | df1e8327f945a3bd0d5a957a0fd9e971baeabd72 (patch) | |
tree | b376283213eafffe6193b37e9e7274df02e22b84 /windows.c | |
parent | 70310bb5afb7a008bdd4069d85ee62921cdf4ac5 (diff) | |
parent | 26b6db5b78b01e50eaee048472d5d33d5a468c3c (diff) | |
download | profani-tty-df1e8327f945a3bd0d5a957a0fd9e971baeabd72.tar.gz |
Merge pull request #25 from dotoole/master
Diffstat (limited to 'windows.c')
-rw-r--r-- | windows.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/windows.c b/windows.c index 8fe91a2f..935d66b4 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); @@ -277,6 +278,7 @@ void cons_help(void) cons_show(""); cons_show("/beep <on/off> : Enable/disable sound notification"); cons_show("/flash <on/off> : Enable/disable screen flash notification"); + cons_show("/showsplash <on/off> : Enable/disable splash logo on startup"); cons_show(""); cons_show("Status changes (msg is optional):"); cons_show(""); @@ -395,7 +397,11 @@ static void _create_windows(void) wattrset(_cons_win, A_BOLD); _win_show_time(_cons_win); - wprintw(_cons_win, "Welcome to Profanity.\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; @@ -414,6 +420,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 |