[anjal] Add --with-patched-webkit as an option. webkit 1.1.12 needs unstable



commit d9793c1e2ab35e8599f92a4fd0d00de8aed9643e
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Thu Aug 13 10:59:57 2009 +0530

    Add --with-patched-webkit as an option. webkit 1.1.12 needs unstable
    libsoup 2.27.4

 configure.ac            |   16 ++++++++++++++--
 src/em-webkit-stream.c  |    2 +-
 src/mail-message-view.c |    4 +++-
 3 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 21292d6..ed44d56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,12 +55,24 @@ AC_DEFINE_UNQUOTED(EVOLUTION_2_28, "$EVO_VERSION", [Evolution version])
 fi
 AC_DEFINE_UNQUOTED(EVOLUTION_VERSION, "$EVO_VERSION", [Evolution version])
 
-PKG_CHECK_MODULES(WEBKIT, [webkit-1.0 >= 1.1.12],HAVE_WEBKIT="yes", HAVE_WEBKIT="no")
+AC_MSG_CHECKING([whether to build with patched webkit])
+AC_ARG_WITH([patched-webkit],
+	[AC_HELP_STRING([--with-patched-webkit],
+	[Build with patched webkit [default=no]])],
+	with_webkit="$withval", with_webkit="no")
+AC_MSG_RESULT($with_webkit)
+
+if test "x$with_webkit" = "xno"; then
+   PKG_CHECK_MODULES(WEBKIT, [webkit-1.0 >= 1.1.12],HAVE_WEBKIT="yes", HAVE_WEBKIT="no")
+else
+   PKG_CHECK_MODULES(WEBKIT, [webkit-1.0],HAVE_WEBKIT="yes", HAVE_WEBKIT="no")
+   AC_DEFINE(HAVE_WEBKIT_PATCHED, 1, [webkit available])
+fi
 if test "x$HAVE_WEBKIT" = "xyes"; then
    AC_DEFINE(HAVE_WEBKIT, 1, [webkit available])
    AM_CONDITIONAL(ENABLE_WEBKIT, true)
 else
-   AC_DEFINE(HAVE_MOZILLA, 0, [webkit not available])
+   AC_DEFINE(HAVE_WEBKIT, 0, [webkit not available])
    AM_CONDITIONAL(ENABLE_WEBKIT, false)
 fi
 
diff --git a/src/em-webkit-stream.c b/src/em-webkit-stream.c
index 6765e9f..fda8b5e 100644
--- a/src/em-webkit-stream.c
+++ b/src/em-webkit-stream.c
@@ -118,7 +118,7 @@ emws_sync_flush(CamelStream *stream)
 static int
 emws_sync_close(CamelStream *stream)
 {
-#if 0	
+#if HAVE_WEBKIT_PATCHED	
 	EMWebKitStream *emws = (EMWebKitStream *)stream;
 
 	if (emws->view && WEBKIT_IS_WEB_VIEW (emws->view)&&webkit_web_frame_get_height(webkit_web_view_get_main_frame(emws->view)))
diff --git a/src/mail-message-view.c b/src/mail-message-view.c
index 01c6bda..133270c 100644
--- a/src/mail-message-view.c
+++ b/src/mail-message-view.c
@@ -649,7 +649,9 @@ mmv_finished_loading_webkit (WebKitWebView  *webkitwebview, WebKitWebFrame *arg1
 	// gtk_widget_hide (mmview->priv->table_headers);
 	// gtk_widget_show (mmview->priv->html_headers);
 	 gtk_widget_hide(mmview->priv->spinner);
-	/* gtk_widget_set_size_request ((GtkWidget *)webkitwebview, -1, webkit_web_frame_get_height(arg1)); */
+#if HAVE_WEBKIT_PATCHED	 
+	gtk_widget_set_size_request ((GtkWidget *)webkitwebview, -1, webkit_web_frame_get_height(arg1));
+#endif	 
 	/* Connect on expose, and mark mail as read on expose, when the mail is actually seen */
 	g_signal_connect (webkitwebview, "expose-event" , G_CALLBACK(mark_mail_read), mmview);
 	g_signal_emit (mmview, signals[MESSAGE_LOADED], 0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]