From 974a49f21845900f4ea154088a17b6b7e55a27e6 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Mon, 3 Sep 2007 20:58:54 +0000 Subject: [PATCH] Bump requirements to poppler 0.6 and drop all ifdefs used. Double and 2007-09-03 Carlos Garcia Campos * configure.ac: * backend/pdf/ev-poppler.cc: (pdf_selection_get_selected_text), (pdf_selection_get_selection_region), (pdf_selection_get_selection_map), (ev_form_field_from_poppler_field): Bump requirements to poppler 0.6 and drop all ifdefs used. Double and triple click selections are enabled again now. svn path=/trunk/; revision=2661 --- ChangeLog | 11 +++++++++++ backend/pdf/ev-poppler.cc | 16 +--------------- configure.ac | 7 +------ 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c596c93..2649e2a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-09-03 Carlos Garcia Campos + + * configure.ac: + * backend/pdf/ev-poppler.cc: (pdf_selection_get_selected_text), + (pdf_selection_get_selection_region), + (pdf_selection_get_selection_map), + (ev_form_field_from_poppler_field): + + Bump requirements to poppler 0.6 and drop all ifdefs used. Double + and triple click selections are enabled again now. + 2007-09-03 Carlos Garcia Campos * shell/ev-window.c: (ev_window_add_history): diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index 1fa23543..4ddea1a4 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -19,10 +19,6 @@ #include "config.h" -#ifdef HAVE_POPPLER_FORM_FIELD_BUTTON_GET_BUTTON_TYPE -#define HAVE_FORMS -#endif - #include #include #include @@ -1871,9 +1867,7 @@ pdf_selection_get_selected_text (EvSelection *selection, r.y2 = height - points->y1; retval = poppler_page_get_text (poppler_page, -#if 0 (PopplerSelectionStyle)style, -#endif &r); g_object_unref (poppler_page); @@ -1896,9 +1890,7 @@ pdf_selection_get_selection_region (EvSelection *selection, retval = poppler_page_get_selection_region ((PopplerPage *)rc->data, rc->scale, -#if 0 (PopplerSelectionStyle)style, -#endif (PopplerRectangle *) points); return retval; } @@ -1920,9 +1912,7 @@ pdf_selection_get_selection_map (EvSelection *selection, points.y1 = 0.0; poppler_page_get_size (poppler_page, &(points.x2), &(points.y2)); retval = poppler_page_get_selection_region (poppler_page, 1.0, -#if 0 POPPLER_SELECTION_GLYPH, -#endif &points); g_object_unref (poppler_page); @@ -1989,7 +1979,6 @@ pdf_document_get_crop_box (EvDocument *document, rect->y2 = poppler_rect.y2; } -#ifdef HAVE_FORMS static EvFormField * ev_form_field_from_poppler_field (PopplerFormField *poppler_field) { @@ -2026,10 +2015,7 @@ ev_form_field_from_poppler_field (PopplerFormField *poppler_field) field_text->do_scroll = poppler_form_field_text_do_scroll (poppler_field); field_text->is_rich_text = poppler_form_field_text_is_rich_text (poppler_field); field_text->is_password = poppler_form_field_text_is_password (poppler_field); - -#ifdef HAVE_POPPLER_FORM_FIELD_TEXT_GET_MAX_LEN field_text->max_len = poppler_form_field_text_get_max_len (poppler_field); -#endif field_text->text = poppler_form_field_text_get_text (poppler_field); } @@ -2358,4 +2344,4 @@ pdf_document_document_forms_iface_init (EvDocumentFormsIface *iface) iface->form_field_choice_set_text = pdf_document_forms_form_field_choice_set_text; iface->form_field_choice_get_text = pdf_document_forms_form_field_choice_get_text; } -#endif /* HAVE_FORMS */ + diff --git a/configure.ac b/configure.ac index c6849a0f..49bc4e49 100644 --- a/configure.ac +++ b/configure.ac @@ -235,7 +235,7 @@ AC_ARG_ENABLE(pdf, [AC_HELP_STRING([--enable-pdf], [Compile with pdf support])],enable_pdf="$enableval",enable_pdf=yes) if test "x$enable_pdf" = "xyes"; then - POPPLER_REQUIRED=0.5.9 + POPPLER_REQUIRED=0.6 PKG_CHECK_MODULES(POPPLER, poppler-glib >= $POPPLER_REQUIRED,enable_pdf=yes,enable_pdf=no) if test "x$enable_pdf" = "xyes"; then @@ -247,11 +247,6 @@ if test "x$enable_pdf" = "xyes"; then evince_save_LIBS=$LIBS LIBS="$LIBS $FRONTEND_LIBS" AC_CHECK_FUNCS(poppler_page_render) - dnl we need latest poppler cvs head, - dnl this function was the last to be added - AC_CHECK_FUNCS(poppler_form_field_button_get_button_type) - AC_CHECK_FUNCS(poppler_form_field_text_get_max_len) - AC_CHECK_FUNCS(poppler_form_field_text_is_password) LIBS=$evince_save_LIBS PKG_CHECK_MODULES(CAIRO_PDF, cairo-pdf, enable_cairo_pdf=yes, enable_cairo_pdf=no) -- 2.43.5