diff options
author | Dave Camp <dave@ximian.com> | 2002-11-18 22:56:15 +0000 |
---|---|---|
committer | Dave Camp <campd@src.gnome.org> | 2002-11-18 22:56:15 +0000 |
commit | c132cdef984a346c8e638f8d334b038868447f37 (patch) | |
tree | 52ea9ddb63fde079947df958eae94e9e25c9c2f8 | |
parent | c6d0a734a5b3563c6b9fe1357ba00e1c36a8234c (diff) | |
download | nautilus-c132cdef984a346c8e638f8d334b038868447f37.tar.gz |
Backported Alex's fix from HEAD:
2002-11-18 Dave Camp <dave@ximian.com>
Backported Alex's fix from HEAD:
* libnautilus-private/nautilus-file.c (update_info_internal):
Don't invalidate DISPLAY_NAME for all files, since this will re-load
file_info making directory loads very slow! As a workaround, only do
this if file->details->display_name is already set. I don't know
if this is the correct way though.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | libnautilus-private/nautilus-file.c | 14 |
2 files changed, 21 insertions, 3 deletions
@@ -1,3 +1,13 @@ +2002-11-18 Dave Camp <dave@ximian.com> + + Backported Alex's fix from HEAD: + + * libnautilus-private/nautilus-file.c (update_info_internal): + Don't invalidate DISPLAY_NAME for all files, since this will re-load + file_info making directory loads very slow! As a workaround, only do + this if file->details->display_name is already set. I don't know + if this is the correct way though. + 2002-11-09 Dmitry G. Mastrukov <dmitry@taurussoft.org> * configure.in: Added Belarusian to ALL_LINGUAS diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c index ee5f02b95..492d52a58 100644 --- a/libnautilus-private/nautilus-file.c +++ b/libnautilus-private/nautilus-file.c @@ -1282,9 +1282,17 @@ update_info_internal (NautilusFile *file, g_free (file->details->relative_uri); file->details->relative_uri = new_relative_uri; nautilus_file_clear_cached_display_name (file); - name_attribute.data = NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME; - nautilus_file_invalidate_attributes (file, - &name_attribute); + + /* the rename could have affected the display name if e.g. + * we're in a vfolder where the name comes from a desktop file + * and a rename affects the contents of the desktop file. + */ + if (file->details->display_name != NULL) { + name_attribute.data = NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME; + nautilus_file_invalidate_attributes (file, + &name_attribute); + } + nautilus_directory_end_file_name_change (file->details->directory, file, node); } |