Commit 3431f7a2 authored by Martin Pitt's avatar Martin Pitt

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
parent a4d59f74
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment