From: Max Kellermann Date: Tue, 25 Nov 2008 20:03:27 +0000 (+0100) Subject: screen: simplify screen list strings X-Git-Tag: v0.12_beta1~10 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=00098d8e42ffd4fb86c521a216460bcd2c921a29;p=ncmpc.git screen: simplify screen list strings Removed the colon and the spaces from the translatable screen names. This aims to simplify the translator's job. --- diff --git a/src/screen.c b/src/screen.c index c8ba729..25c05c6 100644 --- a/src/screen.c +++ b/src/screen.c @@ -119,6 +119,20 @@ screen_next_mode(mpdclient_t *c, int offset) screen_switch(sf, c); } +#ifndef NCMPC_MINI +static void +print_hotkey(WINDOW *w, command_t cmd, const char *label) +{ + colors_use(w, COLOR_TITLE_BOLD); + waddstr(w, get_key_names(cmd, FALSE)); + colors_use(w, COLOR_TITLE); + waddch(w, ':'); + waddstr(w, label); + waddch(w, ' '); + waddch(w, ' '); +} +#endif + static void paint_top_window2(const char *header, mpdclient_t *c) { @@ -131,35 +145,17 @@ paint_top_window2(const char *header, mpdclient_t *c) mvwaddstr(w, 0, 0, header); #ifndef NCMPC_MINI } else { - colors_use(w, COLOR_TITLE_BOLD); - waddstr(w, get_key_names(CMD_SCREEN_HELP, FALSE)); - colors_use(w, COLOR_TITLE); - waddstr(w, _(":Help ")); - colors_use(w, COLOR_TITLE_BOLD); - waddstr(w, get_key_names(CMD_SCREEN_PLAY, FALSE)); - colors_use(w, COLOR_TITLE); - waddstr(w, _(":Playlist ")); - colors_use(w, COLOR_TITLE_BOLD); - waddstr(w, get_key_names(CMD_SCREEN_FILE, FALSE)); - colors_use(w, COLOR_TITLE); - waddstr(w, _(":Browse ")); + print_hotkey(w, CMD_SCREEN_HELP, _("Help")); + print_hotkey(w, CMD_SCREEN_PLAY, _("Playlist")); + print_hotkey(w, CMD_SCREEN_FILE, _("Browse")); #ifdef ENABLE_ARTIST_SCREEN - colors_use(w, COLOR_TITLE_BOLD); - waddstr(w, get_key_names(CMD_SCREEN_ARTIST, FALSE)); - colors_use(w, COLOR_TITLE); - waddstr(w, _(":Artist ")); + print_hotkey(w, CMD_SCREEN_ARTIST, _("Artist")); #endif #ifdef ENABLE_SEARCH_SCREEN - colors_use(w, COLOR_TITLE_BOLD); - waddstr(w, get_key_names(CMD_SCREEN_SEARCH, FALSE)); - colors_use(w, COLOR_TITLE); - waddstr(w, _(":Search ")); + print_hotkey(w, CMD_SCREEN_SEARCH, _("Search")); #endif #ifdef ENABLE_LYRICS_SCREEN - colors_use(w, COLOR_TITLE_BOLD); - waddstr(w, get_key_names(CMD_SCREEN_LYRICS, FALSE)); - colors_use(w, COLOR_TITLE); - waddstr(w, _(":Lyrics ")); + print_hotkey(w, CMD_SCREEN_LYRICS, _("Lyrics")); #endif #endif }