[evince/wip/gpoo/fix-warnings: 3/6] backend: Avoid using deprecated functions
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/gpoo/fix-warnings: 3/6] backend: Avoid using deprecated functions
- Date: Sun, 17 Oct 2021 17:09:20 +0000 (UTC)
commit abece3fc32174375ad5c4807c8c8eb02951b12a3
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Sun Oct 17 10:16:23 2021 -0300
backend: Avoid using deprecated functions
* poppler_page_get_selection_region has been long deprecated
in Poppler, and for getting a cairo_region_t,
poppler_page_get_selected_region is more straightforward to
use.
backend/pdf/ev-poppler.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/backend/pdf/ev-poppler.c b/backend/pdf/ev-poppler.c
index a53ff31d..428656d0 100644
--- a/backend/pdf/ev-poppler.c
+++ b/backend/pdf/ev-poppler.c
@@ -2473,7 +2473,6 @@ pdf_document_text_get_text_mapping (EvDocumentText *document_text,
{
PopplerPage *poppler_page;
PopplerRectangle points;
- GList *region;
cairo_region_t *retval;
g_return_val_if_fail (POPPLER_IS_PAGE (page->backend_page), NULL);
@@ -2484,11 +2483,9 @@ pdf_document_text_get_text_mapping (EvDocumentText *document_text,
points.y1 = 0.0;
poppler_page_get_size (poppler_page, &(points.x2), &(points.y2));
- region = poppler_page_get_selection_region (poppler_page, 1.0,
- POPPLER_SELECTION_GLYPH,
- &points);
- retval = create_region_from_poppler_region (region, 1.0, 1.0);
- g_list_free (region);
+ retval = poppler_page_get_selected_region (poppler_page, 1.0,
+ POPPLER_SELECTION_GLYPH,
+ &points);
return retval;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]