diff options
author | Michael Hohmuth <sideral@rockbox.org> | 2011-06-01 08:00:37 +0000 |
---|---|---|
committer | Michael Hohmuth <sideral@rockbox.org> | 2011-06-01 08:00:37 +0000 |
commit | 05a1984eb32dd07bcf5d54c147ace4d6f56a00b4 (patch) | |
tree | 152da073f90311e0e82ab3b43f0af4a678a40756 /apps | |
parent | 70b81e65cceb83b8933c7da7bdae2ce709404998 (diff) | |
download | rockbox-05a1984eb32dd07bcf5d54c147ace4d6f56a00b4.tar.gz rockbox-05a1984eb32dd07bcf5d54c147ace4d6f56a00b4.zip |
FS#12065 - Fix two regressions introduced with r26192 (FS#10976 /
FS#10992 - make the <Untagged> string translatable):
* The translation was done too early: before the tagnavi format
clauses were checked. This prevented comparisons against
"<Untagged>" when a non-English translation was active.
* The code overwrote the buffer containing the constant string
"<Untagged>" with the translation. This is neither safe nor
necessary: The result pointer simply can be swapped with a pointer
to the translation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29941 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tagtree.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c index d28928dbd5..a1c5640b74 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c | |||
@@ -1251,12 +1251,6 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init) | |||
1251 | if (total_count++ < offset) | 1251 | if (total_count++ < offset) |
1252 | continue; | 1252 | continue; |
1253 | 1253 | ||
1254 | if ( strcmp(tcs.result , UNTAGGED ) == 0) | ||
1255 | { | ||
1256 | tcs.result_len = strlcpy(tcs.result, | ||
1257 | str(LANG_TAGNAVI_UNTAGGED), TAG_MAXLEN )+1; | ||
1258 | } | ||
1259 | |||
1260 | dptr->newtable = NAVIBROWSE; | 1254 | dptr->newtable = NAVIBROWSE; |
1261 | if (tag == tag_title || tag == tag_filename) | 1255 | if (tag == tag_title || tag == tag_filename) |
1262 | { | 1256 | { |
@@ -1281,6 +1275,13 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init) | |||
1281 | } | 1275 | } |
1282 | } | 1276 | } |
1283 | 1277 | ||
1278 | if (strcmp(tcs.result, UNTAGGED) == 0) | ||
1279 | { | ||
1280 | tcs.result = str(LANG_TAGNAVI_UNTAGGED); | ||
1281 | tcs.result_len = strlen(tcs.result); | ||
1282 | tcs.ramresult = true; | ||
1283 | } | ||
1284 | |||
1284 | if (!tcs.ramresult || fmt) | 1285 | if (!tcs.ramresult || fmt) |
1285 | { | 1286 | { |
1286 | char buf[MAX_PATH]; | 1287 | char buf[MAX_PATH]; |