a11y: More State<>Change confusion
We should really avoid this needless duplication - the 'state' is never stored anywhere.
This commit is contained in:
@@ -407,12 +407,13 @@ static const GDBusInterfaceVTable root_accessible_vtable = {
|
|||||||
|
|
||||||
void
|
void
|
||||||
gtk_at_spi_root_child_changed (GtkAtSpiRoot *self,
|
gtk_at_spi_root_child_changed (GtkAtSpiRoot *self,
|
||||||
GtkAccessibleChildState state,
|
GtkAccessibleChildChange change,
|
||||||
GtkAccessible *child)
|
GtkAccessible *child)
|
||||||
{
|
{
|
||||||
guint n, i;
|
guint n, i;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
GVariant *window_ref;
|
GVariant *window_ref;
|
||||||
|
GtkAccessibleChildState state;
|
||||||
|
|
||||||
if (!self->toplevels)
|
if (!self->toplevels)
|
||||||
return;
|
return;
|
||||||
@@ -443,6 +444,18 @@ gtk_at_spi_root_child_changed (GtkAtSpiRoot *self,
|
|||||||
window_ref = gtk_at_spi_context_to_ref (GTK_AT_SPI_CONTEXT (context));
|
window_ref = gtk_at_spi_context_to_ref (GTK_AT_SPI_CONTEXT (context));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (change)
|
||||||
|
{
|
||||||
|
case GTK_ACCESSIBLE_CHILD_CHANGE_ADDED:
|
||||||
|
state = GTK_ACCESSIBLE_CHILD_STATE_ADDED;
|
||||||
|
break;
|
||||||
|
case GTK_ACCESSIBLE_CHILD_CHANGE_REMOVED:
|
||||||
|
state = GTK_ACCESSIBLE_CHILD_STATE_REMOVED;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
g_assert_not_reached ();
|
||||||
|
}
|
||||||
|
|
||||||
gtk_at_spi_emit_children_changed (self->connection,
|
gtk_at_spi_emit_children_changed (self->connection,
|
||||||
self->root_path,
|
self->root_path,
|
||||||
state,
|
state,
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ gtk_at_spi_root_to_ref (GtkAtSpiRoot *self);
|
|||||||
|
|
||||||
void
|
void
|
||||||
gtk_at_spi_root_child_changed (GtkAtSpiRoot *self,
|
gtk_at_spi_root_child_changed (GtkAtSpiRoot *self,
|
||||||
GtkAccessibleChildState state,
|
GtkAccessibleChildChange change,
|
||||||
GtkAccessible *child);
|
GtkAccessible *child);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|||||||
Reference in New Issue
Block a user