! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
In thunar-file, thunar_file_monitor_file_changed is called twice
Status:
RESOLVED: FIXED

Comments

Description Adam Plumb editbugs 2009-12-17 19:45:18 CET
Created attachment 2748 
Patch file

This may be be design, so please excuse me if it is.

In thunar-file.c, thunar_file_monitor_file_changed is called twice when it should only be called once.

    static void
    thunar_file_info_changed (ThunarxFileInfo *file_info)
    {
      thunar_file_set_thumb_state (THUNAR_FILE (file_info), THUNAR_FILE_THUMB_STATE_UNKNOWN);

      /* tell the file monitor that this file changed */
      thunar_file_monitor_file_changed (THUNAR_FILE (file_info));
    }

    void
    thunar_file_set_thumb_state (ThunarFile          *file, 
                                 ThunarFileThumbState state)
    {
      _thunar_return_if_fail (THUNAR_IS_FILE (file));

      /* set the new thumbnail state */
      file->flags = (file->flags & ~THUNAR_FILE_THUMB_STATE_MASK) | (state);
      
      /* notify others of this change, so that all components can update
       * their file information */
      thunar_file_monitor_file_changed (file);
    }

Notice thunar_file_monitor_file_changed is called in *_set_thumb_state, but then *_set_thumb_state also calls it.

I'm assuming that having thunar_file_monitor_file_changed called twice is not the desired behavior, so I've attached a patch that removes the call from the thunar_file_info_changed function.
Comment 1 Nick Schermer editbugs 2012-09-26 20:45:25 CEST
Fixed in 7fcfc3c.

Bug #6094

Reported by:
Adam Plumb
Reported on: 2009-12-17
Last modified on: 2012-09-26

People

Assignee:
Jannis Pohlmann
CC List:
1 user

Version

Attachments

Patch file (448 bytes, patch)
2009-12-17 19:45 CET , Adam Plumb
no flags

Additional information