Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • L libxfce4util
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • XfceXfce
  • libxfce4util
  • Merge requests
  • !30

Add 'xfce_get_from_desktop_file' GIO extension

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Simon Steinbeiß requested to merge ochosi/libxfce4util:get-from-desktop-file into master Sep 02, 2022
  • Overview 30
  • Commits 7
  • Pipelines 9
  • Changes 6

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 Sep 03, 2022 by Gaël Bonithon
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: get-from-desktop-file