From c56deb4d9398fbdb1fc96b21779746d06a263f1c Mon Sep 17 00:00:00 2001 From: Joanmarie Diggs Date: Thu, 3 Oct 2013 12:13:18 -0400 Subject: 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 --- libview/ev-view-accessible.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.1