From a1014378dda895fe5d06c364a0f65817bf04101d Mon Sep 17 00:00:00 2001 From: Joanmarie Diggs Date: Mon, 17 Mar 2014 08:17:15 -0400 Subject: 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 --- libview/ev-view.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libview/ev-view.c') 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) { -- cgit v1.2.1