summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
authorJoanmarie Diggs <[email protected]>2013-10-03 12:13:18 -0400
committerraveit65 <[email protected]>2017-11-27 10:13:51 +0100
commitc56deb4d9398fbdb1fc96b21779746d06a263f1c (patch)
tree22c158f8d8e4387db250de0b5a1f9638cbee6fe9 /libview
parenteef7bfa5dcf4a837cd3f5a6c9fe7bbb86a8ac0ef (diff)
downloadatril-c56deb4d9398fbdb1fc96b21779746d06a263f1c.tar.bz2
atril-c56deb4d9398fbdb1fc96b21779746d06a263f1c.tar.xz
ev-view-accessible: call document_changed_cb when setting the model
When an application embedding an EvView reuses that view to display a new document, the content of last page viewed from the previous document is exposed to assistive technologies. In order to get the content of the current document, the user must change pages. This problem resulted from the assumption that the document would be set after the model was set. https://bugzilla.gnome.org/show_bug.cgi?id=709375 https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=3d06f42
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-view-accessible.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libview/ev-view-accessible.c b/libview/ev-view-accessible.c
index 6529d3cc..0fa0e973 100644
--- a/libview/ev-view-accessible.c
+++ b/libview/ev-view-accessible.c
@@ -1113,6 +1113,11 @@ document_changed_cb (EvDocumentModel *model,
GParamSpec *pspec,
EvViewAccessible *accessible)
{
+ EvDocument *document = ev_document_model_get_document (model);
+
+ if (document == NULL)
+ return;
+
clear_cache (accessible);
}
@@ -1132,6 +1137,7 @@ ev_view_accessible_set_model (EvViewAccessible *accessible,
priv->model = g_object_ref (model);
+ document_changed_cb (model, NULL, accessible);
g_signal_connect (priv->model, "page-changed",
G_CALLBACK (page_changed_cb),
accessible);