gtkspinbutton: Drop grab_notify handler

The press gesture on the buttons already has a ::cancel handler,
this is redundant.
This commit is contained in:
Carlos Garnacho 2020-06-24 14:12:01 +02:00
parent f7c5cf137c
commit 762748028a

View File

@ -273,8 +273,6 @@ static void gtk_spin_button_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static void gtk_spin_button_realize (GtkWidget *widget);
static void gtk_spin_button_grab_notify (GtkWidget *widget,
gboolean was_grabbed);
static void gtk_spin_button_state_flags_changed (GtkWidget *widget,
GtkStateFlags previous_state);
static gboolean gtk_spin_button_timer (GtkSpinButton *spin_button);
@ -350,7 +348,6 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
gobject_class->get_property = gtk_spin_button_get_property;
widget_class->realize = gtk_spin_button_realize;
widget_class->grab_notify = gtk_spin_button_grab_notify;
widget_class->state_flags_changed = gtk_spin_button_state_flags_changed;
widget_class->mnemonic_activate = gtk_spin_button_mnemonic_activate;
widget_class->grab_focus = gtk_spin_button_grab_focus;
@ -1190,18 +1187,6 @@ gtk_spin_button_update_width_chars (GtkSpinButton *spin_button)
gtk_editable_set_width_chars (GTK_EDITABLE (spin_button->entry), width_chars);
}
static void
gtk_spin_button_grab_notify (GtkWidget *widget,
gboolean was_grabbed)
{
GtkSpinButton *spin = GTK_SPIN_BUTTON (widget);
GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->grab_notify (widget, was_grabbed);
if (!was_grabbed)
gtk_spin_button_stop_spinning (spin);
}
static void
gtk_spin_button_state_flags_changed (GtkWidget *widget,
GtkStateFlags previous_state)