changeset 1402:1abfc389ecc6 trunk

[svn] fileinfo_show_for_tuple() sometimes causes "Invalid UTF-8 string" pango waring since tuple->file_path and tuple->file_name may contain non UTF-8 characters.
author yaz
date Fri, 14 Jul 2006 09:04:58 -0700
parents 3bc53d7f9012
children 7ca5335c205c
files ChangeLog audacious/ui_fileinfo.c
diffstat 2 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jul 14 07:55:53 2006 -0700
+++ b/ChangeLog	Fri Jul 14 09:04:58 2006 -0700
@@ -1,3 +1,12 @@
+2006-07-14 14:55:53 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [1716]
+  - now filepopup_pointer_check_iter() returns immediately if cfg.show_filepopup_for_tuple is FALSE.
+  
+
+  Changes:        Modified:
+  +3 -4           trunk/audacious/ui_fileinfo.c  
+
+
 2006-07-14 14:45:57 +0000  Giacomo Lozito <james@develia.org>
   revision [1714]
   - amidi-plug: use AMIDIPLUG_VERSION instead of VERSION for about box
--- a/audacious/ui_fileinfo.c	Fri Jul 14 07:55:53 2006 -0700
+++ b/audacious/ui_fileinfo.c	Fri Jul 14 09:04:58 2006 -0700
@@ -305,7 +305,7 @@
 void
 fileinfo_show_for_tuple(TitleInput *tuple)
 {
-	gchar *tmp;
+	gchar *tmp = NULL;
 
 	if (tuple == NULL)
 		return;
@@ -317,7 +317,13 @@
 	fileinfo_entry_set_text("entry_album", tuple->album_name);
 	fileinfo_entry_set_text("entry_comment", tuple->comment);
 	fileinfo_entry_set_text("entry_genre", tuple->genre);
-	fileinfo_entry_set_text_free("entry_location", g_strdup_printf("%s/%s", tuple->file_path, tuple->file_name));
+
+	tmp = g_strdup_printf("%s/%s", tuple->file_path, tuple->file_name);
+	if(tmp){
+		fileinfo_entry_set_text_free("entry_location", str_to_utf8(tmp));
+		g_free(tmp);
+		tmp = NULL;
+	}
 
 	if (tuple->year != 0)
 		fileinfo_entry_set_text_free("entry_year", g_strdup_printf("%d", tuple->year));