View | Details | Raw Unified | Return to bug 402256
Collapse All | Expand All

(-)a/libslab/document-tile.c (-29 / +1 lines)
Lines 424-432 load_image (DocumentTile *tile) Link Here
424
{
424
{
425
	DocumentTilePrivate *priv = DOCUMENT_TILE_GET_PRIVATE (tile);
425
	DocumentTilePrivate *priv = DOCUMENT_TILE_GET_PRIVATE (tile);
426
426
427
	GdkPixbuf *thumb;
428
	gchar *thumb_path;
429
430
	gchar *icon_id = NULL;
427
	gchar *icon_id = NULL;
431
	gboolean free_icon_id = TRUE;
428
	gboolean free_icon_id = TRUE;
432
	GnomeThumbnailFactory *thumbnail_factory;
429
	GnomeThumbnailFactory *thumbnail_factory;
Lines 445-476 load_image (DocumentTile *tile) Link Here
445
442
446
	thumbnail_factory = libslab_thumbnail_factory_get ();
443
	thumbnail_factory = libslab_thumbnail_factory_get ();
447
444
448
	thumb_path = gnome_thumbnail_factory_lookup (thumbnail_factory, TILE (tile)->uri, priv->modified);
445
	icon_id = gnome_thumbnail_factory_lookup (thumbnail_factory, TILE (tile)->uri, priv->modified);
449
450
	if (!thumb_path) {
451
		if (
452
			gnome_thumbnail_factory_can_thumbnail (
453
				thumbnail_factory, TILE (tile)->uri, priv->mime_type, priv->modified)
454
		) {
455
			thumb = gnome_thumbnail_factory_generate_thumbnail (
456
				thumbnail_factory, TILE (tile)->uri, priv->mime_type);
457
458
			if (thumb) {
459
				gnome_thumbnail_factory_save_thumbnail (
460
					thumbnail_factory, thumb, TILE (tile)->uri, priv->modified);
461
462
				icon_id = gnome_thumbnail_factory_lookup (
463
					thumbnail_factory, TILE (tile)->uri, priv->modified);
464
465
				g_object_unref (thumb);
466
			}
467
			else
468
				gnome_thumbnail_factory_create_failed_thumbnail (
469
					thumbnail_factory, TILE (tile)->uri, priv->modified);
470
		}
471
	}
472
	else
473
		icon_id = thumb_path;
474
446
475
	if (! icon_id)
447
	if (! icon_id)
476
		icon_id = gnome_icon_lookup (
448
		icon_id = gnome_icon_lookup (

Return to bug 402256