[gtk] widget: Remove the ::grab-focus signal



commit b0083b33bbd81379dad9f7b3cb07e9871d2ea4c1
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Feb 25 23:27:18 2019 -0500

    widget: Remove the ::grab-focus signal
    
    Nobody is connecting to this signal. And nobody
    should.

 gtk/gtkwidget.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 9f61ec5448..80f8dcc099 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -484,7 +484,6 @@ enum {
   GRAB_NOTIFY,
   CHILD_NOTIFY,
   MNEMONIC_ACTIVATE,
-  GRAB_FOCUS,
   FOCUS,
   MOVE_FOCUS,
   KEYNAV_FAILED,
@@ -1653,19 +1652,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                  G_TYPE_BOOLEAN, 1,
                  G_TYPE_BOOLEAN);
 
-  /**
-   * GtkWidget::grab-focus:
-   * @widget: the object which received the signal.
-   */
-  widget_signals[GRAB_FOCUS] =
-    g_signal_new (I_("grab-focus"),
-                 G_TYPE_FROM_CLASS (gobject_class),
-                 G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
-                 G_STRUCT_OFFSET (GtkWidgetClass, grab_focus),
-                 NULL, NULL,
-                 NULL,
-                 G_TYPE_NONE, 0);
-
   /**
    * GtkWidget::focus:
    * @widget: the object which received the signal.
@@ -5343,7 +5329,7 @@ gtk_widget_grab_focus (GtkWidget *widget)
     return;
 
   g_object_ref (widget);
-  g_signal_emit (widget, widget_signals[GRAB_FOCUS], 0);
+  GTK_WIDGET_GET_CLASS (widget)->grab_focus (widget);
   g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_HAS_FOCUS]);
   g_object_unref (widget);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]