diff options
Diffstat (limited to 'libview/ev-page-accessible.c')
-rw-r--r-- | libview/ev-page-accessible.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libview/ev-page-accessible.c b/libview/ev-page-accessible.c index d3c72e3e..3346dc4b 100644 --- a/libview/ev-page-accessible.c +++ b/libview/ev-page-accessible.c @@ -24,6 +24,7 @@ #include <glib/gi18n-lib.h> #include "ev-page-accessible.h" +#include "ev-image-accessible.h" #include "ev-link-accessible.h" #include "ev-view-private.h" @@ -96,6 +97,7 @@ static void ev_page_accessible_initialize_children (EvPageAccessible *self) { EvView *view; + EvMappingList *images; EvMappingList *links; GList *children = NULL; GList *list; @@ -110,10 +112,12 @@ ev_page_accessible_initialize_children (EvPageAccessible *self) self->priv->children_initialized = TRUE; links = ev_page_cache_get_link_mapping (view->page_cache, self->priv->page); - if (!links) + images = ev_page_cache_get_image_mapping (view->page_cache, self->priv->page); + if (!links && !images) return; children = g_list_copy (ev_mapping_list_get_list (links)); + children = g_list_concat (children, g_list_copy (ev_mapping_list_get_list (images))); children = g_list_sort (children, (GCompareFunc) compare_mappings); self->priv->children = g_ptr_array_new_full (g_list_length (children), (GDestroyNotify) g_object_unref); @@ -127,7 +131,8 @@ ev_page_accessible_initialize_children (EvPageAccessible *self) AtkHyperlink *atk_link = atk_hyperlink_impl_get_hyperlink (ATK_HYPERLINK_IMPL (link)); child = atk_hyperlink_get_object (atk_link, 0); - } + } else if (images && ev_mapping_list_find (images, mapping->data)) + child = ATK_OBJECT (ev_image_accessible_new (self, EV_IMAGE (mapping->data), &mapping->area)); if (child) g_ptr_array_add (self->priv->children, child); |