Constructor

GioDesktopAppInfonew

Declaration [src]

GDesktopAppInfo*
g_desktop_app_info_new (
  const char* desktop_id
)

Description [src]

Creates a new GDesktopAppInfo based on a desktop file ID.

A desktop file ID is the basename of the desktop file, including the .desktop extension. GIO is looking for a desktop file with this name in the applications subdirectories of the XDG data directories (i.e. the directories specified in the XDG_DATA_HOME and XDG_DATA_DIRS environment variables). GIO also supports the prefix-to-subdirectory mapping that is described in the Menu Spec (i.e. a desktop ID of kde-foo.desktop will match /usr/share/applications/kde/foo.desktop).

Parameters

desktop_id

Type: const char*

The desktop file ID.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: GDesktopAppInfo

A new GDesktopAppInfo, or NULL if no desktop file with that ID exists.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.