[Nautilus-list] [PATCH] make the music-view show song info as it should



Hi

	This little patch to the music view make it show song info with
"special" characters.

regards,
Diego


Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5116
diff -u -r1.5116 ChangeLog
--- ChangeLog	8 Mar 2002 19:43:34 -0000	1.5116
+++ ChangeLog	10 Mar 2002 15:45:00 -0000
@@ -1,3 +1,8 @@
+2002-03-10	Diego González <dggonz yahoo com>
+
+	* components/music/nautilus-music-view.c: (read_id_tag): convert 
+	title, comments, artist and album to UTF-8.
+
 2002-03-08  Darin Adler  <darin bentspoon com>
 
 	* components/adapter/main.c: (main): Use gdk_get_display, not
Index: components/music/nautilus-music-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/components/music/nautilus-music-view.c,v
retrieving revision 1.166
diff -u -r1.166 nautilus-music-view.c
--- components/music/nautilus-music-view.c	7 Mar 2002 19:35:45 -0000	1.166
+++ components/music/nautilus-music-view.c	10 Mar 2002 15:45:00 -0000
@@ -886,11 +886,15 @@
 	}
 	
 	/* Copy data from tag into our info struct */
-	song_info->title = g_strdup (tag.title);
-	song_info->artist = g_strdup (tag.artist);
-	song_info->album = g_strdup (tag.album); 
-        song_info->year = filter_out_unset_year (tag.year);
-	song_info->comment = g_strdup (tag.comment);
+	if (tag.title != NULL)
+		song_info->title = g_locale_to_utf8 (tag.title, -1, NULL, NULL, NULL);
+	if (tag.artist != NULL)
+		song_info->artist = g_locale_to_utf8 (tag.artist, -1, NULL, NULL, NULL);
+	if (tag.album)
+		song_info->album = g_locale_to_utf8 (tag.album, -1, NULL, NULL, NULL); 
+	song_info->year = filter_out_unset_year (tag.year);
+	if (tag.comment != NULL)
+		song_info->comment = g_locale_to_utf8 (tag.comment, -1, NULL, NULL, NULL);
 	song_info->track_number = atoi (tag.track);
 
 	/* Clean up */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]