After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732915 - button: better treatment for autorepeat
button: better treatment for autorepeat
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkButton
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
: 661622 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-07-08 18:24 UTC by Matthias Clasen
Modified: 2018-04-15 00:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proof of concept: GtkGestureTimedPress (14.39 KB, patch)
2014-07-08 19:18 UTC, Carlos Garnacho
none Details | Review

Description Matthias Clasen 2014-07-08 18:24:16 UTC
There are several places where we manually implement auto-repeat when a button (or button-like widget) is clicked and held: GtkScaleButton +/-, gtknotebook scroll arrows, gtkscrollbar steppers. It would be nice to treat this more uniformly, and preserve the button styling as much as possible while doing so. Currently, the scale button +/- buttons don't show proper press/release feedback, because we override the button-press/release handling.
Comment 1 Carlos Garnacho 2014-07-08 19:18:12 UTC
Created attachment 280180 [details] [review]
proof of concept: GtkGestureTimedPress

This is a simple gesture that emits ::tick signals at regular
intervals while the GtkGestureSingle is active (ie. touch/button
is pressed)
Comment 2 Matthias Clasen 2014-07-09 11:46:04 UTC
In many places, we have two intervals, a longer initial timeout, followed by a shorter repeat timeout. Do you think this should be part of the gesture, or should the users simple reset the interval themselves ?
Comment 3 Matthias Clasen 2014-07-10 05:03:03 UTC
*** Bug 661622 has been marked as a duplicate of this bug. ***
Comment 4 Carlos Garnacho 2014-07-10 12:28:32 UTC
(In reply to comment #2)
> In many places, we have two intervals, a longer initial timeout, followed by a
> shorter repeat timeout. Do you think this should be part of the gesture, or
> should the users simple reset the interval themselves ?

IMO setting the interval is simple enough, and allows for doing this on other parameters than just timing (eg. distance or positional based). One place I'm thinking could be useful is on GtkTextView text selection, right now it only reacts to motions, even if you pull the selection so it causes scrolling.

OTOH... in many of those places probably what is desired is a change in the step size, and not the frequency, I'm thinking about GtkSpinButton, or even my example above. I guess this is another point in favor to keep the secondary timeout out of the gesture code.
Comment 5 Matthias Clasen 2014-07-10 13:11:10 UTC
ok, fine with me.

Do you have a follow-up patch to use this gesture somewhere ?
Comment 6 Matthias Clasen 2018-02-10 05:00:12 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 7 Matthias Clasen 2018-04-15 00:11:34 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new