[Xfce4-commits] <thunar:master> Also clear cache on reload of a file.

Nick Schermer noreply at xfce.org
Thu Nov 1 21:46:01 CET 2012


Updating branch refs/heads/master
         to 045b964356b60e39fbe90d3ffc21d7abf6707146 (commit)
       from f821e1cb18aaa12e2be769d66a21b6c5ea3ea00d (commit)

commit 045b964356b60e39fbe90d3ffc21d7abf6707146
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Nov 1 21:17:16 2012 +0100

    Also clear cache on reload of a file.

 thunar/thunar-file.c         |    4 ++++
 thunar/thunar-icon-factory.c |    3 ++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 3187c85..0dd11cd 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -66,6 +66,7 @@
 #include <thunar/thunar-user.h>
 #include <thunar/thunar-util.h>
 #include <thunar/thunar-dialogs.h>
+#include <thunar/thunar-icon-factory.h>
 
 
 
@@ -3456,6 +3457,9 @@ thunar_file_reload (ThunarFile *file)
 {
   _thunar_return_if_fail (THUNAR_IS_FILE (file));
 
+  /* clear file pxmap cache */
+  thunar_icon_factory_clear_pixmap_cache (file);
+
   if (!thunar_file_load (file, NULL, NULL))
     {
       /* destroy the file if we cannot query any file information */
diff --git a/thunar/thunar-icon-factory.c b/thunar/thunar-icon-factory.c
index 2f66ce9..2826e22 100644
--- a/thunar/thunar-icon-factory.c
+++ b/thunar/thunar-icon-factory.c
@@ -879,5 +879,6 @@ thunar_icon_factory_clear_pixmap_cache (ThunarFile *file)
   _thunar_return_if_fail (THUNAR_IS_FILE (file));
 
   /* unset the data */
-  g_object_set_qdata (G_OBJECT (file), thunar_icon_factory_store_quark, NULL);
+  if (thunar_icon_factory_store_quark != 0)
+    g_object_set_qdata (G_OBJECT (file), thunar_icon_factory_store_quark, NULL);
 }


More information about the Xfce4-commits mailing list