[Commits] [SCM] claws branch, master, updated. 3.17.0-115-g54a8e10

Colin colin at claws-mail.org
Mon Oct 15 10:39:39 CEST 2018


The branch, master has been updated
       via  54a8e1084c0bbc89623e34cf4ea8adafd4553aeb (commit)
      from  59a718bfd6732a9997bb6020e776ac1ee049d358 (commit)

Summary of changes:
 src/plugins/fancy/fancy_viewer.c |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 54a8e1084c0bbc89623e34cf4ea8adafd4553aeb
Author: Colin Leroy <colin at colino.net>
Date:   Mon Oct 15 10:39:21 2018 +0200

    Fancy: fix left-click on links not opening in browser.

diff --git a/src/plugins/fancy/fancy_viewer.c b/src/plugins/fancy/fancy_viewer.c
index a10f6bc..3792e84 100644
--- a/src/plugins/fancy/fancy_viewer.c
+++ b/src/plugins/fancy/fancy_viewer.c
@@ -902,17 +902,30 @@ static gboolean press_button_cb (WebKitWebView *view, GdkEvent *ev,
 		FancyViewer *viewer)
 {
 	gint type = 0;
+	gchar *link = NULL;
+
 	WebKitHitTestResult *result =
 		webkit_web_view_get_hit_test_result(view, (GdkEventButton *)ev);
 
 	g_object_get(G_OBJECT(result),
 			"context", &type,
-			"x", &viewer->click_x, "y", &viewer->click_y,
+			"x", &viewer->click_x,
+			"y", &viewer->click_y,
+			"link-uri", &link,
 			NULL);
 
 	if (type & WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION)
 		return FALSE;
 
+	if (viewer->cur_link) {
+		g_free(viewer->cur_link);
+		viewer->cur_link = NULL;
+	}
+	if (link != NULL) {
+		debug_print("press on %s\n", link);
+		viewer->cur_link = link; /* g_context returned a newly-allocated string */
+	}
+
 	viewer->doc = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(viewer->view));
 	viewer->window = webkit_dom_document_get_default_view (viewer->doc);
 	viewer->selection = webkit_dom_dom_window_get_selection (viewer->window);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list