Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27266/src
Modified Files:
details.c
Log Message:
* src/details.c: indicate corrupted artwork data.
Index: details.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/details.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- details.c 21 Sep 2006 15:03:13 -0000 1.16
+++ details.c 26 Nov 2006 14:54:27 -0000 1.17
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-09-21 23:31:59 jcs>
+/* Time-stamp: <2006-11-26 23:51:17 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -56,6 +56,7 @@
GList *orig_tracks; /* tracks displayed in details window */
GList *tracks; /* tracks displayed in details window */
Track *track; /* currently displayed track */
+ gboolean artwork_ok;/* artwork can be displayed or not */
gboolean changed; /* at lease one track was changed */
};
@@ -681,6 +682,12 @@
track->itdb = detail->itdb;
text = track_get_text (track, item);
track->itdb = NULL;
+ if ((item == T_THUMB_PATH) && (!detail->artwork_ok))
+ {
+ gchar *new_text = g_strdup_printf (_("%s (image data corrupted or
unreadable)"), text);
+ g_free (text);
+ text = new_text;
+ }
}
else
{
@@ -1137,6 +1144,7 @@
if (detail->track)
{
+ detail->artwork_ok = TRUE;
/* Get large cover */
thumb = itdb_artwork_get_thumb_by_type (detail->track->artwork,
ITDB_THUMB_COVER_LARGE);
@@ -1150,6 +1158,12 @@
gtk_image_set_from_pixbuf (img, pixbuf);
gdk_pixbuf_unref (pixbuf);
}
+ else
+ {
+ gtk_image_set_from_stock (img, GTK_STOCK_DIALOG_WARNING,
+ GTK_ICON_SIZE_DIALOG);
+ detail->artwork_ok = FALSE;
+ }
}
details_set_item (detail, detail->track, T_THUMB_PATH);
}
@@ -1195,6 +1209,9 @@
detail->track = track;
+ /* Set thumbnail */
+ details_update_thumbnail (detail);
+
for (item=1; item<T_ITEM_NUM; ++item)
{
details_set_item (detail, track, item);
@@ -1202,9 +1219,6 @@
details_update_headline (detail);
- /* Set thumbnail */
- details_update_thumbnail (detail);
-
details_update_buttons (detail);
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2