[Xfce4-commits] [xfce/thunar] 03/10: Add function to reload parent file of a file
noreply at xfce.org
noreply at xfce.org
Sat Apr 18 14:23:06 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 a945839a554b5a58f3ee434edb0769aae6a64892
Author: Harald Judt <h.judt at gmx.at>
Date: Wed Mar 25 15:19:56 2015 +0100
Add function to reload parent file of a file
---
thunar/thunar-file.c | 26 ++++++++++++++++++++++++++
thunar/thunar-file.h | 2 ++
2 files changed, 28 insertions(+)
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index aa4939c..51e3379 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -724,6 +724,32 @@ thunar_file_monitor_moved (ThunarFile *file,
+void
+thunar_file_reload_parent (ThunarFile *file)
+{
+ ThunarFile *parent = NULL;
+
+ _thunar_return_if_fail (THUNAR_IS_FILE (file));
+
+ if (thunar_file_has_parent (file))
+ {
+ GFile *parent_file;
+
+ /* only reload file if it is in cache */
+ parent_file = g_file_get_parent (file->gfile);
+ parent = thunar_file_cache_lookup (parent_file);
+ g_object_unref (parent_file);
+ }
+
+ if (parent)
+ {
+ thunar_file_reload (parent);
+ g_object_unref (parent);
+ }
+}
+
+
+
static void
thunar_file_monitor (GFileMonitor *monitor,
GFile *path,
diff --git a/thunar/thunar-file.h b/thunar/thunar-file.h
index f0302e3..c645330 100644
--- a/thunar/thunar-file.h
+++ b/thunar/thunar-file.h
@@ -241,6 +241,8 @@ void thunar_file_unwatch (ThunarFile
void thunar_file_reload (ThunarFile *file);
+void thunar_file_reload_parent (ThunarFile *file);
+
void thunar_file_destroy (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