Mercurial > mplayer.hg
comparison gui/app/cfg-old.c @ 35872:93ab56bda68a
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.
author | ib |
---|---|
date | Fri, 15 Mar 2013 03:46:53 +0000 |
parents | 8f49b68dd955 |
children | bd3e9d8df038 |
comparison
equal
deleted
inserted
replaced
35871:8f49b68dd955 | 35872:93ab56bda68a |
---|---|
29 * | 29 * |
30 * @return converted filename | 30 * @return converted filename |
31 */ | 31 */ |
32 static const gchar *cfg_old_filename_from_utf8(const gchar *fname) | 32 static const gchar *cfg_old_filename_from_utf8(const gchar *fname) |
33 { | 33 { |
34 #ifdef CFG_OLD_PLAYLIST | |
34 static gchar *name; | 35 static gchar *name; |
35 | 36 |
36 if (g_utf8_validate(fname, -1, NULL)) { | 37 if (g_utf8_validate(fname, -1, NULL)) { |
37 free(name); | 38 free(name); |
38 name = g_filename_from_utf8(fname, -1, NULL, NULL, NULL); | 39 name = g_filename_from_utf8(fname, -1, NULL, NULL, NULL); |
39 | 40 |
40 return name; | 41 return name; |
41 } | 42 } |
42 | 43 #endif |
43 return fname; | 44 return fname; |
44 } | 45 } |
46 | |
47 #undef CFG_OLD_PLAYLIST |