[Xfce4-commits] <thunar:xfce-4.8> Force desktop file reload after changing the Name field.
Jannis Pohlmann
noreply at xfce.org
Sun Jan 30 18:30:03 CET 2011
Updating branch refs/heads/xfce-4.8
to b70c4abab3503eb4d3682e3ff619a2c5336e8247 (commit)
from 3c1227aa1232bf9d6009d6d34ea281468e070642 (commit)
commit b70c4abab3503eb4d3682e3ff619a2c5336e8247
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Sun Jan 30 18:19:38 2011 +0100
Force desktop file reload after changing the Name field.
NEWS | 1 +
thunar/thunar-file.c | 13 +++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 4b550c6..7535d6c 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@
Thunar itself (bug #6851).
- Fix segfault when calling strcasecmp with NULL parameters (bug #7206).
- Only change the Name field when renaming desktop files (bug #7155).
+- Force desktop file reload after changing the Name field.
1.2.0
=====
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index bda7669..1281841 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -1285,8 +1285,17 @@ thunar_file_rename (ThunarFile *file,
/* write the changes back to the file */
if (thunar_g_file_write_key_file (file->gfile, key_file, cancellable, &err))
{
- /* notify everybody that the file has changed */
- thunar_file_changed (file);
+ /* reload file information */
+ thunar_file_load (file, NULL, NULL);
+
+ if (!called_from_job)
+ {
+ /* tell the associated folder that the file was renamed */
+ thunarx_file_info_renamed (THUNARX_FILE_INFO (file));
+
+ /* notify everybody that the file has changed */
+ thunar_file_changed (file);
+ }
/* release the key file and return with success */
g_key_file_free (key_file);
More information about the Xfce4-commits
mailing list