[gtk/window-destroy: 2/16] Drop gtk_widget_destroyed
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/window-destroy: 2/16] Drop gtk_widget_destroyed
- Date: Sat, 9 May 2020 23:52:09 +0000 (UTC)
commit 7d5caeb088ca76c3bbe8e93349ee91226203ad74
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 9 12:09:13 2020 -0400
Drop gtk_widget_destroyed
Use g_object_add_weak_pointer or a weak reference instead.
docs/reference/gtk/gtk4-sections.txt | 1 -
gtk/gtkwidget.c | 25 -------------------------
gtk/gtkwidget.h | 3 ---
3 files changed, 29 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 6a3f16b13a..ab0f2dafb7 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -3957,7 +3957,6 @@ GtkAllocation
gtk_widget_new
gtk_widget_destroy
gtk_widget_in_destruction
-gtk_widget_destroyed
gtk_widget_unparent
gtk_widget_show
gtk_widget_hide
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 15c775aa44..359266d398 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -2635,31 +2635,6 @@ gtk_widget_destroy (GtkWidget *widget)
g_object_run_dispose (G_OBJECT (widget));
}
-/**
- * gtk_widget_destroyed:
- * @widget: a #GtkWidget
- * @widget_pointer: (inout) (transfer none): address of a variable that contains @widget
- *
- * This function sets *@widget_pointer to %NULL if @widget_pointer !=
- * %NULL. It’s intended to be used as a callback connected to the
- * “destroy” signal of a widget. You connect gtk_widget_destroyed()
- * as a signal handler, and pass the address of your widget variable
- * as user data. Then when the widget is destroyed, the variable will
- * be set to %NULL. Useful for example to avoid multiple copies
- * of the same dialog.
- **/
-void
-gtk_widget_destroyed (GtkWidget *widget,
- GtkWidget **widget_pointer)
-{
- /* Don't make any assumptions about the
- * value of widget!
- * Even check widget_pointer.
- */
- if (widget_pointer)
- *widget_pointer = NULL;
-}
-
static void
gtk_widget_update_paintables (GtkWidget *widget)
{
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 7352eded9a..277b327922 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -302,9 +302,6 @@ GtkWidget* gtk_widget_new (GType type,
GDK_AVAILABLE_IN_ALL
void gtk_widget_destroy (GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
-void gtk_widget_destroyed (GtkWidget *widget,
- GtkWidget **widget_pointer);
-GDK_AVAILABLE_IN_ALL
void gtk_widget_unparent (GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
void gtk_widget_show (GtkWidget *widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]