forked from AuroraMiddleware/gtk
radiotoolbutton: Fix the introspection annotations
Everything that deals with a group has to be fixed. Plus, we have NULL checks without allowing NULL arguments; since NULL arguments are perfectly fine, we can relax the argument checks. https://bugzilla.gnome.org/show_bug.cgi?id=662870
This commit is contained in:
parent
931a40844b
commit
a77162ebaf
@ -129,7 +129,8 @@ gtk_radio_tool_button_set_property (GObject *object,
|
||||
|
||||
/**
|
||||
* gtk_radio_tool_button_new:
|
||||
* @group: (allow-none): An existing radio button group, or %NULL if you are creating a new group
|
||||
* @group: (allow-none) (transfer none) (element-type GtkRadioButton): An
|
||||
* existing radio button group, or %NULL if you are creating a new group
|
||||
*
|
||||
* Creates a new #GtkRadioToolButton, adding it to @group.
|
||||
*
|
||||
@ -152,7 +153,8 @@ gtk_radio_tool_button_new (GSList *group)
|
||||
|
||||
/**
|
||||
* gtk_radio_tool_button_new_from_stock:
|
||||
* @group: (allow-none): 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
|
||||
* @stock_id: the name of a stock item
|
||||
*
|
||||
* Creates a new #GtkRadioToolButton, adding it to @group.
|
||||
@ -183,7 +185,7 @@ gtk_radio_tool_button_new_from_stock (GSList *group,
|
||||
|
||||
/**
|
||||
* gtk_radio_tool_button_new_from_widget:
|
||||
* @group: An existing #GtkRadioToolButton
|
||||
* @group: (allow-none): An existing #GtkRadioToolButton, or %NULL
|
||||
*
|
||||
* Creates a new #GtkRadioToolButton adding it to the same group as @gruup
|
||||
*
|
||||
@ -196,9 +198,9 @@ gtk_radio_tool_button_new_from_widget (GtkRadioToolButton *group)
|
||||
{
|
||||
GSList *list = NULL;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_RADIO_TOOL_BUTTON (group), NULL);
|
||||
g_return_val_if_fail (group == NULL || GTK_IS_RADIO_TOOL_BUTTON (group), NULL);
|
||||
|
||||
if (group)
|
||||
if (group != NULL)
|
||||
list = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (group));
|
||||
|
||||
return gtk_radio_tool_button_new (list);
|
||||
@ -206,7 +208,7 @@ gtk_radio_tool_button_new_from_widget (GtkRadioToolButton *group)
|
||||
|
||||
/**
|
||||
* gtk_radio_tool_button_new_with_stock_from_widget:
|
||||
* @group: An existing #GtkRadioToolButton.
|
||||
* @group: (allow-none): An existing #GtkRadioToolButton.
|
||||
* @stock_id: the name of a stock item
|
||||
*
|
||||
* Creates a new #GtkRadioToolButton adding it to the same group as @group.
|
||||
@ -223,9 +225,9 @@ gtk_radio_tool_button_new_with_stock_from_widget (GtkRadioToolButton *group,
|
||||
{
|
||||
GSList *list = NULL;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_RADIO_TOOL_BUTTON (group), NULL);
|
||||
g_return_val_if_fail (group == NULL || GTK_IS_RADIO_TOOL_BUTTON (group), NULL);
|
||||
|
||||
if (group)
|
||||
if (group != NULL)
|
||||
list = gtk_radio_tool_button_get_group (group);
|
||||
|
||||
return gtk_radio_tool_button_new_from_stock (list, stock_id);
|
||||
@ -258,7 +260,7 @@ gtk_radio_tool_button_get_group (GtkRadioToolButton *button)
|
||||
/**
|
||||
* gtk_radio_tool_button_set_group:
|
||||
* @button: a #GtkRadioToolButton
|
||||
* @group: an existing radio button group
|
||||
* @group: (transfer none) (element-type GtkRadioButton): an existing radio button group
|
||||
*
|
||||
* Adds @button to @group, removing it from the group it belonged to before.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user