From: Max Kellermann Date: Fri, 25 Dec 2009 11:12:33 +0000 (+0100) Subject: screen_artist: return strings without square brackets X-Git-Tag: release-0.16~5 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=294e19e2abd7b990885185751beaf152f3b7b78d;p=ncmpc.git screen_artist: return strings without square brackets This fixes the "jump" regression. --- diff --git a/src/screen_artist.c b/src/screen_artist.c index e4f301a..450914b 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -69,11 +69,9 @@ screen_artist_lw_callback(unsigned idx, void *data) if (mode == LIST_ALBUMS) { if (idx == 0) - return "[..]"; - else if (idx == list->len + 1) { - g_snprintf(buf, BUFSIZE, "[%s]", _("All tracks")); - return buf; - } + return ".."; + else if (idx == list->len + 1) + return _("All tracks"); --idx; } @@ -84,7 +82,7 @@ screen_artist_lw_callback(unsigned idx, void *data) assert(str_utf8 != NULL); str = utf8_to_locale(str_utf8); - g_snprintf(buf, BUFSIZE, "[%s]", str); + g_strlcpy(buf, str, sizeof(buf)); g_free(str); return buf;