From 33f39627e32919d834627df515bcaebf823a3d7d Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Fri, 27 Jan 2017 19:24:53 +0100 Subject: [PATCH] Drop a couple of webkit related configure tests The tests are only relevant to webkit versions older than our baseline. --- configure.ac | 30 +----------------------------- src/CMakeLists.txt | 3 --- src/config.h.cmake.in | 6 ------ src/html/gnc-html-webkit.c | 17 ----------------- 4 files changed, 1 insertion(+), 55 deletions(-) diff --git a/configure.ac b/configure.ac index e8fbfada36..27b4057813 100644 --- a/configure.ac +++ b/configure.ac @@ -1127,35 +1127,7 @@ then webkit) PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= "1.2") - case "$platform" in - win32) - # 1.1.90 has both functions - AC_DEFINE(HAVE_WEBKIT_WEB_VIEW_LOAD_URI,1,[webkit_web_view_load_uri exists]) - AC_DEFINE(HAVE_WEBKIT_WEB_FRAME_PRINT_FULL,1,[webkit_web_frame_print_full exists]) - ;; - *) - # Unsure - check functions exist - oLIBS="$LIBS" - LIBS="$LIBS ${WEBKIT_LIBS}" - AC_CHECK_FUNCS(webkit_web_view_load_uri) - LIBS="$oLIBS" - AC_MSG_CHECKING(for webkit_web_frame_print_full) - saved_CFLAGS="${CFLAGS}" - saved_LIBS="${LIBS}" - CFLAGS="${CFLAGS} ${WEBKIT_CFLAGS}" - LIBS="${LIBS} ${WEBKIT_LIBS}" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[webkit_web_frame_print_full( 0, 0, 0, 0 );]])], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_WEBKIT_WEB_FRAME_PRINT_FULL,1,[webkit_web_frame_print_full exists])], - [AC_MSG_RESULT(no)]) - CFLAGS="${saved_CFLAGS}" - LIBS="${saved_LIBS}" - ;; - esac - ;; + ;; *) AC_MSG_ERROR([Invalid HTML engine: must be webkit]) ;; esac diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c6fde05673..2d0a3105ad 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -112,9 +112,6 @@ IF(GLIB2_VERSION VERSION_GREATER 2.38.0 OR GLIB2_VERSION VERSION_EQUAL 2.38.0) SET(HAVE_GLIB_2_38 1) ENDIF() -SET(HAVE_WEBKIT_WEB_FRAME_PRINT_FULL 1) -SET(HAVE_WEBKIT_WEB_VIEW_LOAD_URI 1) - IF(DISABLE_DEPRECATED_GNOME) SET(GNOME_DISABLE_DEPRECATED 1) ENDIF(DISABLE_DEPRECATED_GNOME) diff --git a/src/config.h.cmake.in b/src/config.h.cmake.in index e0e271ccaf..22f69a4d5b 100644 --- a/src/config.h.cmake.in +++ b/src/config.h.cmake.in @@ -263,12 +263,6 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_WCTYPE_H 1 -/* webkit_web_frame_print_full exists */ -#cmakedefine HAVE_WEBKIT_WEB_FRAME_PRINT_FULL 1 - -/* Define to 1 if you have the `webkit_web_view_load_uri' function. */ -#cmakedefine HAVE_WEBKIT_WEB_VIEW_LOAD_URI 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_X11_XLIB_H 1 diff --git a/src/html/gnc-html-webkit.c b/src/html/gnc-html-webkit.c index b28d94095e..be9eb37416 100644 --- a/src/html/gnc-html-webkit.c +++ b/src/html/gnc-html-webkit.c @@ -724,12 +724,10 @@ static void impl_webkit_show_data( GncHtml* self, const gchar* data, int datalen ) { GncHtmlWebkitPrivate* priv; -#if HAVE(WEBKIT_WEB_VIEW_LOAD_URI) #define TEMPLATE_REPORT_FILE_NAME "gnc-report-XXXXXX.html" int fd; gchar* uri; gchar *filename; -#endif g_return_if_fail( self != NULL ); g_return_if_fail( GNC_IS_HTML_WEBKIT(self) ); @@ -738,7 +736,6 @@ impl_webkit_show_data( GncHtml* self, const gchar* data, int datalen ) priv = GNC_HTML_WEBKIT_GET_PRIVATE(self); -#if HAVE(WEBKIT_WEB_VIEW_LOAD_URI) /* Export the HTML to a file and load the file URI. On Linux, this seems to get around some security problems (otherwise, it can complain that embedded images aren't permitted to be viewed because they are local resources). On Windows, this allows the embedded images to @@ -753,9 +750,6 @@ impl_webkit_show_data( GncHtml* self, const gchar* data, int datalen ) DEBUG("Loading uri '%s'", uri); webkit_web_view_load_uri( priv->web_view, uri ); g_free( uri ); -#else - webkit_web_view_load_html_string( priv->web_view, data, BASE_URI_NAME ); -#endif LEAVE(""); } @@ -1093,23 +1087,16 @@ impl_webkit_export_to_file( GncHtml* self, const char *filepath ) static void impl_webkit_print( GncHtml* self, const gchar* jobname, gboolean export_pdf ) { -#if !HAVE(WEBKIT_WEB_FRAME_PRINT_FULL) - extern void webkit_web_frame_print( WebKitWebFrame * frame ); -#endif - gchar *export_filename = NULL; GncHtmlWebkitPrivate* priv; WebKitWebFrame* frame; -#if HAVE(WEBKIT_WEB_FRAME_PRINT_FULL) GtkPrintOperation* op = gtk_print_operation_new(); GError* error = NULL; GtkPrintSettings *print_settings; -#endif priv = GNC_HTML_WEBKIT_GET_PRIVATE(self); frame = webkit_web_view_get_main_frame( priv->web_view ); -#if HAVE(WEBKIT_WEB_FRAME_PRINT_FULL) gnc_print_operation_init( op, jobname ); print_settings = gtk_print_operation_get_print_settings (op); if (!print_settings) @@ -1284,10 +1271,6 @@ impl_webkit_print( GncHtml* self, const gchar* jobname, gboolean export_pdf ) gnc_print_operation_save_print_settings(op); g_object_unref( op ); g_free(export_filename); - -#else - webkit_web_frame_print( frame ); -#endif } static void