gaction: update property flags to match needs of GSimpleAction
[platform/upstream/glib.git] / gio / gaction.c
index f8b8a2c..15fe23a 100644 (file)
@@ -28,7 +28,7 @@ G_DEFINE_INTERFACE (GAction, g_action, G_TYPE_OBJECT)
 /**
  * SECTION:gaction
  * @title: GAction
- * @short_description: an action
+ * @short_description: An action
  *
  * #GAction represents a single named action.
  *
@@ -70,14 +70,15 @@ g_action_default_init (GActionInterface *iface)
    * The name of the action.  This is mostly meaningful for identifying
    * the action once it has been added to a #GActionGroup.
    *
-   * Since: 2.26
+   * Since: 2.28
    **/
   g_object_interface_install_property (iface,
                                        g_param_spec_string ("name",
                                                             P_("Action Name"),
                                                             P_("The name used to invoke the action"),
                                                             NULL,
-                                                            G_PARAM_READABLE |
+                                                            G_PARAM_READWRITE |
+                                                            G_PARAM_CONSTRUCT_ONLY |
                                                             G_PARAM_STATIC_STRINGS));
 
   /**
@@ -86,14 +87,15 @@ g_action_default_init (GActionInterface *iface)
    * The type of the parameter that must be given when activating the
    * action.
    *
-   * Since: 2.26
+   * Since: 2.28
    **/
   g_object_interface_install_property (iface,
                                        g_param_spec_boxed ("parameter-type",
                                                            P_("Parameter Type"),
                                                            P_("The type of GVariant passed to activate()"),
                                                            G_TYPE_VARIANT_TYPE,
-                                                           G_PARAM_READABLE |
+                                                           G_PARAM_READWRITE |
+                                                           G_PARAM_CONSTRUCT_ONLY |
                                                            G_PARAM_STATIC_STRINGS));
 
   /**
@@ -104,14 +106,15 @@ g_action_default_init (GActionInterface *iface)
    * If the action is disabled then calls to g_action_activate() and
    * g_action_set_state() have no effect.
    *
-   * Since: 2.26
+   * Since: 2.28
    **/
   g_object_interface_install_property (iface,
                                        g_param_spec_boolean ("enabled",
                                                              P_("Enabled"),
                                                              P_("If the action can be activated"),
                                                              TRUE,
-                                                             G_PARAM_READABLE |
+                                                             G_PARAM_CONSTRUCT |
+                                                             G_PARAM_READWRITE |
                                                              G_PARAM_STATIC_STRINGS));
 
   /**
@@ -120,7 +123,7 @@ g_action_default_init (GActionInterface *iface)
    * The #GVariantType of the state that the action has, or %NULL if the
    * action is stateless.
    *
-   * Since: 2.26
+   * Since: 2.28
    **/
   g_object_interface_install_property (iface,
                                        g_param_spec_boxed ("state-type",
@@ -135,7 +138,7 @@ g_action_default_init (GActionInterface *iface)
    *
    * The state of the action, or %NULL if the action is stateless.
    *
-   * Since: 2.26
+   * Since: 2.28
    **/
   g_object_interface_install_property (iface,
                                        g_param_spec_variant ("state",
@@ -164,7 +167,7 @@ g_action_default_init (GActionInterface *iface)
  *
  * If the @value GVariant is floating, it is consumed.
  *
- * Since: 2.26
+ * Since: 2.28
  **/
 void
 g_action_set_state (GAction  *action,
@@ -199,9 +202,9 @@ g_action_set_state (GAction  *action,
  * The return value (if non-%NULL) should be freed with
  * g_variant_unref() when it is no longer required.
  *
- * Returns: (allow-none): the current state of the action
+ * Returns: (transfer full): the current state of the action
  *
- * Since: 2.26
+ * Since: 2.28
  **/
 GVariant *
 g_action_get_state (GAction *action)
@@ -220,7 +223,7 @@ g_action_get_state (GAction *action)
  *
  * Returns: the name of the action
  *
- * Since: 2.26
+ * Since: 2.28
  **/
 const gchar *
 g_action_get_name (GAction *action)
@@ -246,7 +249,7 @@ g_action_get_name (GAction *action)
  *
  * Returns: (allow-none): the parameter type
  *
- * Since: 2.26
+ * Since: 2.28
  **/
 const GVariantType *
 g_action_get_parameter_type (GAction *action)
@@ -276,7 +279,7 @@ g_action_get_parameter_type (GAction *action)
  *
  * Returns: (allow-none): the state type, if the action is stateful
  *
- * Since: 2.26
+ * Since: 2.28
  **/
 const GVariantType *
 g_action_get_state_type (GAction *action)
@@ -310,9 +313,9 @@ g_action_get_state_type (GAction *action)
  * The return value (if non-%NULL) should be freed with
  * g_variant_unref() when it is no longer required.
  *
- * Returns: (allow-none): the state range hint
+ * Returns: (transfer full): the state range hint
  *
- * Since: 2.26
+ * Since: 2.28
  **/
 GVariant *
 g_action_get_state_hint (GAction *action)
@@ -334,7 +337,7 @@ g_action_get_state_hint (GAction *action)
  *
  * Returns: whether the action is enabled
  *
- * Since: 2.26
+ * Since: 2.28
  **/
 gboolean
 g_action_get_enabled (GAction *action)
@@ -356,7 +359,7 @@ g_action_get_enabled (GAction *action)
  * the parameter type given at construction time).  If the parameter
  * type was %NULL then @parameter must also be %NULL.
  *
- * Since: 2.26
+ * Since: 2.28
  **/
 void
 g_action_activate (GAction  *action,