[gtk+/wip/matthiasc/kill-event-signals: 72/126] Drop GtkWidget::destroy-event



commit b4c1cb09d8460a8e31b5b7a6860dc0374aba72d8
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 1 16:51:37 2018 -0500

    Drop GtkWidget::destroy-event
    
    This signal is unused in GTK+, and is documented as
    'hard to ever get', so there's no good reason for
    keeping it.

 gtk/gtkwidget.c |   36 +-----------------------------------
 gtk/gtkwidget.h |    3 ---
 2 files changed, 1 insertions(+), 38 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 9c2bf39..eae51de 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -494,7 +494,6 @@ enum {
   BUTTON_RELEASE_EVENT,
   SCROLL_EVENT,
   MOTION_NOTIFY_EVENT,
-  DESTROY_EVENT,
   KEY_PRESS_EVENT,
   KEY_RELEASE_EVENT,
   ENTER_NOTIFY_EVENT,
@@ -1015,7 +1014,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
   klass->button_release_event = gtk_widget_real_button_event;
   klass->motion_notify_event = gtk_widget_real_motion_event;
   klass->touch_event = gtk_widget_real_touch_event;
-  klass->destroy_event = NULL;
   klass->key_press_event = gtk_widget_real_key_press_event;
   klass->key_release_event = gtk_widget_real_key_release_event;
   klass->enter_notify_event = NULL;
@@ -2076,35 +2074,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                               _gtk_marshal_BOOLEAN__OBJECTv);
 
   /**
-   * GtkWidget::destroy-event:
-   * @widget: the object which received the signal.
-   * @event: the event which triggered this signal
-   *
-   * The ::destroy-event signal is emitted when a #GdkWindow is destroyed.
-   * You rarely get this signal, because most widgets disconnect themselves
-   * from their window before they destroy it, so no widget owns the
-   * window at destroy time.
-   *
-   * To receive this signal, the #GdkWindow associated to the widget needs
-   * to enable the #GDK_STRUCTURE_MASK mask. GDK will enable this mask
-   * automatically for all new windows.
-   *
-   * Returns: %TRUE to stop other handlers from being invoked for the event.
-   *   %FALSE to propagate the event further.
-   */
-  widget_signals[DESTROY_EVENT] =
-    g_signal_new (I_("destroy-event"),
-                 G_TYPE_FROM_CLASS (klass),
-                 G_SIGNAL_RUN_LAST,
-                 G_STRUCT_OFFSET (GtkWidgetClass, destroy_event),
-                 _gtk_boolean_handled_accumulator, NULL,
-                 _gtk_marshal_BOOLEAN__OBJECT,
-                 G_TYPE_BOOLEAN, 1,
-                 GDK_TYPE_EVENT);
-  g_signal_set_va_marshaller (widget_signals[DESTROY_EVENT], G_TYPE_FROM_CLASS (klass),
-                              _gtk_marshal_BOOLEAN__OBJECTv);
-
-  /**
    * GtkWidget::key-press-event:
    * @widget: the object which received the signal
    * @event: (type Gdk.EventKey): the #GdkEventKey which triggered this signal.
@@ -6522,6 +6491,7 @@ gtk_widget_emit_event_signals (GtkWidget      *widget,
         case GDK_PAD_GROUP_MODE:
        case GDK_EXPOSE:
        case GDK_DELETE:
+       case GDK_DESTROY:
        case GDK_NOTHING:
          signal_num = -1;
          break;
@@ -6543,10 +6513,6 @@ gtk_widget_emit_event_signals (GtkWidget      *widget,
        case GDK_MOTION_NOTIFY:
          signal_num = MOTION_NOTIFY_EVENT;
          break;
-       case GDK_DESTROY:
-         signal_num = DESTROY_EVENT;
-         _gtk_tooltip_hide (widget);
-         break;
        case GDK_KEY_PRESS:
          signal_num = KEY_PRESS_EVENT;
          break;
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index b943035..44b2ff2 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -204,7 +204,6 @@ struct _GtkWidget
  *   pressed.
  * @motion_notify_event: Signal emitted when the pointer moves over
  *   the widget’s #GdkWindow.
- * @destroy_event: Signal is emitted when a #GdkWindow is destroyed.
  * @key_press_event: Signal emitted when a key is pressed.
  * @key_release_event: Signal is emitted when a key is released.
  * @enter_notify_event: Signal event will be emitted when the pointer
@@ -336,8 +335,6 @@ struct _GtkWidgetClass
                                         GdkEventScroll      *event);
   gboolean (* motion_notify_event)     (GtkWidget           *widget,
                                         GdkEventMotion      *event);
-  gboolean (* destroy_event)           (GtkWidget           *widget,
-                                        GdkEventAny         *event);
   gboolean (* key_press_event)         (GtkWidget           *widget,
                                         GdkEventKey         *event);
   gboolean (* key_release_event)       (GtkWidget           *widget,


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