mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-05 18:31:09 +00:00
Merge branch 'wip/exalm/activate' into 'master'
listitemwidget: Activate on release instead of press Closes #3345 See merge request GNOME/gtk!3008
This commit is contained in:
commit
de4b8d547b
@ -332,7 +332,7 @@ gtk_list_item_widget_click_gesture_pressed (GtkGestureClick *gesture,
|
|||||||
|
|
||||||
if (!priv->list_item || priv->list_item->activatable)
|
if (!priv->list_item || priv->list_item->activatable)
|
||||||
{
|
{
|
||||||
if (n_press == 2 || priv->single_click_activate)
|
if (n_press == 2 && !priv->single_click_activate)
|
||||||
{
|
{
|
||||||
gtk_widget_activate_action (GTK_WIDGET (self),
|
gtk_widget_activate_action (GTK_WIDGET (self),
|
||||||
"list.activate-item",
|
"list.activate-item",
|
||||||
@ -356,6 +356,16 @@ gtk_list_item_widget_click_gesture_released (GtkGestureClick *gesture,
|
|||||||
{
|
{
|
||||||
GtkListItemWidgetPrivate *priv = gtk_list_item_widget_get_instance_private (self);
|
GtkListItemWidgetPrivate *priv = gtk_list_item_widget_get_instance_private (self);
|
||||||
|
|
||||||
|
if (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)
|
if (!priv->list_item || priv->list_item->selectable)
|
||||||
{
|
{
|
||||||
GdkModifierType state;
|
GdkModifierType state;
|
||||||
|
Loading…
Reference in New Issue
Block a user