[nautilus] Call g_reload_user_special_dirs_cache() when xdg-user-dirs change
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [nautilus] Call g_reload_user_special_dirs_cache() when xdg-user-dirs change
- Date: Mon, 15 Jun 2009 07:24:01 -0400 (EDT)
commit 41975360a57115b5223e3466517df66b45c3fb63
Author: Alexander Larsson <alexl redhat com>
Date: Mon Jun 15 13:20:14 2009 +0200
Call g_reload_user_special_dirs_cache() when xdg-user-dirs change
This means we will get the new special file icon for the changed files.
Also, invalidate the file when we change it ourself so that the icon
change is picked up.
libnautilus-private/nautilus-file-utilities.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c
index 8562612..022dbd0 100644
--- a/libnautilus-private/nautilus-file-utilities.c
+++ b/libnautilus-private/nautilus-file-utilities.c
@@ -276,8 +276,11 @@ xdg_dir_changed (NautilusFile *file,
G_SPAWN_STDERR_TO_DEV_NULL,
NULL, NULL,
NULL, NULL, NULL, NULL);
+ g_reload_user_special_dirs_cache ();
schedule_user_dirs_changed ();
desktop_dir_changed ();
+ /* Icon might have changed */
+ nautilus_file_invalidate_attributes (file, NAUTILUS_FILE_ATTRIBUTE_INFO);
}
}
g_object_unref (location);
@@ -367,6 +370,7 @@ update_xdg_dir_cache (void)
int i;
free_xdg_dir_cache ();
+ g_reload_user_special_dirs_cache ();
schedule_user_dirs_changed ();
desktop_dir_changed ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]