[gtk/wip/baedert/for-master] stack: Allow NULL names



commit b489a1f6b55c42d1242ab047cc37c5c868de5133
Author: Timm Bäder <mail baedert org>
Date:   Sat Aug 1 15:27:13 2020 +0200

    stack: Allow NULL names
    
    Does this work?

 gtk/gtkstack.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 364def9be5..5517c62220 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -1270,7 +1270,7 @@ stack_child_visibility_notify_cb (GObject    *obj,
  * gtk_stack_add_titled:
  * @stack: a #GtkStack
  * @child: the widget to add
- * @name: the name for @child
+ * @name: (nullable): the name for @child
  * @title: a human-readable title for @child
  *
  * Adds a child to @stack.
@@ -1282,9 +1282,9 @@ stack_child_visibility_notify_cb (GObject    *obj,
  */
 GtkStackPage *
 gtk_stack_add_titled (GtkStack   *stack,
-                     GtkWidget   *child,
-                     const char *name,
-                     const char *title)
+                      GtkWidget  *child,
+                      const char *name,
+                      const char *title)
 {
   g_return_val_if_fail (GTK_IS_STACK (stack), NULL);
   g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
@@ -1296,7 +1296,7 @@ gtk_stack_add_titled (GtkStack   *stack,
  * gtk_stack_add_named:
  * @stack: a #GtkStack
  * @child: the widget to add
- * @name: the name for @child
+ * @name: (nullable): the name for @child or %NULL
  *
  * Adds a child to @stack.
  * The child is identified by the @name.
@@ -1305,8 +1305,8 @@ gtk_stack_add_titled (GtkStack   *stack,
  */
 GtkStackPage *
 gtk_stack_add_named (GtkStack   *stack,
-                    GtkWidget   *child,
-                    const char *name)
+                     GtkWidget  *child,
+                     const char *name)
 {
   g_return_val_if_fail (GTK_IS_STACK (stack), NULL);
   g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);


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