diff options
author | Alejandro PiƱeiro <[email protected]> | 2014-02-25 12:02:21 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-11-27 10:13:51 +0100 |
commit | 137dab44c694cb52000708501e7118b30f2bfa1b (patch) | |
tree | 1fff0b4e10dade599baeb4ffc5bb5d969d574499 /libview | |
parent | b77806ce4d47b41edba14324f567540798c501e6 (diff) | |
download | atril-137dab44c694cb52000708501e7118b30f2bfa1b.tar.bz2 atril-137dab44c694cb52000708501e7118b30f2bfa1b.tar.xz |
a11y: fixing implementation for atk_text_set_caret_offset
It uses the recently added ev_view_set_caret_cursor_position
https://bugzilla.gnome.org/show_bug.cgi?id=701746
https://git.gnome.org/browse/evince/commit/?h=gnome-3-12&id=912d9d5
Diffstat (limited to 'libview')
-rw-r--r-- | libview/ev-view-accessible.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libview/ev-view-accessible.c b/libview/ev-view-accessible.c index 26a2554c..5f68973d 100644 --- a/libview/ev-view-accessible.c +++ b/libview/ev-view-accessible.c @@ -327,20 +327,17 @@ static gboolean ev_view_accessible_set_caret_offset (AtkText *text, gint offset) { GtkWidget *widget; - GtkTextBuffer *buffer; - GtkTextIter pos_itr; + EvView *view; widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text)); if (widget == NULL) /* State is defunct */ return FALSE; - buffer = ev_view_accessible_get_text_buffer (EV_VIEW_ACCESSIBLE (text), EV_VIEW (widget)); - if (!buffer) - return FALSE; - - gtk_text_buffer_get_iter_at_offset (buffer, &pos_itr, offset); - gtk_text_buffer_place_cursor (buffer, &pos_itr); + view = EV_VIEW (widget); + ev_view_set_caret_cursor_position (view, + view->cursor_page, + offset); return TRUE; } |