summaryrefslogtreecommitdiff
path: root/src/nautilus-file.h
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2016-12-09 22:23:06 +0100
committerCarlos Soriano <csoriano@gnome.org>2016-12-10 00:01:54 +0100
commit6205e6b26bbf76a47bf0d22bcfe7bfa4d5cef982 (patch)
tree3f21ff21fe3ee1b27e64f996d318e6255eead6ad /src/nautilus-file.h
parentb2873f718b4698a6d93306a98af403fa5cac400f (diff)
downloadnautilus-6205e6b26bbf76a47bf0d22bcfe7bfa4d5cef982.tar.gz
general: only set icon position metadata when in desktop
We were setting the icon position metadata for any operation in any file due to legacy code where nautilus was able to have a freedom-of-placement canvas in the regular windows. However that changed and we can only have freedom-of-placement in the desktop window. Setting the metadata is a extremely expensive operation, and was causing issues, outlined in https://bugzilla.gnome.org/show_bug.cgi?id=757747, summarizing copy and move operations where really slow when using drag and drop, operations when we need to store the icon position when using a freedom-of-placement canvas view. This patch tries to only set the metadata when necessary, which is when using the desktop window. However the code is pretty integrated with the rest of Nautilus, so the patch was able to isolate the part when the metadata is set and only provide metadata when the target is the desktop. However, for unsetting the metadata the patch need to check if it's the desktop inside the file-operations, which is less than ideal. https://bugzilla.gnome.org/show_bug.cgi?id=775910
Diffstat (limited to 'src/nautilus-file.h')
-rw-r--r--src/nautilus-file.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nautilus-file.h b/src/nautilus-file.h
index a5943de1b..e7c93e058 100644
--- a/src/nautilus-file.h
+++ b/src/nautilus-file.h
@@ -219,6 +219,7 @@ gboolean nautilus_file_is_remote (Nautilu
gboolean nautilus_file_is_other_locations (NautilusFile *file);
gboolean nautilus_file_is_home (NautilusFile *file);
gboolean nautilus_file_is_desktop_directory (NautilusFile *file);
+gboolean nautilus_file_is_child_of_desktop_directory (NautilusFile *file);
GError * nautilus_file_get_file_info_error (NautilusFile *file);
gboolean nautilus_file_get_directory_item_count (NautilusFile *file,
guint *count,