[gtk/backports-for-4-2: 5/7] listitemwidget: Match activation conditions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/backports-for-4-2: 5/7] listitemwidget: Match activation conditions
- Date: Fri, 18 Jun 2021 17:23:32 +0000 (UTC)
commit 15a574976ee0605dc617dabbb197b6740e51b810
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jun 13 08:02:06 2021 -0400
listitemwidget: Match activation conditions
Make the conditions used for activation in the single-
and double-click case properly match, so that it is
obvious that we won't trigger both of them.
gtk/gtklistitemwidget.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtklistitemwidget.c b/gtk/gtklistitemwidget.c
index 09ac15d1bf..348c0e0e67 100644
--- a/gtk/gtklistitemwidget.c
+++ b/gtk/gtklistitemwidget.c
@@ -356,14 +356,16 @@ gtk_list_item_widget_click_gesture_released (GtkGestureClick *gesture,
{
GtkListItemWidgetPrivate *priv = gtk_list_item_widget_get_instance_private (self);
- if (priv->single_click_activate)
+ if (!priv->list_item || priv->list_item->activatable)
{
- gtk_widget_activate_action (GTK_WIDGET (self),
- "list.activate-item",
- "u",
- priv->position);
-
- return;
+ if (n_press == 1 && priv->single_click_activate)
+ {
+ gtk_widget_activate_action (GTK_WIDGET (self),
+ "list.activate-item",
+ "u",
+ priv->position);
+ return;
+ }
}
if (!priv->list_item || priv->list_item->selectable)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]