From 1833dfd4333e8c3099ba2fac39245e11fd123ae0 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 7 Jan 2014 19:20:13 +0000 Subject: [PATCH] gui: Remove welcome message. The only information shown by print_welcome() that is not already contained in the status bar is the name of the current theme. This is not very interesting, so remove the function and the corresponding color pair. --- gui.c | 12 ------------ gui.h | 1 - gui_theme.c | 4 ---- 3 files changed, 17 deletions(-) diff --git a/gui.c b/gui.c index 63e0090f..284de0cb 100644 --- a/gui.c +++ b/gui.c @@ -73,7 +73,6 @@ enum gui_color_pair { COLOR_OUTPUT, COLOR_MSG, COLOR_ERRMSG, - COLOR_WELCOME, COLOR_SEPARATOR, COLOR_TOP, COLOR_BOT, @@ -589,15 +588,6 @@ __noreturn __printf_2_3 static void msg_n_exit(int ret, const char* fmt, ...) kill_pg_and_die(ret); } -static void print_welcome(void) -{ - if (loglevel > LL_NOTICE) - return; - outputf(COLOR_WELCOME, "Welcome to %s. Theme: %s", - version_single_line("gui"), theme.name); - wclrtoeol(bot.win); -} - /* * init all windows */ @@ -813,7 +803,6 @@ static void init_colors_or_die(void) init_pair_or_die(COLOR_OUTPUT, theme.output_fg, theme.output_bg); init_pair_or_die(COLOR_MSG, theme.msg_fg, theme.msg_bg); init_pair_or_die(COLOR_ERRMSG, theme.err_msg_fg, theme.err_msg_bg); - init_pair_or_die(COLOR_WELCOME, theme.welcome_fg, theme.welcome_bg); init_pair_or_die(COLOR_SEPARATOR, theme.sep_fg, theme.sep_bg); init_pair_or_die(COLOR_TOP, theme.default_fg, theme.default_bg); init_pair_or_die(COLOR_BOT, theme.default_fg, theme.default_bg); @@ -1537,7 +1526,6 @@ int main(int argc, char *argv[]) setlocale(LC_CTYPE, ""); initscr(); /* needed only once, always successful */ init_curses(); - print_welcome(); for (;;) { print_status_bar(); ret = do_select(GETCH_MODE); diff --git a/gui.h b/gui.h index 8f25c767..6f7349bb 100644 --- a/gui.h +++ b/gui.h @@ -20,7 +20,6 @@ struct gui_theme { int output_fg, output_bg; int msg_fg, msg_bg; int err_msg_fg, err_msg_bg; - int welcome_fg, welcome_bg; int sep_fg, sep_bg; const char *sep_str; int default_fg, default_bg; diff --git a/gui_theme.c b/gui_theme.c index fa63e909..279ad914 100644 --- a/gui_theme.c +++ b/gui_theme.c @@ -26,8 +26,6 @@ static void init_theme_simple(struct gui_theme *t) t->msg_fg = COLOR_YELLOW; t->err_msg_bg = COLOR_RED; t->err_msg_fg = COLOR_WHITE; - t->welcome_bg = COLOR_BLUE; - t->welcome_fg = COLOR_WHITE; t->sep_bg = COLOR_BLUE; t->sep_fg = COLOR_CYAN; t->default_fg = COLOR_WHITE; @@ -85,8 +83,6 @@ static void init_theme_colorful_blackness(struct gui_theme *t) t->msg_fg = COLOR_WHITE; t->err_msg_bg = COLOR_RED; t->err_msg_fg = COLOR_WHITE; - t->welcome_bg = COLOR_BLUE; - t->welcome_fg = COLOR_WHITE; t->sep_bg = COLOR_BLACK; /* color of the separator */ t->sep_fg = COLOR_BLUE; t->sep_str = "-"; -- 2.39.2