changeset 2006:beaeb1990cb4 trunk

[svn] - now filepopup can find newly added images immediately.
author yaz
date Sat, 25 Nov 2006 00:31:33 -0800
parents f4d7be3f1e05
children 99d652a3bf67
files ChangeLog audacious/ui_fileinfo.c
diffstat 2 files changed, 27 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Nov 24 09:49:06 2006 -0800
+++ b/ChangeLog	Sat Nov 25 00:31:33 2006 -0800
@@ -1,3 +1,12 @@
+2006-11-24 17:49:06 +0000  Jonathan Schleifer <js@h3c.de>
+  revision [3003]
+  Fixed wrong help, it has to be --with-rc-path.
+  Found by Benny Siegert <bsiegert@gmx.de>
+  
+  trunk/configure.ac |    2 +-
+  1 file changed, 1 insertion(+), 1 deletion(-)
+
+
 2006-11-24 12:49:53 +0000  Tony Vroon <chainsaw@gentoo.org>
   revision [3001]
   Updated translation by Yang Zhang <zyangmath@gmail.com> aka program, closes bug #660.
--- a/audacious/ui_fileinfo.c	Fri Nov 24 09:49:06 2006 -0800
+++ b/audacious/ui_fileinfo.c	Sat Nov 25 00:31:33 2006 -0800
@@ -555,10 +555,11 @@
 void
 filepopup_show_for_tuple(TitleInput *tuple)
 {
-	gchar *tmp = NULL, *fullpath = NULL;
+	gchar *tmp = NULL;
 	gint x, y, x_off = 3, y_off = 3, h, w;
 
 	static gchar *last_artwork = NULL;
+	const static char default_artwork[] = DATA_DIR "/images/audio.png";
 
 	if (tuple == NULL)
 		return;
@@ -579,31 +580,25 @@
 	if (tuple->track_number != 0)
 		filepopup_entry_set_text_free("label_track", g_strdup_printf("%d", tuple->track_number));
 
-	if (cfg.use_file_cover) {
-		/* Use the file name */
-		fullpath = g_strconcat(tuple->file_path, "/", tuple->file_name, NULL);
-	} else {
-		fullpath = g_strconcat(tuple->file_path, "/", NULL);
-	}
-
-	if (!last_artwork || strcmp(last_artwork, fullpath))
-	{
-		if (last_artwork != NULL)
+	tmp = fileinfo_recursive_get_image(tuple->file_path, tuple->file_name, 0);
+	if (tmp) { // picture found
+		if (!last_artwork || strcmp(last_artwork, tmp)) { // new picture
+			filepopup_entry_set_image("image_artwork", tmp);
 			g_free(last_artwork);
-
-		last_artwork = g_strdup(fullpath);
-
-		tmp = fileinfo_recursive_get_image(tuple->file_path, tuple->file_name, 0);
-		if (tmp)
-		{
-			filepopup_entry_set_image("image_artwork", tmp);
-			g_free(tmp);
-		} else {
-			filepopup_entry_set_image("image_artwork", DATA_DIR "/images/audio.png");
+			last_artwork = tmp;
+		}
+		else { // same picture
 		}
 	}
-
-	g_free(fullpath);
+	else { // no picture found
+		if (!last_artwork || strcmp(last_artwork, default_artwork)) {
+			filepopup_entry_set_image("image_artwork", default_artwork);
+			g_free(last_artwork);
+			last_artwork = g_strdup(default_artwork);
+		}
+		else {
+		}
+	}
 
 	gdk_window_get_pointer(NULL, &x, &y, NULL);
 	gtk_window_get_size(GTK_WINDOW(filepopup_win), &w, &h);