forked from AuroraMiddleware/gtk
gtkspinbutton: Respect value of inherited 'editable' property
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. https://bugzilla.gnome.org/show_bug.cgi?id=667229
This commit is contained in:
parent
022c576bd2
commit
3caa370bb5
@ -1348,7 +1348,7 @@ gtk_spin_button_button_press (GtkWidget *widget,
|
||||
gtk_widget_grab_focus (widget);
|
||||
priv->button = event->button;
|
||||
|
||||
if (gtk_editable_get_editable (GTK_EDITABLE (widget)))
|
||||
if (gtk_editable_get_editable (GTK_EDITABLE (widget))) {
|
||||
gtk_spin_button_update (spin);
|
||||
|
||||
if (event->button == 1)
|
||||
@ -1357,6 +1357,8 @@ gtk_spin_button_button_press (GtkWidget *widget,
|
||||
start_spinning (spin, event->window, gtk_adjustment_get_page_increment (priv->adjustment));
|
||||
else
|
||||
priv->click_child = event->window;
|
||||
} else
|
||||
gtk_widget_error_bell (widget);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user