[gtk+] treeview: Reset multipress controller after 2nd click
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: Reset multipress controller after 2nd click
- Date: Wed, 27 Aug 2014 15:14:17 +0000 (UTC)
commit e6199af60d4f1be2aa538840674ed6a7932c704f
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Aug 27 14:36:53 2014 +0200
treeview: Reset multipress controller after 2nd click
The pre-gestures code used to compare the current button press with the
previous one on !activate_on_single_click, and unset the previous event
data so ::row-activated would be emitted every 2 clicks.
So do the same with the multipress gesture and reset it after every 2nd
click to have ::row-activated emitted multiple times while manic clicking.
https://bugzilla.gnome.org/show_bug.cgi?id=735353
gtk/gtktreeview.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index efaabfb..48cdede 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -3308,6 +3308,9 @@ gtk_tree_view_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
}
gtk_tree_path_free (path);
+
+ if (n_press >= 2)
+ gtk_event_controller_reset (GTK_EVENT_CONTROLLER (gesture));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]