[gtk/ebassi/childless-stack-page: 238/239] GtkStack: Create stack pages with child
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/childless-stack-page: 238/239] GtkStack: Create stack pages with child
- Date: Wed, 13 Jul 2022 14:03:14 +0000 (UTC)
commit 5b76d0c2265aadc0b107abdd97a8c7a1c6a5b85e
Author: Matthias Clasen <mclasen redhat com>
Date: Fri May 27 17:24:14 2022 -0400
GtkStack: Create stack pages with child
We're requiring stack pages to have a child
at construction time now. Make it so!
gtk/gtkstack.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 7c8d9afd75..e70df2c093 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -1558,13 +1558,11 @@ gtk_stack_add_internal (GtkStack *stack,
g_return_val_if_fail (child != NULL, NULL);
- child_info = g_object_new (GTK_TYPE_STACK_PAGE, NULL);
- child_info->widget = g_object_ref (child);
- child_info->name = g_strdup (name);
- child_info->title = g_strdup (title);
- child_info->icon_name = NULL;
- child_info->needs_attention = FALSE;
- child_info->last_focus = NULL;
+ child_info = g_object_new (GTK_TYPE_STACK_PAGE,
+ "child", child,
+ "name", name,
+ "title", title,
+ NULL);
gtk_stack_add_page (stack, child_info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]