diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index 44c1213..bc7396a 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -3910,8 +3910,12 @@ thunar_file_unwatch (ThunarFile *file) * * You must be able to handle the case that @file is * destroyed during the reload call. + * + * Return value: FALSE because if used as a callback function for + * thunar_file_reload_idle it should be automatically removed from + * the list of event sources so it is not called again. **/ -void +gboolean thunar_file_reload (ThunarFile *file) { _thunar_return_if_fail (THUNAR_IS_FILE (file)); @@ -3923,12 +3927,13 @@ thunar_file_reload (ThunarFile *file) { /* destroy the file if we cannot query any file information */ thunar_file_destroy (file); - return; + return FALSE; } /* ... and tell others */ thunar_file_changed (file); - + + return FALSE; } diff --git a/thunar/thunar-file.h b/thunar/thunar-file.h index 9a3de17..cfc3d05 100644 --- a/thunar/thunar-file.h +++ b/thunar/thunar-file.h @@ -239,7 +239,7 @@ const gchar *thunar_file_get_icon_name (ThunarFile void thunar_file_watch (ThunarFile *file); void thunar_file_unwatch (ThunarFile *file); -void thunar_file_reload (ThunarFile *file); +gboolean thunar_file_reload (ThunarFile *file); void thunar_file_reload_idle (ThunarFile *file); void thunar_file_reload_parent (ThunarFile *file);