execute_preferred_application


Description:


[ Version ( since = "4.21.0" ) ]
public bool execute_preferred_application (string category, string parameter, string working_directory, string envp) throws Error

Launches the preferred application for the given category with the parameter in the specified working_directory.

Libxfce4ui currently supports the following categories: %"WebBrowser", %"MailReader", %"FileManager", %"TextEditor", %"TerminalEmulator", %"ImageViewer", %"AudioPlayer", and %"VideoPlayer". If you specify an invalid category here, the execution will fail at a later stage and the user will be presented with an error dialog.

Note that even if this method returns true there's no warranty that the preferred application for category was run successfully, because of the way the helper framework is implemented. But you can be sure that if the execution fails at a later stage, the library will popup an error dialog to inform the user that the execution failed.

Parameters:

category

the category of the preferred application to launch.

parameter

additional parameter to pass to the preferred application (i.e. an URL to pass to the preferred browser) or null to pass no parameter.

working_directory

path to the directory in which to execute the preferred application for category, or null to use the current working directory.

envp

child's environment, or null to inherit parent's.

Returns:

true on success, else false.


Namespace: Xfce
Package: libxfce4ui-2