Code

screen_artist: return strings without square brackets
authorMax Kellermann <max@duempel.org>
Fri, 25 Dec 2009 11:12:33 +0000 (12:12 +0100)
committerMax Kellermann <max@duempel.org>
Fri, 25 Dec 2009 11:32:11 +0000 (12:32 +0100)
This fixes the "jump" regression.

src/screen_artist.c

index e4f301aa7dfc934204f5dc367e4ab03c45fb9796..450914b056e3c01f97addbb0f6a105f05355f8c3 100644 (file)
@@ -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;