[gtk/ebassi/for-master: 7/20] Unrealize the ATContext in StackPage on dispose
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/for-master: 7/20] Unrealize the ATContext in StackPage on dispose
- Date: Thu, 12 Nov 2020 21:46:16 +0000 (UTC)
commit a59889a2746b1e6ff8cdeac585dcd91c9308fb18
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Nov 12 14:49:16 2020 +0000
Unrealize the ATContext in StackPage on dispose
Otherwise we're going to try to unrealize it during the GtkStack
destruction, which will emit warnings.
gtk/gtkstack.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 3d70475ff9..7e92686c1c 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -279,6 +279,17 @@ gtk_stack_page_finalize (GObject *object)
G_OBJECT_CLASS (gtk_stack_page_parent_class)->finalize (object);
}
+static void
+gtk_stack_page_dispose (GObject *object)
+{
+ GtkStackPage *page = GTK_STACK_PAGE (object);
+
+ if (page->at_context != NULL)
+ gtk_at_context_unrealize (page->at_context);
+
+ G_OBJECT_CLASS (gtk_stack_page_parent_class)->dispose (object);
+}
+
static void
gtk_stack_page_get_property (GObject *object,
guint property_id,
@@ -379,6 +390,7 @@ gtk_stack_page_class_init (GtkStackPageClass *class)
GObjectClass *object_class = G_OBJECT_CLASS (class);
object_class->finalize = gtk_stack_page_finalize;
+ object_class->dispose = gtk_stack_page_dispose;
object_class->get_property = gtk_stack_page_get_property;
object_class->set_property = gtk_stack_page_set_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]