[Commits] [SCM] claws branch, master, updated. 4.1.1-2-gb358b973c

paul at claws-mail.org paul at claws-mail.org
Mon Oct 24 09:22:49 UTC 2022


The branch, master has been updated
       via  b358b973c9335674f23e7ed093db9e3319b4ab4a (commit)
      from  1e3b95e1d341111c0b3aeaac03aa059d7fc0d840 (commit)

Summary of changes:
 src/plugins/fancy/fancy_web_extension.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit b358b973c9335674f23e7ed093db9e3319b4ab4a
Author: Paul <paul at claws-mail.org>
Date:   Mon Oct 24 10:22:45 2022 +0100

    use GLib 2.66 when available
    
    make things simpler for our future selves

diff --git a/src/plugins/fancy/fancy_web_extension.c b/src/plugins/fancy/fancy_web_extension.c
index 3a61cafc4..a92c0989a 100644
--- a/src/plugins/fancy/fancy_web_extension.c
+++ b/src/plugins/fancy/fancy_web_extension.c
@@ -31,17 +31,25 @@ static gboolean web_page_send_request_cb(WebKitWebPage *web_page,
 	gboolean is_remote = TRUE;
 	gboolean should_block;
 	const char *request_uri = webkit_uri_request_get_uri(request);
+#if GLIB_CHECK_VERSION(2,66,0)
+	const char *scheme = g_uri_peek_scheme(request_uri);
+#else
 	gchar *scheme = g_uri_parse_scheme(request_uri);
-
+#endif
 	if (scheme == NULL)
 		return TRUE;
-
+#if GLIB_CHECK_VERSION(2,66,0)
+	if (g_ascii_strcasecmp(scheme, "cid") == 0 ||
+	    g_ascii_strcasecmp(scheme, "file") == 0 ||
+	    g_ascii_strcasecmp(scheme, "about") == 0)
+ 		is_remote = FALSE;
+#else
 	if (g_ascii_strcasecmp(scheme, "cid") == 0 ||
 		g_ascii_strcasecmp(scheme, "file") == 0 ||
 		g_ascii_strcasecmp(scheme, "about") == 0)
 		is_remote = FALSE;
 	g_free(scheme);
-
+#endif
 	if (is_remote)
 		should_block = !load_remote_content;
 	else

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list