[gtk/wip/carlosg/input-cleanups: 16/26] gtkspinbutton: Drop grab_notify handler
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/input-cleanups: 16/26] gtkspinbutton: Drop grab_notify handler
- Date: Wed, 24 Jun 2020 18:37:50 +0000 (UTC)
commit 762748028a6d55d8693eb0092eeac5c8e06708dc
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 24 14:12:01 2020 +0200
gtkspinbutton: Drop grab_notify handler
The press gesture on the buttons already has a ::cancel handler,
this is redundant.
gtk/gtkspinbutton.c | 15 ---------------
1 file changed, 15 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index e41d25d990..3da876839c 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]