[gtk+/wip/baedert/gtk-widget-destroy: 2/10] window: Add gtk_window_destroy
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gtk-widget-destroy: 2/10] window: Add gtk_window_destroy
- Date: Tue, 26 Sep 2017 13:08:23 +0000 (UTC)
commit 485197d2c7aa2a356988762e3e3a2da402fa1840
Author: Timm Bäder <mail baedert org>
Date: Tue Sep 26 07:53:51 2017 +0200
window: Add gtk_window_destroy
To be used instead of gtk_widget_destroy.
docs/reference/gtk/gtk4-sections.txt | 1 +
gtk/gtkwindow.c | 15 ++++++++++++---
gtk/gtkwindow.h | 3 +++
3 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index c99c4f0..4fb980b 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4821,6 +4821,7 @@ gtk_window_set_has_user_ref_count
gtk_window_set_titlebar
gtk_window_get_titlebar
gtk_window_set_interactive_debugging
+gtk_window_destroy
<SUBSECTION Standard>
GTK_WINDOW
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 4d95aa2..b75b8b8 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -400,7 +400,7 @@ struct _GtkWindowGeometryInfo
static void gtk_window_constructed (GObject *object);
static void gtk_window_dispose (GObject *object);
static void gtk_window_finalize (GObject *object);
-static void gtk_window_destroy (GtkWidget *widget);
+static void gtk_window_real_destroy (GtkWidget *widget);
static void gtk_window_show (GtkWidget *widget);
static void gtk_window_hide (GtkWidget *widget);
static void gtk_window_map (GtkWidget *widget);
@@ -804,7 +804,7 @@ gtk_window_class_init (GtkWindowClass *klass)
gobject_class->set_property = gtk_window_set_property;
gobject_class->get_property = gtk_window_get_property;
- widget_class->destroy = gtk_window_destroy;
+ widget_class->destroy = gtk_window_real_destroy;
widget_class->show = gtk_window_show;
widget_class->hide = gtk_window_hide;
widget_class->map = gtk_window_map;
@@ -5774,7 +5774,7 @@ gtk_window_get_position (GtkWindow *window,
}
static void
-gtk_window_destroy (GtkWidget *widget)
+gtk_window_real_destroy (GtkWidget *widget)
{
GtkWindow *window = GTK_WINDOW (widget);
GtkWindowPrivate *priv = window->priv;
@@ -11421,3 +11421,12 @@ gtk_window_maybe_update_cursor (GtkWindow *window,
break;
}
}
+
+void
+gtk_window_destroy (GtkWindow *window)
+{
+ g_return_if_fail (GTK_IS_WINDOW (window));
+
+ /* TODO: Remove this call to gtk_widget_destroy */
+ gtk_widget_destroy (GTK_WIDGET (window));
+}
diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h
index 0f247e0..9ef5601 100644
--- a/gtk/gtkwindow.h
+++ b/gtk/gtkwindow.h
@@ -444,6 +444,9 @@ gboolean gtk_window_is_maximized (GtkWindow *window);
GDK_AVAILABLE_IN_3_14
void gtk_window_set_interactive_debugging (gboolean enable);
+GDK_AVAILABLE_IN_3_92
+void gtk_window_destroy (GtkWindow *window);
+
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWindow, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWindowGroup, g_object_unref)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]