[gthumb: 36/40] files with no thumbnail not loaded correctly
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 36/40] files with no thumbnail not loaded correctly
- Date: Fri, 10 Sep 2010 16:59:13 +0000 (UTC)
commit 2583f423def9853c204f6a612e454d03d7eca587
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri Sep 10 09:35:15 2010 +0200
files with no thumbnail not loaded correctly
always report a success for the generic file viewer
extensions/file_viewer/gth-file-viewer-page.c | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/extensions/file_viewer/gth-file-viewer-page.c b/extensions/file_viewer/gth-file-viewer-page.c
index b90f1bf..6befb78 100644
--- a/extensions/file_viewer/gth-file-viewer-page.c
+++ b/extensions/file_viewer/gth-file-viewer-page.c
@@ -213,23 +213,20 @@ thumb_loader_ready_cb (GObject *source_object,
{
ViewData *view_data = user_data;
GthFileViewerPage *self = view_data->self;
- GdkPixbuf *pixbuf;
-
- if (! gth_thumb_loader_load_finish (GTH_THUMB_LOADER (source_object),
- result,
- &pixbuf,
- NULL))
- {
- view_data_free (view_data);
- return;
- }
+ gboolean success;
+ GdkPixbuf *pixbuf = NULL;
+ success = gth_thumb_loader_load_finish (GTH_THUMB_LOADER (source_object),
+ result,
+ &pixbuf,
+ NULL);
if (g_file_equal (self->priv->file_data->file, view_data->file_data->file)) {
- gtk_image_set_from_pixbuf (GTK_IMAGE (self->priv->icon), pixbuf);
+ if (success)
+ gtk_image_set_from_pixbuf (GTK_IMAGE (self->priv->icon), pixbuf);
gth_viewer_page_file_loaded (GTH_VIEWER_PAGE (self), self->priv->file_data, TRUE);
}
- g_object_unref (pixbuf);
+ _g_object_unref (pixbuf);
view_data_free (view_data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]