Commit Graph

15 Commits

Author SHA1 Message Date
Matthias Clasen
66f0bdee0a Intern all signal names beforehand
This avoids pointless allocations
2015-09-12 12:50:39 -04:00
Matthias Clasen
2b6376248d long press: Add a delay-factor property
Add a way to set a delay factor that can be used
to make the long press more or less sensitive.
Making this a factor instead of exposing the delay
itself preserves the value of the setting as an
overall 'slow down long press' setting.
2015-02-23 08:37:26 -05:00
Carlos Garnacho
6d8842ca96 gesturesingle: Implement GtkGesture::cancel better than GtkEventController:reset
The former can be called individually on each sequence, and the latter will
always call the former on all currently active sequences, so only implementing
resetting on cancel() works for both cases. Also, chain up on subclasses
implementing cancel.

This fixes clicking on nautilus' file list after popping up a menu, as broken
grabs are one of those situations where sequences get cancelled individually,
the "current button" wasn't properly reset, and further clicks with button != 3
were ignored.
2014-06-13 01:27:31 +02:00
Matthias Clasen
3bb404f40c Don't assert in gtk_event_controller_constructed
This prevents some of our generic object implementation tests
from working with gesture objects. Instead, add g_return_if_fail
checks in all the gesture constructors.
2014-05-27 14:33:32 -04:00
Matthias Clasen
0442431943 Docs: Cosmetic fixes 2014-05-23 19:54:33 +02:00
Matthias Clasen
aead8a360b Docs: Minor changes 2014-05-23 19:54:32 +02:00
Carlos Garnacho
0288fd0a88 gesture: Make gtk_gesture_check() private 2014-05-23 19:54:29 +02:00
Matthias Clasen
42df9eda2d Prevent subclassing of gestures
For now, at least. We do this by hiding the instance and
class structures in private headers.
2014-05-23 19:54:28 +02:00
Carlos Garnacho
fa168e202e longpress: doc fixes 2014-05-23 19:54:27 +02:00
Carlos Garnacho
90b2f386e7 longpress: Add missing documentation 2014-05-23 19:54:27 +02:00
Carlos Garnacho
c3075f1d56 longpress: Ensure check() happens after cancel()
And delegate on GtkGesture::check(), it does deal better with
extra fleeting touches.
2014-05-23 19:54:26 +02:00
Carlos Garnacho
c506dfe600 longpress: fix reentrancy on ::reset() 2014-05-23 19:54:26 +02:00
Carlos Garnacho
cdcc536ddc longpress: Use xsettings to determine long press duration
GtkSettings::gtk-long-press-time is used to this effect.
2014-05-23 19:54:24 +02:00
Carlos Garnacho
3db87cb0b7 longpress: Make a subclass of GtkGestureSingle
the redundant API here has been removed.
2014-05-23 19:54:23 +02:00
Carlos Garnacho
88d554d3ba Add GtkGestureLongPress
This gesture interprets long presses with variable delays
and thresholds
2014-05-23 19:54:21 +02:00