Skip to content

Add 'xfce_get_from_desktop_file' GIO extension

This GIO extension should make it easier to get values for an application from the corresponding desktop file (typically G_KEY_FILE_DESKTOP_KEY_NAME or G_KEY_FILE_DESKTOP_KEY_ICON). At its first try, xfce_get_from_desktop_file will look for $application_name.desktop and then return the respective key. If no such desktop file is found, it will leverage GIO's g_desktop_app_info_search to match a desktop file and then return the values from that.

If no desktop file is found at all, the function returns NULL.

Here's an MR that showcases a use case for this function: xfce4-power-manager!25 Also, the (duplicate) code in xfce4-notifyd can be dropped as soon as 4.18 is released.

Related: apps/xfce4-notifyd!24 (merged), apps/xfce4-notifyd!26 (merged)

Edited by Gaël Bonithon

Merge request reports

Loading