[gtk/matthiasc/for-master: 6/8] inspector: Properly dispose GtkInspectorShortcuts
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 6/8] inspector: Properly dispose GtkInspectorShortcuts
- Date: Sat, 18 Jul 2020 03:19:39 +0000 (UTC)
commit ca784e3e1a5b8d21e3ac5e1121956f4bda54cd82
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 17 23:13:29 2020 -0400
inspector: Properly dispose GtkInspectorShortcuts
gtk/inspector/shortcuts.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/gtk/inspector/shortcuts.c b/gtk/inspector/shortcuts.c
index 4e4fa67855..c5627ff892 100644
--- a/gtk/inspector/shortcuts.c
+++ b/gtk/inspector/shortcuts.c
@@ -141,12 +141,26 @@ gtk_inspector_shortcuts_size_allocate (GtkWidget *widget,
baseline);
}
+static void
+dispose (GObject *object)
+{
+ GtkInspectorShortcuts *shortcuts = GTK_INSPECTOR_SHORTCUTS (object);
+ GtkWidget *child;
+
+ while ((child = gtk_widget_get_first_child (GTK_WIDGET (shortcuts))))
+ gtk_widget_unparent (child);
+
+ G_OBJECT_CLASS (gtk_inspector_shortcuts_parent_class)->dispose (object);
+}
static void
gtk_inspector_shortcuts_class_init (GtkInspectorShortcutsClass *klass)
{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+ object_class->dispose = dispose;
+
widget_class->measure = gtk_inspector_shortcuts_measure;
widget_class->size_allocate = gtk_inspector_shortcuts_size_allocate;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]