From 638121c2c5ac7505e4bfb4972df90814ffb93bd8 Mon Sep 17 00:00:00 2001 From: Pascal Obry Date: Tue, 1 Oct 2024 21:56:31 +0200 Subject: [PATCH] Do not use hard-coded doubl-click-time, request it from settings. --- src/dtgtk/thumbtable.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/dtgtk/thumbtable.c b/src/dtgtk/thumbtable.c index 4dfdb1c1c44b..f1bc6712e541 100644 --- a/src/dtgtk/thumbtable.c +++ b/src/dtgtk/thumbtable.c @@ -1572,8 +1572,16 @@ static gboolean _event_button_release(GtkWidget *widget, } else { + GtkSettings *settings = gtk_widget_get_settings(GTK_WIDGET (widget)); + guint double_click_time = 400; + + if(settings) + { + g_object_get(settings, "gtk-double-click-time", &double_click_time, NULL); + } + table->to_selid = id; - table->sel_single_cb = g_timeout_add(300, _do_select_single, table); + table->sel_single_cb = g_timeout_add(double_click_time, _do_select_single, table); } } }