g_free(description);
}
-char *generate_description_for_subtrees(AtspiAccessible *obj)
-{
- DEBUG("START");
-
- if (!obj)
- return strdup("");
- return strdup("");
- /*
- AtspiRole role;
- int child_count;
- int i;
- char *name = NULL;
- char *below = NULL;
- char ret[TTS_MAX_TEXT_SIZE] = "\0";
- AtspiAccessible *child = NULL;
-
- int child_count = atspi_accessible_get_child_count(obj, NULL);
-
- role = atspi_accessible_get_role(obj, NULL);
-
- // Do not generate that for popups
- if (role == ATSPI_ROLE_POPUP_MENU || role == ATSPI_ROLE_DIALOG)
- return strdup("");
-
- child_count = atspi_accessible_get_child_count(obj, NULL);
-
- DEBUG("There is %d children inside this object", child_count);
- if (!child_count)
- return strdup("");
-
- for (i=0; i < child_count; i++)
- {
- child = atspi_accessible_get_child_at_index(obj, i, NULL);
- name = atspi_accessible_get_name(child, NULL);
- DEBUG("%d child name:%s", i, name);
- if (name && strncmp(name, "\0", 1))
- {
- strncat(ret, name, sizeof(ret) - strlen(ret) - 1);
- }
- strncat(ret, " ", sizeof(ret) - strlen(ret) - 1);
- below = generate_description_for_subtrees(child);
- DEBUG("%s from below", below);
- if (strncmp(below, "\0", 1))
- {
- strncat(ret, below, sizeof(ret) - strlen(ret) - 1);
- }
-
- g_object_unref(child);
- free(below);
- free(name);
- }
- return strdup(ret);
- */
-}
-
static int _check_list_children_count(AtspiAccessible *obj)
{
int list_count = 0;
char *names = NULL;
char *description = NULL;
char *role_name = NULL;
- char *other = NULL;
char *text = NULL;
char ret[TTS_MAX_TEXT_SIZE] = "\0";
char *description_from_relation = NULL;
if (hash_table) g_hash_table_unref(hash_table);
if (attribute & ACCESSIBLE_READING_INFO_TYPE_NAME) {
name = atspi_accessible_get_name(obj, NULL);
- other = generate_description_for_subtrees(obj);
name_from_relation = generate_text_for_relation_objects(obj,
ATSPI_RELATION_LABELLED_BY, generate_name_from_relation_object);
AtspiText *iface_text = atspi_accessible_get_text_iface(obj);
}
if (name && strncmp(name, "\0", 1))
names = strdup(name);
- else if (other && strncmp(other, "\0", 1))
- names = strdup(other);
if (text) {
strncat(ret, text, sizeof(ret) - strlen(ret) - 1);
}
strncat(ret, ", ", sizeof(ret) - strlen(ret) - 1);
strncat(ret, name_from_relation, sizeof(ret) - strlen(ret) - 1);
}
- DEBUG("WIDGET GAINED HIGHLIGHT: %s, %s", name, other);
+ DEBUG("WIDGET GAINED HIGHLIGHT: %s", name);
SCREEN_READER_SAFE_FREE(text, free);
SCREEN_READER_SAFE_FREE(name, free);
- SCREEN_READER_SAFE_FREE(other, free);
SCREEN_READER_SAFE_FREE(name_from_relation, free);
SCREEN_READER_SAFE_FREE(names, free);
}