[gnome-builder/wip/gtk4-port: 156/736] libide/gui: use dispose for cleanup




commit 3dfe136cb844d238a19fae465e22374c442c5ae3
Author: Christian Hergert <chergert redhat com>
Date:   Tue Mar 29 01:39:39 2022 -0700

    libide/gui: use dispose for cleanup

 src/libide/gui/ide-environment-editor-row.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/libide/gui/ide-environment-editor-row.c b/src/libide/gui/ide-environment-editor-row.c
index cdde364b9..12ca5f4a3 100644
--- a/src/libide/gui/ide-environment-editor-row.c
+++ b/src/libide/gui/ide-environment-editor-row.c
@@ -127,9 +127,9 @@ value_entry_activate (GtkWidget               *entry,
 }
 
 static void
-ide_environment_editor_row_destroy (GtkWidget *widget)
+ide_environment_editor_row_dispose (GObject *object)
 {
-  IdeEnvironmentEditorRow *self = (IdeEnvironmentEditorRow *)widget;
+  IdeEnvironmentEditorRow *self = (IdeEnvironmentEditorRow *)object;
 
   if (self->variable != NULL)
     {
@@ -137,7 +137,7 @@ ide_environment_editor_row_destroy (GtkWidget *widget)
       g_clear_object (&self->variable);
     }
 
-  GTK_WIDGET_CLASS (ide_environment_editor_row_parent_class)->destroy (widget);
+  G_OBJECT_CLASS (ide_environment_editor_row_parent_class)->dispose (object);
 }
 
 static void
@@ -184,11 +184,10 @@ ide_environment_editor_row_class_init (IdeEnvironmentEditorRowClass *klass)
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
+  object_class->dispose = ide_environment_editor_row_dispose;
   object_class->get_property = ide_environment_editor_row_get_property;
   object_class->set_property = ide_environment_editor_row_set_property;
 
-  widget_class->destroy = ide_environment_editor_row_destroy;
-
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/libide-gui/ui/ide-environment-editor-row.ui");
   gtk_widget_class_bind_template_child (widget_class, IdeEnvironmentEditorRow, delete_button);
   gtk_widget_class_bind_template_child (widget_class, IdeEnvironmentEditorRow, key_entry);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]