summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoanmarie Diggs <[email protected]>2018-04-24 11:07:29 -0400
committerJoanmarie Diggs <[email protected]>2018-04-24 11:07:29 -0400
commit5e236e94cc6274dc18d88d1b86cb83c7646287fe (patch)
treed577558fb254b94034e1072600af0bdadb45870f
parent3c3f62d17186cee0690b87917c6133f6148e3ca8 (diff)
downloadcaja-5e236e94cc6274dc18d88d1b86cb83c7646287fe.tar.bz2
caja-5e236e94cc6274dc18d88d1b86cb83c7646287fe.tar.xz
Eliminate accessible children-changed event flood during update all
Accessible children-changed events should only be emitted when a user- triggered action (creation of file, copying an item) causes an item to be added. Set container->details->is_loading (which does not seem to be used anywhere) in caja_icon_container_request_update_all because if the entire container is being updated, children-changed events should not be emitted for each updated icon.
-rw-r--r--libcaja-private/caja-icon-container.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index 3a434d32..e1db560d 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -8025,6 +8025,7 @@ caja_icon_container_request_update_all (CajaIconContainer *container)
g_return_if_fail (CAJA_IS_ICON_CONTAINER (container));
+ container->details->is_loading = TRUE;
for (node = container->details->icons; node != NULL; node = node->next)
{
icon = node->data;
@@ -8032,6 +8033,7 @@ caja_icon_container_request_update_all (CajaIconContainer *container)
}
redo_layout (container);
+ container->details->is_loading = FALSE;
}
/**
@@ -9580,6 +9582,10 @@ caja_icon_container_accessible_icon_added_cb (CajaIconContainer *container,
AtkObject *atk_child;
int index;
+ // We don't want to emit children_changed signals during the initial load.
+ if (container->details->is_loading)
+ return;
+
icon = g_hash_table_lookup (container->details->icon_set, icon_data);
if (icon)
{