summaryrefslogtreecommitdiff
path: root/libview/ev-view.c
diff options
context:
space:
mode:
authorJoanmarie Diggs <[email protected]>2014-03-17 08:17:15 -0400
committerraveit65 <[email protected]>2017-11-27 10:13:51 +0100
commita1014378dda895fe5d06c364a0f65817bf04101d (patch)
tree889af6362674e4284a422f959c5a63def5867e77 /libview/ev-view.c
parent10e2bd8e5a729f4472f4260704f605ae1f30d89f (diff)
downloadatril-a1014378dda895fe5d06c364a0f65817bf04101d.tar.bz2
atril-a1014378dda895fe5d06c364a0f65817bf04101d.tar.xz
libview: Fix some broken aspects EvViewAccessible text support
* Stop using GtkTextBuffer: It was a hack more than a real solution * Fix setting and clearing of selection via AtkText for the current page * Strip newline chars out of the sentence strings: Newlines break TTS prosody * Add some logic to heuristically distinguish soft and hard returns https://bugzilla.gnome.org/show_bug.cgi?id=725003 https://git.gnome.org/browse/evince/commit/?h=gnome-3-12&id=03afe27
Diffstat (limited to 'libview/ev-view.c')
-rw-r--r--libview/ev-view.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index ab704fdc..bb7d0d1b 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -7923,6 +7923,20 @@ ev_view_get_has_selection (EvView *view)
return view->selection_info.selections != NULL;
}
+void
+_ev_view_clear_selection (EvView *view)
+{
+ clear_selection (view);
+}
+
+void
+_ev_view_set_selection (EvView *view,
+ GdkPoint *start_point,
+ GdkPoint *end_point)
+{
+ compute_selections (view, EV_SELECTION_STYLE_GLYPH, start_point, end_point);
+}
+
static char *
get_selected_text (EvView *view)
{