Gio.DesktopAppInfo.prototype.launch_action

function launch_action(action_name: String, launch_context: Gio.AppLaunchContext): void {
    // Gjs wrapper for g_desktop_app_info_launch_action()
}
  

Activates the named application action.

You may only call this function on action names that were returned from Gio.DesktopAppInfo.prototype.list_actions.

Note that if the main entry of the desktop file indicates that the application supports startup notification, and launch_context is non-null, then startup notification will be used when activating the action (and as such, invocation of the action on the receiving side must signal the end of startup notification when it is completed). This is the expected behaviour of applications declaring additional actions, as per the desktop file specification.

As with Gio.AppInfo.prototype.launch there is no way to detect failures that occur while using this function.

Since 2.38

action_name

the name of the action as from Gio.DesktopAppInfo.prototype.list_actions

launch_context

a Gio.AppLaunchContext