[Xfce4-commits] [xfce/thunar] 02/03: Use proper return type for thunar_file_reload (bug #11913)
noreply at xfce.org
noreply at xfce.org
Thu May 21 16:05:13 CEST 2015
This is an automated email from the git hooks/post-receive script.
hjudt pushed a commit to branch master
in repository xfce/thunar.
commit 9bf051a0005cef3d661493a44e7de911868cf5e7
Author: Harald Judt <h.judt at gmx.at>
Date: Thu May 21 14:12:48 2015 +0200
Use proper return type for thunar_file_reload (bug #11913)
Because thunar_file_reload is now a callback function, it needs to return
TRUE or FALSE, otherwise the behaviour is undefined. This should fix a
couple of potential issues.
---
thunar/thunar-file.c | 11 ++++++++---
thunar/thunar-file.h | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 44c1213..196bb6c 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: As this function can be used as a callback function
+ * for thunar_file_reload_idle, it will always return FALSE to prevent
+ * being called repeatedly.
**/
-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);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list