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 667229 - gtkspinbutton: Respect value of inherited 'editable' property
gtkspinbutton: Respect value of inherited 'editable' property
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkSpinButton
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 611825 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-01-03 22:49 UTC by Zeeshan Ali
Modified: 2012-01-06 16:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkspinbutton: Respect value of inherited 'editable' property (1.79 KB, patch)
2012-01-03 22:49 UTC, Zeeshan Ali
committed Details | Review
gtkspinbutton: Ignore keynav when !editable (1.47 KB, patch)
2012-01-05 01:11 UTC, Zeeshan Ali
committed Details | Review
gtkspinbutton: Don't hilight buttons when !editable (1.86 KB, patch)
2012-01-05 01:12 UTC, Zeeshan Ali
reviewed Details | Review
gtkspinbutton: Don't hilight buttons when !editable (1.48 KB, patch)
2012-01-06 02:33 UTC, Zeeshan Ali
reviewed Details | Review
gtkspinbutton: Don't hilight buttons when !editable (999 bytes, patch)
2012-01-06 03:52 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2012-01-03 22:49:34 UTC
When this property is set to 'FALSE', user's click on the buttons
should not actually update the value but rather result in error bell.
Comment 1 Zeeshan Ali 2012-01-03 22:49:37 UTC
Created attachment 204536 [details] [review]
gtkspinbutton: Respect value of inherited 'editable' property
Comment 2 Zeeshan Ali 2012-01-03 23:18:53 UTC
Review of attachment 204536 [details] [review]:

Pushed after 'ack' from Benjamin Otte on IRC.
Comment 3 Matthias Clasen 2012-01-04 01:48:44 UTC
I don't think that is right. See my earlier comments in bug 611825
Comment 4 Matthias Clasen 2012-01-04 02:10:37 UTC
Minimally, we need to following additional fixes here:
- treat keynav the same way (eg up/down arrow should not change the value either, then)
- don't highlight the buttons on mouseover when !editable
Comment 5 Zeeshan Ali 2012-01-05 01:11:56 UTC
Created attachment 204642 [details] [review]
gtkspinbutton: Ignore keynav when !editable

Don't allow changing of value through keyboard when 'editable' property is
set to 'FALSE.
Comment 6 Zeeshan Ali 2012-01-05 01:12:01 UTC
Created attachment 204643 [details] [review]
gtkspinbutton: Don't hilight buttons when !editable

Don't hilight the buttons on mouse over when 'editable' property is set to
'FALSE.
Comment 7 Zeeshan Ali 2012-01-05 01:13:31 UTC
*** Bug 611825 has been marked as a duplicate of this bug. ***
Comment 8 Matthias Clasen 2012-01-05 01:51:06 UTC
Review of attachment 204643 [details] [review]:

I think we probably only want to check editable on enter, not on leave ? Otherwise, the button might end up stuck in highlight, if you manage to set editable to FALSE while the mouse is hovering over it.
Comment 9 Zeeshan Ali 2012-01-06 02:33:39 UTC
Created attachment 204719 [details] [review]
gtkspinbutton: Don't hilight buttons when !editable

Don't hilight the buttons on mouse over when 'editable' property is set to
'FALSE.
Comment 10 Matthias Clasen 2012-01-06 03:34:37 UTC
Review of attachment 204642 [details] [review]:

Looks ok
Comment 11 Matthias Clasen 2012-01-06 03:37:36 UTC
Review of attachment 204719 [details] [review]:

I think this should actually be done in gtk_spin_button_panel_get_state, the same way we treat the 'at limit' condition for not hilighting.
Sorry for not noticing that earlier
Comment 12 Zeeshan Ali 2012-01-06 03:46:46 UTC
Review of attachment 204642 [details] [review]:

Committed as 43e29f7cbf107e33c1155448e25730be303fdd44.
Comment 13 Zeeshan Ali 2012-01-06 03:52:39 UTC
Created attachment 204722 [details] [review]
gtkspinbutton: Don't hilight buttons when !editable

Don't hilight the buttons on mouse over when 'editable' property is set to
'FALSE.
Comment 14 Matthias Clasen 2012-01-06 14:19:05 UTC
Review of attachment 204722 [details] [review]:

Looks like what I had in mind, thanks.
Comment 15 Zeeshan Ali 2012-01-06 16:36:17 UTC
Attachment 204722 [details] pushed as 1996618 - gtkspinbutton: Don't hilight buttons when !editable