f-spot r3755 - trunk/src/Widgets
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r3755 - trunk/src/Widgets
- Date: Thu, 13 Mar 2008 20:20:36 +0000 (GMT)
Author: sdelcroix
Date: Thu Mar 13 20:20:36 2008
New Revision: 3755
URL: http://svn.gnome.org/viewvc/f-spot?rev=3755&view=rev
Log:
no longer crash on missing thumbs
Modified:
trunk/src/Widgets/Filmstrip.cs
Modified: trunk/src/Widgets/Filmstrip.cs
==============================================================================
--- trunk/src/Widgets/Filmstrip.cs (original)
+++ trunk/src/Widgets/Filmstrip.cs Thu Mar 13 20:20:36 2008
@@ -474,9 +474,18 @@
Pixbuf current;
string thumb_path = FSpot.ThumbnailGenerator.ThumbnailPath ((selection.Collection [i]).DefaultVersionUri);
current = thumb_cache.GetThumbnailForPath (thumb_path);
+
if (current == null) {
- current = new Pixbuf (thumb_path, -1, ThumbSize);
- thumb_cache.AddThumbnail (thumb_path, current);
+ try {
+ current = new Pixbuf (thumb_path, -1, ThumbSize);
+ thumb_cache.AddThumbnail (thumb_path, current);
+ } catch {
+ try {
+ current = FSpot.Global.IconTheme.LoadIcon ("gtk-missing-image", ThumbSize, (Gtk.IconLookupFlags)0);
+ } catch {
+ current = null;
+ }
+ }
}
if (!highlighted)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]