[gtk/matthiasc/for-master] overlaylayout: Set the child type in the class
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] overlaylayout: Set the child type in the class
- Date: Sat, 16 Jan 2021 03:36:45 +0000 (UTC)
commit 144cf2d0405cde4a3c00069860bdbffec0f01c01
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jan 15 22:35:11 2021 -0500
overlaylayout: Set the child type in the class
We don't need to override create_layout_child here,
and setting the child type has the advantage that
the layout properties are showing up in the inspector.
gtk/gtkoverlaylayout.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
---
diff --git a/gtk/gtkoverlaylayout.c b/gtk/gtkoverlaylayout.c
index 8795f96684..4642ea9675 100644
--- a/gtk/gtkoverlaylayout.c
+++ b/gtk/gtkoverlaylayout.c
@@ -432,25 +432,14 @@ gtk_overlay_layout_allocate (GtkLayoutManager *layout_manager,
}
}
-static GtkLayoutChild *
-gtk_overlay_layout_create_layout_child (GtkLayoutManager *manager,
- GtkWidget *widget,
- GtkWidget *for_child)
-{
- return g_object_new (GTK_TYPE_OVERLAY_LAYOUT_CHILD,
- "layout-manager", manager,
- "child-widget", for_child,
- NULL);
-}
-
static void
gtk_overlay_layout_class_init (GtkOverlayLayoutClass *klass)
{
GtkLayoutManagerClass *layout_class = GTK_LAYOUT_MANAGER_CLASS (klass);
+ layout_class->layout_child_type = GTK_TYPE_OVERLAY_LAYOUT_CHILD;
layout_class->measure = gtk_overlay_layout_measure;
layout_class->allocate = gtk_overlay_layout_allocate;
- layout_class->create_layout_child = gtk_overlay_layout_create_layout_child;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]