Displaying full track filename excluding the real extension

This commit is contained in:
Hielke Morsink 2015-11-29 16:36:46 +01:00
parent 63184052be
commit 5ca371c5c5
1 changed files with 3 additions and 2 deletions

View File

@ -3147,6 +3147,7 @@ void window_track_list_format_name(utf8 *dst, const utf8 *src, int colour, bool
{
const utf8 *ch;
int codepoint;
char *lastDot = strrchr(src, '.');
if (colour != 0) {
dst = utf8_write_codepoint(dst, colour);
@ -3155,8 +3156,8 @@ void window_track_list_format_name(utf8 *dst, const utf8 *src, int colour, bool
if (quotes) dst = utf8_write_codepoint(dst, FORMAT_OPENQUOTES);
ch = src;
while ((codepoint = utf8_get_next(ch, &ch)) != 0) {
if (codepoint == '.') break;
while (lastDot > ch) {
codepoint = utf8_get_next(ch, &ch);
dst = utf8_write_codepoint(dst, codepoint);
}