Skip to content
Permalink
Browse files

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.
  • Loading branch information...
joanmarie committed Apr 24, 2018
1 parent 3c3f62d commit 5e236e94cc6274dc18d88d1b86cb83c7646287fe
Showing with 6 additions and 0 deletions.
  1. +6 −0 libcaja-private/caja-icon-container.c
@@ -8025,13 +8025,15 @@ 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;
caja_icon_container_update_icon (container, icon);
}

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)
{

0 comments on commit 5e236e9

Please sign in to comment.
You can’t perform that action at this time.