[evince] a11y: fixing implementation for atk_text_set_caret_offset
- From: Alejandro Piñeiro Iglesias <apinheiro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] a11y: fixing implementation for atk_text_set_caret_offset
- Date: Thu, 27 Feb 2014 11:15:31 +0000 (UTC)
commit 912d9d5ea30ac730a3dc107472bc104e645e4e9a
Author: Alejandro Piñeiro <apinheiro igalia com>
Date: Tue Feb 25 12:02:21 2014 +0100
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
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 53a5dfa..81bc618 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]