[gtk] button: Remove key_controller member
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] button: Remove key_controller member
- Date: Sun, 23 Sep 2018 16:12:59 +0000 (UTC)
commit 248708c282ae5efbf55c45c7841a29d1f4f3c4ea
Author: Timm Bäder <mail baedert org>
Date: Sun Sep 23 17:59:37 2018 +0200
button: Remove key_controller member
Unneeded now.
gtk/gtkbutton.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 0ed50b0b7e..17dd5259df 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -86,7 +86,6 @@ struct _GtkButtonPrivate
GtkActionHelper *action_helper;
GtkGesture *gesture;
- GtkEventController *key_controller;
guint activate_timeout;
@@ -445,6 +444,7 @@ static void
gtk_button_init (GtkButton *button)
{
GtkButtonPrivate *priv = gtk_button_get_instance_private (button);
+ GtkEventController *key_controller;
gtk_widget_set_can_focus (GTK_WIDGET (button), TRUE);
gtk_widget_set_receives_default (GTK_WIDGET (button), TRUE);
@@ -466,10 +466,10 @@ gtk_button_init (GtkButton *button)
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->gesture), GTK_PHASE_CAPTURE);
gtk_widget_add_controller (GTK_WIDGET (button), GTK_EVENT_CONTROLLER (priv->gesture));
- priv->key_controller = gtk_event_controller_key_new ();
- g_signal_connect (priv->key_controller, "key-pressed", G_CALLBACK (key_controller_key_pressed_cb), button);
- g_signal_connect (priv->key_controller, "key-released", G_CALLBACK (key_controller_key_released_cb),
button);
- gtk_widget_add_controller (GTK_WIDGET (button), priv->key_controller);
+ key_controller = gtk_event_controller_key_new ();
+ g_signal_connect (key_controller, "key-pressed", G_CALLBACK (key_controller_key_pressed_cb), button);
+ g_signal_connect (key_controller, "key-released", G_CALLBACK (key_controller_key_released_cb), button);
+ gtk_widget_add_controller (GTK_WIDGET (button), key_controller);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]