Skip to content
Snippets Groups Projects
Commit 01b368c4 authored by Benedikt Meurer's avatar Benedikt Meurer
Browse files

2007-03-19 Benedikt Meurer <benny@xfce.org>

	* thunar/thunar-icon-factory.c: Automatically disable thumbnailing
	  if storing of thumbnails failes because of a fatal error (i.e.
	  broken setup). Bug #3020.




(Old svn revision: 25229)
parent 335de338
No related branches found
No related tags found
No related merge requests found
2007-03-19 Benedikt Meurer <benny@xfce.org>
* thunar/thunar-icon-factory.c: Automatically disable thumbnailing
if storing of thumbnails failes because of a fatal error (i.e.
broken setup). Bug #3020.
2007-02-12 Benedikt Meurer <benny@xfce.org>
* thunar-vfs/thunar-vfs-thumb-jpeg.c: Fix unaligned memory access in
......
......@@ -109,6 +109,8 @@ struct _ThunarIconFactory
ThunarThumbnailGenerator *thumbnail_generator;
ThunarVfsThumbFactory *thumbnail_factory;
ThunarPreferences *preferences;
GdkPixbuf *recently[MAX_RECENTLY]; /* ring buffer */
guint recently_pos; /* insert position */
......@@ -299,6 +301,9 @@ thunar_icon_factory_finalize (GObject *object)
g_object_unref (G_OBJECT (factory->icon_theme));
}
/* disconnect from the preferences */
g_object_unref (G_OBJECT (factory->preferences));
(*G_OBJECT_CLASS (thunar_icon_factory_parent_class)->finalize) (object);
}
......@@ -595,7 +600,8 @@ thunar_icon_factory_lookup_icon (ThunarIconFactory *factory,
if (!thunar_vfs_thumb_factory_store_thumbnail (factory->thumbnail_factory, pixbuf, info, &err))
{
/* not critical, but atleast let the user know whats going on */
g_warning ("Failed to store thumbnail for \"%s\": %s", filename, err->message);
g_warning ("Failed to store thumbnail for \"%s\" (%s), disabling thumbnailing", filename, err->message);
g_object_set (G_OBJECT (factory->preferences), "misc-show-thumbnails", FALSE, NULL);
g_error_free (err);
}
......@@ -801,7 +807,6 @@ thunar_icon_factory_get_default (void)
ThunarIconFactory*
thunar_icon_factory_get_for_icon_theme (GtkIconTheme *icon_theme)
{
ThunarPreferences *preferences;
ThunarIconFactory *factory;
_thunar_return_val_if_fail (GTK_IS_ICON_THEME (icon_theme), NULL);
......@@ -820,9 +825,8 @@ thunar_icon_factory_get_for_icon_theme (GtkIconTheme *icon_theme)
g_object_set_qdata (G_OBJECT (factory->icon_theme), thunar_icon_factory_quark, factory);
/* connect the "show-thumbnails" property to the global preference */
preferences = thunar_preferences_get ();
g_object_set_data_full (G_OBJECT (factory), I_("thunar-preferences"), preferences, g_object_unref);
exo_binding_new (G_OBJECT (preferences), "misc-show-thumbnails", G_OBJECT (factory), "show-thumbnails");
factory->preferences = thunar_preferences_get ();
exo_mutual_binding_new (G_OBJECT (factory->preferences), "misc-show-thumbnails", G_OBJECT (factory), "show-thumbnails");
}
else
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment