diff src/madplug/fileinfo.c @ 898:06ecbb1e3dbb trunk

[svn] - non-utf string had been used for file name in window title of File Info window. patch by M.H. - tweak debug printout.
author yaz
date Sat, 24 Mar 2007 23:15:05 -0700
parents d200de50a1fc
children 6ba4a4bfd127
line wrap: on
line diff
--- a/src/madplug/fileinfo.c	Sat Mar 24 17:31:14 2007 -0700
+++ b/src/madplug/fileinfo.c	Sat Mar 24 23:15:05 2007 -0700
@@ -571,7 +571,7 @@
 
 #ifdef DEBUG
     {
-        gchar *tmp = g_filename_to_utf8(filename, -1, NULL, NULL, NULL);
+        gchar *tmp = str_to_utf8(filename);
         g_message("f: audmad_get_file_info: %s", tmp);
         g_free(tmp);
     }
@@ -588,7 +588,7 @@
 
     input_get_info(&info, info.remote ? TRUE : audmad_config.fast_play_time_calc);
 
-    title = g_strdup_printf("File Info - %s", g_basename(filename));
+    title = g_strdup_printf("File Info - %s", g_basename(utf_filename));
     gtk_window_set_title(GTK_WINDOW(window), title);
     g_free(title);
 
@@ -706,7 +706,7 @@
             string = id3_field_getstrings(field, 0);
             genre = mad_parse_genre(string);
 #ifdef DEBUG
-            {
+            if (genre) {
                 gchar *utf = (gchar *)id3_ucs4_utf8duplicate(genre);
                 g_print("genre = %s\n", utf);
                 g_print("genre num = %d\n", id3_genre_number(genre));