Method

MateDesktopDesktopItemlaunch

Declaration [src]

int
mate_desktop_item_launch (
  const MateDesktopItem* item,
  GList* file_list,
  MateDesktopItemLaunchFlags flags,
  GError** error
)

Description [src]

This function runs the program listed in the specified ‘item’, optionally appending additional arguments to its command line. It uses

g_shell_parse_argv to parse the the exec string into a vector which is

then passed to #g_spawn_async for execution. This can return all the errors from MateURL, #g_shell_parse_argv and #g_spawn_async, in addition to it’s own. The files are only added if the entry defines one of the standard % strings in it’s Exec field.

This method is not directly available to language bindings.

Parameters

file_list

Type: A list of gpointer

Files/URIs to launch this item with, can be NULL.

The data is owned by the caller of the method.
flags

Type: MateDesktopItemLaunchFlags

FIXME.

error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: int

The the pid of the process spawned. If more then one process was spawned the last pid is returned. On error -1 is returned and error is set.