[glade] GladeGtkGrid: fix tests
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] GladeGtkGrid: fix tests
- Date: Sat, 19 Sep 2020 17:33:34 +0000 (UTC)
commit 89bf07f696044729bf299cdb6514fa7655d66a47
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Sat Sep 19 14:30:27 2020 -0300
GladeGtkGrid: fix tests
Fix glade_gtk_grid_add_child() return after adding child to avoid
adding it more than once.
plugins/gtk+/glade-gtk-grid.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/gtk+/glade-gtk-grid.c b/plugins/gtk+/glade-gtk-grid.c
index fc80d758..a940ae6d 100644
--- a/plugins/gtk+/glade-gtk-grid.c
+++ b/plugins/gtk+/glade-gtk-grid.c
@@ -306,12 +306,12 @@ glade_gtk_grid_add_child (GladeWidgetAdaptor *adaptor,
{
gtk_container_remove (GTK_CONTAINER (grid), child_widget);
gtk_grid_attach (grid, GTK_WIDGET (child), x, y, 1, 1);
- break;
+ return;
}
}
}
- else
- gtk_container_add (GTK_CONTAINER (object), GTK_WIDGET (child));
+
+ gtk_container_add (GTK_CONTAINER (object), GTK_WIDGET (child));
glade_gtk_grid_refresh_placeholders (GTK_GRID (object), FALSE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]