[gtk+/wip/matthiasc/kill-event-signals: 58/58] Drop gtk_widget_hide_on_delete



commit d6b7e1964136764f1d59661f6196a5a1f1204a3b
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 2 21:58:46 2018 -0500

    Drop gtk_widget_hide_on_delete
    
    This function is misnamed - it is only ever relevant for
    windows. And with the ::hide-on-delete property , it is
    no longer necessary to use the signal for this simple case.

 docs/reference/gtk/gtk4-sections.txt |    1 -
 gtk/gtkwidget.c                      |   24 ------------------------
 gtk/gtkwidget.h                      |    4 ----
 3 files changed, 0 insertions(+), 29 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index b258bdd..3b88c0b 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4493,7 +4493,6 @@ gtk_widget_get_toplevel
 gtk_widget_get_ancestor
 gtk_widget_is_ancestor
 gtk_widget_translate_coordinates
-gtk_widget_hide_on_delete
 gtk_widget_set_direction
 GtkTextDirection
 gtk_widget_get_direction
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index bd8f367..9931ea3 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3794,30 +3794,6 @@ gtk_widget_real_hide (GtkWidget *widget)
     }
 }
 
-/**
- * gtk_widget_hide_on_delete:
- * @widget: a #GtkWidget
- *
- * Utility function; intended to be connected to the #GtkWidget::delete-event
- * signal on a #GtkWindow. The function calls gtk_widget_hide() on its
- * argument, then returns %TRUE. If connected to ::delete-event, the
- * result is that clicking the close button for a window (on the
- * window frame, top right corner usually) will hide but not destroy
- * the window. By default, GTK+ destroys windows when ::delete-event
- * is received.
- *
- * Returns: %TRUE
- **/
-gboolean
-gtk_widget_hide_on_delete (GtkWidget *widget)
-{
-  g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
-
-  gtk_widget_hide (widget);
-
-  return TRUE;
-}
-
 static void
 update_cursor_on_state_change (GtkWidget *widget)
 {
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index d995077..150662a 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -811,10 +811,6 @@ GDK_AVAILABLE_IN_3_94
 GtkWidget *  gtk_widget_pick                  (GtkWidget  *widget,
                                                gdouble     x,
                                                gdouble     y);
-/* Hide widget and return TRUE.
- */
-GDK_AVAILABLE_IN_ALL
-gboolean     gtk_widget_hide_on_delete (GtkWidget      *widget);
 
 GDK_AVAILABLE_IN_ALL
 void       gtk_widget_reset_style       (GtkWidget      *widget);


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