summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-view-accessible.c13
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;
}