From 1ee36713fe31b56df31b5ba3151c247bf4ee1f3c Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 19 Jun 2013 09:35:24 +0200 Subject: [PATCH] IconTheme: Clear caches when reloading theme When we're reloading the theme in ensure_valid_themes (due to noticing that a theme dir has changed) we need to also clear the icon cache as it will not be valid for the new theme. We already do this in do_theme_change(), but ensure_valid_themes() was missing this. https://bugzilla.gnome.org/show_bug.cgi?id=702598 --- gtk/gtkicontheme.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 66ea1742a6..4af25376e4 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -1399,7 +1399,10 @@ ensure_valid_themes (GtkIconTheme *icon_theme) if (ABS (tv.tv_sec - priv->last_stat_time) > 5 && rescan_themes (icon_theme)) - blow_themes (icon_theme); + { + g_hash_table_remove_all (priv->info_cache); + blow_themes (icon_theme); + } } if (!priv->themes_valid)