*text_to_read = NULL;
*descr_to_read = NULL;
+ GHashTable *attrs = atspi_accessible_get_attributes(event->source, NULL);
+ if (attrs) {
+ char *val = g_hash_table_lookup(attrs, "suppress-screen-reader");
+ DEBUG("got attributes, suppress-screen-reader is '%s'", val);
+ if (val) {
+ g_hash_table_destroy(attrs);
+ return;
+ }
+ }
+
if (cancel) *cancel = 1;
if (!g_strcmp0(event->type, spi->tracking_signal_name)) {
spi->ignore_next_caret_move = EINA_TRUE;
*text_to_read = g_strdup(g_value_get_string(&event->any_data));
- GHashTable *attrs = atspi_accessible_get_attributes(event->source, NULL);
int mode = 1;
if (attrs) {
char *val = g_hash_table_lookup(attrs, "container-live");
if (g_strcmp0(val, "polite") == 0) mode = 2;
else if (g_strcmp0(val, "off") == 0) mode = 0;
}
- g_hash_table_destroy(attrs);
}
DEBUG("speaking mode is %d", mode);
} else {
ERROR("Unknown event type");
}
+
+ if (attrs) {
+ g_hash_table_destroy(attrs);
+ }
}
/* Warning! this function does not take SpiData as data! */