summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Berla <corey@berla.me>2023-01-20 10:22:23 -0800
committerCorey Berla <corey@berla.me>2023-04-07 20:36:32 -0700
commitfbedaee75cfa4a730d49c030a49b17a790768d7e (patch)
tree13d1a71227a545ee02c4d53f083e5689b401a128
parent9886d865fc2c6acff3af8e8c0db40de0b7d48c39 (diff)
downloadnautilus-fbedaee75cfa4a730d49c030a49b17a790768d7e.tar.gz
files-view: Remove context menu timeout when before processing old files
process_old_files() can be called many times in succession. Each time it is called, the context menus get updated. In the case of a large number of changes, the context menu gets updated over and over again on a very large number of files which causes the application to hang. Remove any pending callbacks at the beginning of process_old_files.
-rw-r--r--src/nautilus-files-view.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 99b4ddfb6..f3737ef17 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -4331,6 +4331,7 @@ process_old_files (NautilusFilesView *view)
priv = nautilus_files_view_get_instance_private (view);
files_added = g_steal_pointer (&priv->old_added_files);
files_changed = g_steal_pointer (&priv->old_changed_files);
+ remove_update_context_menus_timeout_callback (view);
if (files_added != NULL || files_changed != NULL)