[gtk+/wip/matthiasc/kill-event-signals: 54/81] Drop GtkWidget::delete-event



commit f28261c27681227246ec40beb69a9c878c531a23
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 1 15:46:15 2018 -0500

    Drop GtkWidget::delete-event
    
    Nobody is using this signal anymore, and ::delete is there
    for the few places where it is needed.

 gtk/gtkwidget.c |   32 +-------------------------------
 gtk/gtkwidget.h |    4 ----
 2 files changed, 1 insertions(+), 35 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index db7c098..c9cfc35 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -508,7 +508,6 @@ enum {
   BUTTON_RELEASE_EVENT,
   SCROLL_EVENT,
   MOTION_NOTIFY_EVENT,
-  DELETE_EVENT,
   DESTROY_EVENT,
   KEY_PRESS_EVENT,
   KEY_RELEASE_EVENT,
@@ -1027,7 +1026,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->delete_event = NULL;
   klass->destroy_event = NULL;
   klass->key_press_event = gtk_widget_real_key_press_event;
   klass->key_release_event = gtk_widget_real_key_release_event;
@@ -2089,32 +2087,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
                               _gtk_marshal_BOOLEAN__OBJECTv);
 
   /**
-   * GtkWidget::delete-event:
-   * @widget: the object which received the signal
-   * @event: the event which triggered this signal
-   *
-   * The ::delete-event signal is emitted if a user requests that
-   * a toplevel window is closed. The default handler for this signal
-   * destroys the window. Connecting gtk_widget_hide_on_delete() to
-   * this signal will cause the window to be hidden instead, so that
-   * it can later be shown again without reconstructing it.
-   *
-   * Returns: %TRUE to stop other handlers from being invoked for the event.
-   *   %FALSE to propagate the event further.
-   */
-  widget_signals[DELETE_EVENT] =
-    g_signal_new (I_("delete-event"),
-                 G_TYPE_FROM_CLASS (klass),
-                 G_SIGNAL_RUN_LAST,
-                 G_STRUCT_OFFSET (GtkWidgetClass, delete_event),
-                 _gtk_boolean_handled_accumulator, NULL,
-                 _gtk_marshal_BOOLEAN__OBJECT,
-                 G_TYPE_BOOLEAN, 1,
-                 GDK_TYPE_EVENT);
-  g_signal_set_va_marshaller (widget_signals[DELETE_EVENT], G_TYPE_FROM_CLASS (klass),
-                              _gtk_marshal_BOOLEAN__OBJECTv);
-
-  /**
    * GtkWidget::destroy-event:
    * @widget: the object which received the signal.
    * @event: the event which triggered this signal
@@ -6559,6 +6531,7 @@ gtk_widget_emit_event_signals (GtkWidget      *widget,
         case GDK_PAD_STRIP:
         case GDK_PAD_GROUP_MODE:
        case GDK_EXPOSE:
+       case GDK_DELETE:
        case GDK_NOTHING:
          signal_num = -1;
          break;
@@ -6580,9 +6553,6 @@ gtk_widget_emit_event_signals (GtkWidget      *widget,
        case GDK_MOTION_NOTIFY:
          signal_num = MOTION_NOTIFY_EVENT;
          break;
-       case GDK_DELETE:
-         signal_num = DELETE_EVENT;
-         break;
        case GDK_DESTROY:
          signal_num = DESTROY_EVENT;
          _gtk_tooltip_hide (widget);
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index a894013..b943035 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -204,8 +204,6 @@ struct _GtkWidget
  *   pressed.
  * @motion_notify_event: Signal emitted when the pointer moves over
  *   the widget’s #GdkWindow.
- * @delete_event: Signal emitted if a user requests that a toplevel
- *   window is closed.
  * @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.
@@ -338,8 +336,6 @@ struct _GtkWidgetClass
                                         GdkEventScroll      *event);
   gboolean (* motion_notify_event)     (GtkWidget           *widget,
                                         GdkEventMotion      *event);
-  gboolean (* delete_event)            (GtkWidget           *widget,
-                                        GdkEventAny         *event);
   gboolean (* destroy_event)           (GtkWidget           *widget,
                                         GdkEventAny         *event);
   gboolean (* key_press_event)         (GtkWidget           *widget,


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