summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2011-10-27 19:03:11 +0100
committerEmmanuele Bassi <ebassi@linux.intel.com>2011-10-28 17:10:46 +0100
commita77162ebaf001beb15a7db658c40a538497bdf33 (patch)
tree6ce988eba547b7a771b0c39a4549ce7b281da7ce
parent931a40844b62f46e548bea40c5761f1c462f9001 (diff)
downloadgtk+-a77162ebaf001beb15a7db658c40a538497bdf33.tar.gz
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
-rw-r--r--gtk/gtkradiotoolbutton.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/gtk/gtkradiotoolbutton.c b/gtk/gtkradiotoolbutton.c
index c1db17fc6c..75fbcd2d35 100644
--- a/gtk/gtkradiotoolbutton.c
+++ b/gtk/gtkradiotoolbutton.c
@@ -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.
*