diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-05-09 10:33:02 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-11 12:20:59 -0400 |
commit | 025375ff5f244bbf22b9bd932148dfefc3dce82d (patch) | |
tree | 0516525f4463778f4c7577d63da6cda2af64486c /gtk/gtkfontchooserwidget.c | |
parent | cd0081d08ab9abccc3bddc8b597413d17f2af709 (diff) | |
download | gtk+-025375ff5f244bbf22b9bd932148dfefc3dce82d.tar.gz |
Replace gtk_widget_destroy everywhere
Replace all remaining uses of gtk_widget_destroy
by gtk_container_remove or g_object_unref.
Diffstat (limited to 'gtk/gtkfontchooserwidget.c')
-rw-r--r-- | gtk/gtkfontchooserwidget.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c index 5956b2bbd1..ab0a890671 100644 --- a/gtk/gtkfontchooserwidget.c +++ b/gtk/gtkfontchooserwidget.c @@ -836,11 +836,12 @@ axis_remove (gpointer key, gpointer value, gpointer data) { + GtkFontChooserWidget *fontchooser = data; Axis *a = value; - gtk_widget_destroy (a->label); - gtk_widget_destroy (a->scale); - gtk_widget_destroy (a->spin); + gtk_container_remove (GTK_CONTAINER (fontchooser->axis_grid), a->label); + gtk_container_remove (GTK_CONTAINER (fontchooser->axis_grid), a->scale); + gtk_container_remove (GTK_CONTAINER (fontchooser->axis_grid), a->spin); } static void @@ -1606,7 +1607,7 @@ gtk_font_chooser_widget_update_font_variations (GtkFontChooserWidget *fontchoose if (fontchooser->updating_variations) return FALSE; - g_hash_table_foreach (fontchooser->axes, axis_remove, NULL); + g_hash_table_foreach (fontchooser->axes, axis_remove, fontchooser); g_hash_table_remove_all (fontchooser->axes); if ((fontchooser->level & GTK_FONT_CHOOSER_LEVEL_VARIATIONS) == 0) |