diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2010-11-19 10:19:32 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2010-11-19 16:29:43 +0100 |
commit | 3431f7a2d7fd63e670dfbc5c25b4a7adf7bb5739 (patch) | |
tree | 8c0d60f40d59149f2389e97db5e119d75686f481 /gtk/gtkradiobutton.c | |
parent | a4d59f7415968e2cd2d6bb0cff97dffaff022f2e (diff) | |
download | gtk+-3431f7a2d7fd63e670dfbc5c25b4a7adf7bb5739.tar.gz |
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
Diffstat (limited to 'gtk/gtkradiobutton.c')
-rw-r--r-- | gtk/gtkradiobutton.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c index e22adf68a7..ff607cea56 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 |