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 309300 - Adjust the key binding for setting the spin box's value to the minimum or maximum
Adjust the key binding for setting the spin box's value to the minimum or max...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkSpinButton
2.6.x
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-07-01 16:41 UTC by Kathy Fernandes
Modified: 2016-02-24 02:26 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Proposed patch (1.24 KB, patch)
2016-02-21 17:01 UTC, Jean-François Fortin Tam
committed Details | Review

Description Kathy Fernandes 2005-07-01 16:41:48 UTC
Up/Down and PgUp/PgDown currently increase/decrease the value in a spin box one
small and one large step. Ctrl+Home/Ctrl+End should be added as a key binding
that adjusts the value in a spin box to the maximum/minimum value. The Home and
End keys are normally included in key bindings that navigate to the
beginning/end of data, so the proposed key bindings provide consistency with
similar behaviors available in a scrolled window, list, and tree. The proposed
key binding is not found in Windows.

Other information:
Comment 1 Jean-François Fortin Tam 2016-02-21 16:38:26 UTC
Here's a discussion that happened today:

--------------
<nekohayo> is it "expected" behavior that hitting the home/end keys while inside the entry of a spinbutton will warp that spinbutton's value to one of the two extremes of the range? It's causing problems for at least one application, where the spinbutton is used for decimal $ values. I'd like to be able to go to the beginning and end of the string, not have the number change to some random crazy big number: https://bugs.launchpad.net/homebank/+bug/1547260

<Company> https://git.gnome.org/browse/gtk+/tree/gtk/gtkspinbutton.c#n581
 seems to be by design, though HOME/END is pretty new:
 https://git.gnome.org/browse/gtk+/commit/?id=f263c11

<nekohayo> oh so *that* is why I thought there was a regression in Homebank

<Company> I think that should be reverted. HOME/END are used in text entries while page up/down aren't. Or at least they should require Ctrl

<nekohayo> Exactly. I wouldn't mind if this was bound to shift (or ctrl) + home/end, but without those, currently it breaks consistency with other entry widgets
------------

So, reopening as I suppose this should be using ctrl or shift modifiers, making everyone happy (as this bug report originally intended :)
Comment 2 Jean-François Fortin Tam 2016-02-21 17:01:47 UTC
Created attachment 321784 [details] [review]
Proposed patch

Nevermind the idea of using the shift modifier, it would conflict with selecting from the cursor position to the beginning/end.

This patch fixes the issue by using Ctrl+Home/End as originally requested.