# HG changeset patch # User ib # Date 1363319213 0 # Node ID 93ab56bda68a3911f6719e677f306edf5c05b0df # Parent 8f49b68dd9553cb60c694d75ca023920462ed8db Utilize new cfg_old_filename_from_utf8() in playlist code. Use it instead of g_filename_from_utf8(), because the content of the history file will change from UTF-8 encoded filenames to filenames in their original byte sequence. diff -r 8f49b68dd955 -r 93ab56bda68a gui/app/cfg-old.c --- a/gui/app/cfg-old.c Fri Mar 15 03:42:57 2013 +0000 +++ b/gui/app/cfg-old.c Fri Mar 15 03:46:53 2013 +0000 @@ -31,6 +31,7 @@ */ static const gchar *cfg_old_filename_from_utf8(const gchar *fname) { +#ifdef CFG_OLD_PLAYLIST static gchar *name; if (g_utf8_validate(fname, -1, NULL)) { @@ -39,6 +40,8 @@ return name; } - +#endif return fname; } + +#undef CFG_OLD_PLAYLIST diff -r 8f49b68dd955 -r 93ab56bda68a gui/dialog/playlist.c --- a/gui/dialog/playlist.c Fri Mar 15 03:42:57 2013 +0000 +++ b/gui/dialog/playlist.c Fri Mar 15 03:46:53 2013 +0000 @@ -43,6 +43,9 @@ #include "pixmaps/open2.xpm" #include "pixmaps/dir2.xpm" +#define CFG_OLD_PLAYLIST 1 +#include "gui/app/cfg-old.c" + GtkWidget * PlayList = NULL; static GtkWidget * CTDirTree; static GtkWidget * CLFiles; @@ -546,7 +549,7 @@ gtk_ctree_expand( GTK_CTREE( CTDirTree ),parent ); gtk_widget_show( CTDirTree ); - if ( fsHistory[0] ) old_path = g_filename_from_utf8( fsHistory[0], -1, NULL, NULL, NULL ); + if ( fsHistory[0] ) old_path = strdup( cfg_old_filename_from_utf8( fsHistory[0] ) ); gtk_clist_set_column_widget( GTK_CLIST( CTDirTree ),0, AddLabel( MSGTR_PLAYLIST_DirectoryTree,NULL ) );