diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index 4ab921f..e03bfe1 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -3910,8 +3910,11 @@ thunar_file_unwatch (ThunarFile *file) * * You must be able to handle the case that @file is * destroyed during the reload call. + * + * Return value: The return value will be FALSE, in case this function + * is used as a GSourceFunc callback. **/ -void +gboolean thunar_file_reload (ThunarFile *file) { _thunar_return_if_fail (THUNAR_IS_FILE (file)); @@ -3923,12 +3926,14 @@ 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); + /* do not execute again */ + return FALSE; } diff --git a/thunar/thunar-file.h b/thunar/thunar-file.h index 1704aca..d192308 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_idle_timeout (ThunarFile *file, guint timeout);