GNOME Bugzilla – Bug 667229
gtkspinbutton: Respect value of inherited 'editable' property
Last modified: 2012-01-06 16:36:23 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.
Created attachment 204536 [details] [review] gtkspinbutton: Respect value of inherited 'editable' property
Review of attachment 204536 [details] [review]: Pushed after 'ack' from Benjamin Otte on IRC.
I don't think that is right. See my earlier comments in bug 611825
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
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.
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.
*** Bug 611825 has been marked as a duplicate of this bug. ***
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.
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.
Review of attachment 204642 [details] [review]: Looks ok
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
Review of attachment 204642 [details] [review]: Committed as 43e29f7cbf107e33c1155448e25730be303fdd44.
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.
Review of attachment 204722 [details] [review]: Looks like what I had in mind, thanks.
Attachment 204722 [details] pushed as 1996618 - gtkspinbutton: Don't hilight buttons when !editable