From 03dc54fbc259422813dc790c1d7f39757cb9b7ec Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Fri, 31 May 2013 18:50:09 -0400 Subject: Add ido_action_helper_change_state --- src/idoactionhelper.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/idoactionhelper.c') diff --git a/src/idoactionhelper.c b/src/idoactionhelper.c index fdd9479..f0e300b 100644 --- a/src/idoactionhelper.c +++ b/src/idoactionhelper.c @@ -401,3 +401,28 @@ ido_action_helper_activate (IdoActionHelper *helper) if (helper->actions && helper->action_name) g_action_group_activate_action (helper->actions, helper->action_name, helper->action_target); } + +/** + * ido_action_helper_change_action_state: + * @helper: an #IdoActionHelper + * @state: the proposed new state of the action + * + * Requests changing the state of the action that is associated with + * @helper to @state. + * + * If @state is floating, it is consumed. + */ +void +ido_action_helper_change_action_state (IdoActionHelper *helper, + GVariant *state) +{ + g_return_if_fail (IDO_IS_ACTION_HELPER (helper)); + g_return_if_fail (state != NULL); + + g_variant_ref_sink (state); + + if (helper->actions && helper->action_name) + g_action_group_change_action_state (helper->actions, helper->action_name, state); + + g_variant_unref (state); +} -- cgit v1.2.3