From: Max Kellermann Date: Fri, 3 Oct 2008 09:57:00 +0000 (+0200) Subject: screen_artist: better screen title X-Git-Tag: v0.12_alpha1~90 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=547b0c5f28be1e830c00ac167806ffba641855c6;p=ncmpc.git screen_artist: better screen title The artist screen shouldn't be marked "experimental" anymore. Describe the current state of the screen in the title, instead of always writing "Artist". --- diff --git a/src/screen_artist.c b/src/screen_artist.c index e488a3a..86291d8 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -374,23 +374,29 @@ get_title(char *str, size_t size) switch(mode) { case LIST_ARTISTS: - g_snprintf(str, size, _("Artist: [db browser - EXPERIMENTAL]")); + g_snprintf(str, size, _("All artists")); break; + case LIST_ALBUMS: s1 = utf8_to_locale(artist); - g_snprintf(str, size, _("Artist: %s"), s1); + g_snprintf(str, size, _("Albums of artist: %s"), s1); g_free(s1); break; + case LIST_SONGS: s1 = utf8_to_locale(artist); - s2 = *album == 0 - ? g_strdup(_("All tracks")) - : utf8_to_locale(album); - g_snprintf(str, size, _("Artist: %s - %s"), s1, s2); + if (*album != 0) { + s2 = utf8_to_locale(album); + g_snprintf(str, size, + _("Album: %s - %s"), s1, s2); + g_free(s2); + } else + g_snprintf(str, size, + _("All tracks of artist: %s"), s1); g_free(s1); - g_free(s2); break; } + return str; }