add a parameter to circumvent the internal thumbnail cache to the

2007-06-06  Jens Granseuer  <jensgr@gmx.net>

	* theme-thumbnail.c: (generate_theme_thumbnail_async):
	* theme-thumbnail.h: add a parameter to circumvent the internal
	thumbnail cache to the asynchronous generator

svn path=/trunk/; revision=7695
This commit is contained in:
Jens Granseuer 2007-06-05 22:16:51 +00:00 committed by Jens Granseuer
parent a9fee19f43
commit e57c99d8e0
3 changed files with 26 additions and 4 deletions

View file

@ -1,3 +1,18 @@
2007-06-06 Jens Granseuer <jensgr@gmx.net>
* theme-thumbnail.c: (generate_theme_thumbnail_async):
* theme-thumbnail.h: add a parameter to circumvent the internal
thumbnail cache to the asynchronous generator
2007-06-02 Jens Granseuer <jensgr@gmx.net>
reviewed by: <delete if not using a buddy>
* gnome-theme-info.c: (get_data_from_hash_by_name),
(read_icon_theme), (handle_change_signal), (update_theme_index),
(gnome_theme_meta_info_compare):
* gnome-theme-info.h:
2007-05-30 Jens Granseuer <jensgr@gmx.net>
* gnome-theme-info.c: (safe_strcmp), (add_data_to_hash_by_name),

View file

@ -601,6 +601,7 @@ generate_theme_thumbnail (GnomeThemeMetaInfo *meta_theme_info,
void
generate_theme_thumbnail_async (GnomeThemeMetaInfo *meta_theme_info,
gboolean clear_cache,
ThemeThumbnailFunc func,
gpointer user_data,
GDestroyNotify destroy)
@ -612,10 +613,15 @@ generate_theme_thumbnail_async (GnomeThemeMetaInfo *meta_theme_info,
pixbuf = g_hash_table_lookup (theme_hash, meta_theme_info->name);
if (pixbuf != NULL)
{
(* func) (pixbuf, user_data);
if (destroy)
(* destroy) (user_data);
return;
if (clear_cache)
g_hash_table_remove (theme_hash, meta_theme_info->name);
else
{
(* func) (pixbuf, user_data);
if (destroy)
(* destroy) (user_data);
return;
}
}
if (!pipe_to_factory_fd[1] || !pipe_from_factory_fd[0])

View file

@ -12,6 +12,7 @@ typedef void (* ThemeThumbnailFunc) (GdkPixbuf *pixbuf,
GdkPixbuf *generate_theme_thumbnail (GnomeThemeMetaInfo *meta_theme_info,
gboolean clear_cache);
void generate_theme_thumbnail_async (GnomeThemeMetaInfo *meta_theme_info,
gboolean clear_cache,
ThemeThumbnailFunc func,
gpointer data,
GDestroyNotify destroy);