[Commits] [SCM] claws branch, master, updated. 3.17.4-40-geaa458ec3

wwp at claws-mail.org wwp at claws-mail.org
Wed Oct 2 11:40:54 CET 2019


The branch, master has been updated
       via  eaa458ec34c2242842275aa06a9576356f262fd6 (commit)
      from  39a33a6e1e95cab7b804257fdab4501d1b657699 (commit)

Summary of changes:
 src/mimeview.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit eaa458ec34c2242842275aa06a9576356f262fd6
Author: wwp <subscript at free.fr>
Date:   Wed Oct 2 13:40:20 2019 +0200

    Get double-click time from GTK API instead of hard-coded value 250.

diff --git a/src/mimeview.c b/src/mimeview.c
index edc768dd6..2bb967ca6 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -1528,6 +1528,7 @@ static gboolean mimeview_scrolled(GtkWidget *widget, GdkEventScroll *event,
 	return TRUE;
 }
 
+#include "gdk/gdkscreen.h"
 /* from gdkevents.c */
 #define DOUBLE_CLICK_TIME 250
 
@@ -1537,8 +1538,11 @@ static gboolean part_button_pressed(MimeView *mimeview, GdkEventButton *event,
 	static MimeInfo *lastinfo;
 	static guint32 lasttime;
 
+	gint double_click_time;
+	g_object_get(gtk_settings_get_default(), "gtk-double-click-time", &double_click_time, NULL);
+
 	if (event->button == 2 ||
-	    (event->button == 1 && (event->time - lasttime) < DOUBLE_CLICK_TIME && lastinfo == partinfo)) {
+	    (event->button == 1 && (event->time - lasttime) < double_click_time && lastinfo == partinfo)) {
 		/* call external program for image, audio or html */
 		mimeview_launch(mimeview, partinfo);
 		return TRUE;

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list