changeset 3872:b02853ac8466

revise tuple_formatter_make_title_string()
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Tue, 30 Oct 2007 18:17:55 +0900
parents efd2924b3f90
children f3341c2d6b9e 57dd6ddaa8af
files src/audacious/tuple_formatter.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/tuple_formatter.c	Tue Oct 30 17:27:06 2007 +0900
+++ b/src/audacious/tuple_formatter.c	Tue Oct 30 18:17:55 2007 +0900
@@ -24,6 +24,7 @@
 #include "config.h"
 #include "tuple.h"
 #include "tuple_formatter.h"
+#include "strings.h"
 
 /*
  * TUPLE_USE_COMPILER:
@@ -586,10 +587,11 @@
 
     if(!rv || !strcmp(rv, "")) {
         const gchar *file_name = tuple_get_string(tuple, FIELD_FILE_NAME, NULL);
+        gchar *realfn = g_filename_from_uri(file_name, NULL, NULL);
+
         g_free(rv);
-        rv = g_filename_from_uri(file_name, NULL, NULL);
-        if(!rv)
-            rv = g_strdup(file_name);
+        rv = str_to_utf8(realfn ? realfn : file_name);
+        g_free(realfn);
     }
 
     return rv;