Skip to content
Commit 6fd5a8cd authored by Allison Karlitskaya's avatar Allison Karlitskaya
Browse files

GDesktopAppInfo: rewrite content type code

Redo the code for type-based selection of applications (all,
recommended, default, fallback) based on the new DesktopFileDir
structures that we introduced last cycle.

At the same time, we expand the functionality to add support for the new
features of the specification:

 - moving ~/.local/share/applications/mimeapps.list to ~/.config/

 - per-desktop default applications (via XDG_CURRENT_DESKTOP)

 - sysadmin customisation of defaults (via /etc/xdg/mimeapps.list)

 - deprecation of the old defaults.list, favouring the use of
   /usr/share/applications/mimeapps.list (or gnome-mimeapps.list) to
   accomplish the same

We modify the mimeapps testcase to check for mimeapps.list having been
created in XDG_CONFIG_HOME instead of XDG_DATA_HOME.

The modification is a net reduction of code (due to less duplication in
bookkeeping).  It is also an increase in performance and reduction in
memory consumption (due to simplified data structures).  Finally, it
removes the stat-based timestamp checking in favour of the
GFileMonitor-based approach that was already being used in the
implementation of DesktopFileDir (in order to know if we had to rescan
the desktop files themselves).

https://bugzilla.gnome.org/show_bug.cgi?id=728040
parent caf0f1df
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment