[gnome-todo] theme-selector: Properly dispose child
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] theme-selector: Properly dispose child
- Date: Fri, 5 Nov 2021 18:38:05 +0000 (UTC)
commit 41dbece926dc386a2691a3f244f4d0049e5deee5
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Nov 5 15:37:06 2021 -0300
theme-selector: Properly dispose child
src/gui/gtd-theme-selector.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/gui/gtd-theme-selector.c b/src/gui/gtd-theme-selector.c
index e64b3b8a..e1ce8b08 100644
--- a/src/gui/gtd-theme-selector.c
+++ b/src/gui/gtd-theme-selector.c
@@ -27,6 +27,7 @@ struct _GtdThemeSelector
{
GtkWidget parent;
+ GtkWidget *box;
GtkToggleButton *system;
GtkToggleButton *dark;
GtkToggleButton *light;
@@ -128,6 +129,7 @@ gtd_theme_selector_dispose (GObject *object)
GtdThemeSelector *self = (GtdThemeSelector *)object;
g_clear_pointer (&self->theme, g_free);
+ g_clear_pointer (&self->box, gtk_widget_unparent);
G_OBJECT_CLASS (gtd_theme_selector_parent_class)->dispose (object);
}
@@ -193,6 +195,7 @@ gtd_theme_selector_class_init (GtdThemeSelectorClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/todo/ui/gtd-theme-selector.ui");
+ gtk_widget_class_bind_template_child (widget_class, GtdThemeSelector, box);
gtk_widget_class_bind_template_child (widget_class, GtdThemeSelector, system);
gtk_widget_class_bind_template_child (widget_class, GtdThemeSelector, dark);
gtk_widget_class_bind_template_child (widget_class, GtdThemeSelector, light);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]