[Xfce4-commits] <thunar:master> Emit file changed once (bug #6094).

Nick Schermer noreply at xfce.org
Wed Sep 26 20:48:01 CEST 2012


Updating branch refs/heads/master
         to 7fcfc3c37d40e013e741f6ab40e5cf14e1387fca (commit)
       from 07787a1b5265480671a78e69d0a6e5e1c917f4ae (commit)

commit 7fcfc3c37d40e013e741f6ab40e5cf14e1387fca
Author: Adam Plumb <adamplumb at gmail.com>
Date:   Wed Sep 26 20:45:23 2012 +0200

    Emit file changed once (bug #6094).
    
    thunar_file_set_thumb_state also created a changed event.

 thunar/thunar-file.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 469a1b8..90571a5 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -429,10 +429,16 @@ thunar_file_info_get_location (ThunarxFileInfo *file_info)
 static void
 thunar_file_info_changed (ThunarxFileInfo *file_info)
 {
-  thunar_file_set_thumb_state (THUNAR_FILE (file_info), THUNAR_FILE_THUMB_STATE_UNKNOWN);
+  ThunarFile *file = THUNAR_FILE (file_info);
+
+  _thunar_return_if_fail (THUNAR_IS_FILE (file_info));
+
+  /* set the new thumbnail state manually, so we only emit file
+   * changed once */
+  file->flags = (file->flags & ~THUNAR_FILE_THUMB_STATE_MASK) | (THUNAR_FILE_THUMB_STATE_UNKNOWN);
 
   /* tell the file monitor that this file changed */
-  thunar_file_monitor_file_changed (THUNAR_FILE (file_info));
+  thunar_file_monitor_file_changed (file);
 }
 
 


More information about the Xfce4-commits mailing list