[glib] GSimpleAction: Clarify/fix @parameter(_type) docs
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GSimpleAction: Clarify/fix @parameter(_type) docs
- Date: Mon, 9 Apr 2018 13:08:30 +0000 (UTC)
commit 75021c6c6ea8a5f094ef85ebf32f2f99c71cd173
Author: Daniel Boles <dboles src gnome org>
Date: Sun Apr 8 11:39:32 2018 +0100
GSimpleAction: Clarify/fix @parameter(_type) docs
If something is nullable, it's always helpful to identify what NULL
means. Also, this is not the parameter for the .activate() vfunc, as we
take that over: rather, it is the parameter for the ::activate signal.
https://bugzilla.gnome.org/show_bug.cgi?id=795070
gio/gsimpleaction.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gio/gsimpleaction.c b/gio/gsimpleaction.c
index 54c554087..0560ae6d2 100644
--- a/gio/gsimpleaction.c
+++ b/gio/gsimpleaction.c
@@ -371,7 +371,8 @@ g_simple_action_class_init (GSimpleActionClass *class)
/**
* GSimpleAction::activate:
* @simple: the #GSimpleAction
- * @parameter: (nullable): the parameter to the activation
+ * @parameter: (nullable): the parameter to the activation, or %NULL if it has
+ * no parameter
*
* Indicates that the action was just activated.
*
@@ -591,7 +592,8 @@ g_simple_action_set_state_hint (GSimpleAction *simple,
/**
* g_simple_action_new:
* @name: the name of the action
- * @parameter_type: (nullable): the type of parameter to the activate function
+ * @parameter_type: (nullable): the type of parameter that will be passed to
+ * handlers for the #GSimpleAction::activate signal, or %NULL for no parameter
*
* Creates a new action.
*
@@ -616,7 +618,8 @@ g_simple_action_new (const gchar *name,
/**
* g_simple_action_new_stateful:
* @name: the name of the action
- * @parameter_type: (nullable): the type of the parameter to the activate function
+ * @parameter_type: (nullable): the type of the parameter that will be passed to
+ * handlers for the #GSimpleAction::activate signal, or %NULL for no parameter
* @state: the initial state of the action
*
* Creates a new stateful action.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]