Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libview
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-05-08 10:24:36 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2010-05-08 10:24:36 (GMT)
commiteb80ecd1f7aa6ff57d2a3324c691274745ca4ed0 (patch)
tree55159ec20fa770c90a110aaa390f905d09b8a2fa /libview
parentd92e01606a301b6f677d85c3b24348f3b51ed2f4 (diff)
[libdocument] Use EvPage instead of EvRenderContext in get_selected_text()
It doesn't depend on scale and rotation so we only need the page.
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-view.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 3a91508..ac8b949 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -5523,10 +5523,8 @@ get_selected_text (EvView *view)
GString *text;
GList *l;
gchar *normalized_text;
- EvRenderContext *rc;
text = g_string_new (NULL);
- rc = ev_render_context_new (NULL, view->rotation, view->scale);
ev_document_doc_mutex_lock ();
@@ -5536,19 +5534,14 @@ get_selected_text (EvView *view)
gchar *tmp;
page = ev_document_get_page (view->document, selection->page);
- ev_render_context_set_page (rc, page);
- g_object_unref (page);
-
tmp = ev_selection_get_selected_text (EV_SELECTION (view->document),
- rc, selection->style,
+ page, selection->style,
&(selection->rect));
-
+ g_object_unref (page);
g_string_append (text, tmp);
g_free (tmp);
}
- g_object_unref (rc);
-
ev_document_doc_mutex_unlock ();
normalized_text = g_utf8_normalize (text->str, text->len, G_NORMALIZE_NFKC);