[gtk+] GtkRadioButtons: Mark group arguments as "allow-none"



commit 3431f7a2d7fd63e670dfbc5c25b4a7adf7bb5739
Author: Martin Pitt <martin pitt ubuntu com>
Date:   Fri Nov 19 10:19:32 2010 +0100

    GtkRadioButtons: Mark group arguments as "allow-none"
    
    In the current introspection data, the various gtk_radio_button_new_*
    constructors take an existing group or widget. These all allow passing a NULL
    widget or group list, so that it becomes easy to build a radio button list in a
    loop (pass in None the first time, and the previously created button in all
    other iterations).
    
    Add the missing "allow-none" tag to the introspection data, so that this will
    also eventually work for GIR users. NB that it does not actually work for some
    constructors yet (like new_with_label_from_widget()) due to
    https://bugzilla.gnome.org/show_bug.cgi?id=561264.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=635253

 gtk/gtkradiobutton.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index e22adf6..ff607ce 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -403,7 +403,8 @@ gtk_radio_button_join_group (GtkRadioButton *radio_button,
 
 /**
  * gtk_radio_button_new:
- * @group: an existing radio button group, or %NULL if you are creating a new group.
+ * @group: (allow-none): an existing radio button group, or %NULL if you are
+ *  creating a new group.
  *
  * Creates a new #GtkRadioButton. To be of any practical value, a widget should
  * then be packed into the radio button.
@@ -425,8 +426,8 @@ gtk_radio_button_new (GSList *group)
 
 /**
  * gtk_radio_button_new_with_label:
- * @group: an existing radio button group, or %NULL if you are creating a new
- *  group.
+ * @group: (allow-none): an existing radio button group, or %NULL if you are
+ *  creating a new group.
  * @label: the text label to display next to the radio button.
  *
  * Creates a new #GtkRadioButton with a text label.
@@ -450,7 +451,7 @@ gtk_radio_button_new_with_label (GSList      *group,
 
 /**
  * gtk_radio_button_new_with_mnemonic:
- * @group: the radio button group
+ * @group: (allow-none): the radio button group
  * @label: the text of the button, with an underscore in front of the
  *         mnemonic character
  *
@@ -480,7 +481,7 @@ gtk_radio_button_new_with_mnemonic (GSList      *group,
 
 /**
  * gtk_radio_button_new_from_widget:
- * @radio_group_member: an existing #GtkRadioButton.
+ * @radio_group_member: (allow-none): an existing #GtkRadioButton.
  *
  * Creates a new #GtkRadioButton, adding it to the same group as
  * @radio_group_member. As with gtk_radio_button_new(), a widget
@@ -499,7 +500,7 @@ gtk_radio_button_new_from_widget (GtkRadioButton *radio_group_member)
 
 /**
  * gtk_radio_button_new_with_label_from_widget:
- * @radio_group_member: widget to get radio group from or %NULL
+ * @radio_group_member: (allow-none): widget to get radio group from or %NULL
  * @label: a text string to display next to the radio button.
  *
  * Creates a new #GtkRadioButton with a text label, adding it to



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