diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-06-07 21:41:53 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-06-07 21:41:53 +0000 |
commit | c80dc60d449e2cec14da00f90551c5e1ba79fee2 (patch) | |
tree | 8029995615c17ef8db61bb4ae310426cc526e8da /src/idoactionhelper.c | |
parent | b36e57dd3b5f7e79c8fb535ac8428d33e20ca951 (diff) | |
parent | 62ed83ce34cca999d8943fef87660bab223ca907 (diff) | |
download | ayatana-ido-c80dc60d449e2cec14da00f90551c5e1ba79fee2.tar.gz ayatana-ido-c80dc60d449e2cec14da00f90551c5e1ba79fee2.tar.bz2 ayatana-ido-c80dc60d449e2cec14da00f90551c5e1ba79fee2.zip |
Add support for creating scale menu items from a menu model.
Approved by PS Jenkins bot, Ted Gould.
Diffstat (limited to 'src/idoactionhelper.c')
-rw-r--r-- | src/idoactionhelper.c | 25 |
1 files changed, 25 insertions, 0 deletions
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); +} |