[gtk+/gtk-3-8] IconTheme: Clear caches when reloading theme



commit b4244b734ea6f30d0ece50559900bc458a6d205d
Author: Alexander Larsson <alexl redhat com>
Date:   Wed Jun 19 09:35:24 2013 +0200

    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
    (cherry picked from commit 1ee36713fe31b56df31b5ba3151c247bf4ee1f3c)

 gtk/gtkicontheme.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index e1e6746..1046f17 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -1400,7 +1400,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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]