[balsa] fix issue #38



commit 33fe183f4b4afa679f04ebafba0198a95e9c9e86
Author: Albrecht Dreß <albrecht dress arcor de>
Date:   Wed Jun 17 19:34:55 2020 +0200

    fix issue #38
    
    fix issues introduced w/ commit 2e2704f4:
    * compile error on Ubuntu 20.04
    * respect `--with-html-widget=no` configuration
    
    Signed-off-by: Albrecht Dreß <albrecht dress arcor de>

 src/main.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/main.c b/src/main.c
index e55072ee3..a745444a7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -54,7 +54,17 @@
 
 #include "libbalsa-gpgme.h"
 #include "libbalsa-gpgme-cb.h"
+
+#ifdef HAVE_HTML_WIDGET
+#include <gtk/gtk.h>
+#if defined(GTK_DISABLE_DEPRECATED)
+#define GtkAction GAction
+#include <webkit2/webkit2.h>
+#undef GtkAction
+#else  /* defined(GTK_DISABLE_DEPRECATED) */
 #include <webkit2/webkit2.h>
+#endif /* defined(GTK_DISABLE_DEPRECATED) */
+#endif /* HAVE_HTML_WIDGET */
 
 /* We need separate variable for storing command line requests to check the
    mail because such selection cannot be stored in balsa_app and later
@@ -510,8 +520,10 @@ balsa_startup_cb(GApplication *application,
     GError *error = NULL;
 #endif
 
+#ifdef HAVE_HTML_WIDGET
     /* https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/Sandbox-all-the-WebKit! */
     webkit_web_context_set_sandbox_enabled(webkit_web_context_get_default(), TRUE);
+#endif
 
 #ifdef ENABLE_NLS
     /* Initialize the i18n stuff */


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