aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-25 21:03:27 +0100
committerMax Kellermann <max@duempel.org>2008-11-25 21:03:27 +0100
commit00098d8e42ffd4fb86c521a216460bcd2c921a29 (patch)
treeae198ff409b8ac3c9324a93e3632b8427f521a9f /src
parentb320d4d5c6824732a968cd3d5ab547f82e7ae315 (diff)
downloadmpd-00098d8e42ffd4fb86c521a216460bcd2c921a29.tar.gz
mpd-00098d8e42ffd4fb86c521a216460bcd2c921a29.tar.xz
mpd-00098d8e42ffd4fb86c521a216460bcd2c921a29.zip
screen: simplify screen list strings
Removed the colon and the spaces from the translatable screen names. This aims to simplify the translator's job.
Diffstat (limited to 'src')
-rw-r--r--src/screen.c44
1 files changed, 20 insertions, 24 deletions
diff --git a/src/screen.c b/src/screen.c
index c8ba72989..25c05c64f 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
}