GSimpleAction: Fix to comply with constructor rules

foo_new_*() must be pure wrappers around g_object_new(), otherwise
their functionality is inaccessible to bindings.
This commit is contained in:
Colin Walters
2011-11-30 17:26:59 -05:00
committed by Ryan Lortie
parent 76527e5cd5
commit 41e5ba86a7
2 changed files with 57 additions and 37 deletions

View File

@@ -77,7 +77,8 @@ g_action_default_init (GActionInterface *iface)
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));
/**
@@ -93,7 +94,8 @@ g_action_default_init (GActionInterface *iface)
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));
/**
@@ -111,7 +113,8 @@ g_action_default_init (GActionInterface *iface)
P_("Enabled"),
P_("If the action can be activated"),
TRUE,
G_PARAM_READABLE |
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
/**
@@ -143,7 +146,8 @@ g_action_default_init (GActionInterface *iface)
P_("The state the action is in"),
G_VARIANT_TYPE_ANY,
NULL,
G_PARAM_READABLE |
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
}