Drop a couple of webkit related configure tests

The tests are only relevant to webkit versions older than our baseline.
pull/120/head
Geert Janssens 9 years ago
parent 51332b1a65
commit 33f39627e3

@ -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/webkit.h>]],
[[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

@ -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)

@ -263,12 +263,6 @@
/* Define to 1 if you have the <wctype.h> 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 <X11/Xlib.h> header file. */
#cmakedefine HAVE_X11_XLIB_H 1

@ -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

Loading…
Cancel
Save