changeset 3085:e75fc3c056e6

filename should be unescaped when it is used as a default title in the playlist window.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Tue, 17 Jul 2007 03:33:55 +0900
parents ba2143c1c6f5
children 5973397c09f2
files src/audacious/widgets/playlist_list.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/widgets/playlist_list.c	Tue Jul 17 00:31:43 2007 +0900
+++ b/src/audacious/widgets/playlist_list.c	Tue Jul 17 03:33:55 2007 +0900
@@ -491,9 +491,10 @@
            strings should be kept properly. */
 
         if (!entry->title) {
-            gchar *basename = g_path_get_basename(entry->filename);
+            gchar *realfn = g_filename_from_uri(entry->filename, NULL, NULL);
+            gchar *basename = g_path_get_basename(realfn ? realfn : entry->filename);
             title = filename_to_utf8(basename);
-            g_free(basename);
+            g_free(basename); g_free(realfn);
         }
         else
             title = str_to_utf8(entry->title);