diff options
author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2013-04-05 13:09:02 +0200 |
---|---|---|
committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2013-04-05 13:09:02 +0200 |
commit | 2fba14852ae1fee3213505628ec2f5552a57a865 (patch) | |
tree | 1a5d8c5e96f838dad1e27ad8e3aa7f05ca3ba389 /libindicator | |
parent | ffbb3c1a57823568a8a5af27986624ff19b724b1 (diff) | |
download | libayatana-indicator-2fba14852ae1fee3213505628ec2f5552a57a865.tar.gz libayatana-indicator-2fba14852ae1fee3213505628ec2f5552a57a865.tar.bz2 libayatana-indicator-2fba14852ae1fee3213505628ec2f5552a57a865.zip |
IndicatorDestkopShortcuts: add indicator_desktop_shortcuts_nick_exec_with_context
It allows to pass a GAppLaunchContext to pass platform-data when launching
actions.
Diffstat (limited to 'libindicator')
-rw-r--r-- | libindicator/indicator-desktop-shortcuts.c | 10 | ||||
-rw-r--r-- | libindicator/indicator-desktop-shortcuts.h | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/libindicator/indicator-desktop-shortcuts.c b/libindicator/indicator-desktop-shortcuts.c index 0a4e026..12a9b0c 100644 --- a/libindicator/indicator-desktop-shortcuts.c +++ b/libindicator/indicator-desktop-shortcuts.c @@ -567,7 +567,7 @@ indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids, cons Return value: #TRUE on success or #FALSE on error. */ gboolean -indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gchar * nick) +indicator_desktop_shortcuts_nick_exec_with_context (IndicatorDesktopShortcuts * ids, const gchar * nick, GAppLaunchContext * launch_context) { GError * error = NULL; @@ -654,7 +654,7 @@ indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gc return FALSE; } - gboolean launched = g_app_info_launch(G_APP_INFO(appinfo), NULL, NULL, &error); + gboolean launched = g_app_info_launch(G_APP_INFO(appinfo), NULL, launch_context, &error); if (error != NULL) { g_warning("Unable to launch file from nick '%s': %s", nick, error->message); @@ -668,3 +668,9 @@ indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gc return launched; } + +gboolean +indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gchar * nick) +{ + return indicator_desktop_shortcuts_nick_exec_with_context (ids, nick, NULL); +} diff --git a/libindicator/indicator-desktop-shortcuts.h b/libindicator/indicator-desktop-shortcuts.h index 5ed490e..e67185a 100644 --- a/libindicator/indicator-desktop-shortcuts.h +++ b/libindicator/indicator-desktop-shortcuts.h @@ -66,6 +66,9 @@ IndicatorDesktopShortcuts * indicator_desktop_shortcuts_new (const const gchar ** indicator_desktop_shortcuts_get_nicks (IndicatorDesktopShortcuts * ids); gchar * indicator_desktop_shortcuts_nick_get_name (IndicatorDesktopShortcuts * ids, const gchar * nick); +gboolean indicator_desktop_shortcuts_nick_exec_with_context (IndicatorDesktopShortcuts * ids, + const gchar * nick, + GAppLaunchContext * launch_context); gboolean indicator_desktop_shortcuts_nick_exec (IndicatorDesktopShortcuts * ids, const gchar * nick); |