Each desktop entry representing an application is identified by its desktop file ID, which is based on its filename.
To determine the ID of a desktop file, make its full path relative to the $XDG_DATA_DIRS component in which the desktop file is installed, remove the "applications/" prefix, and turn '/' into '-'.
For example /usr/share/applications/foo/bar.desktop has the desktop file ID foo-bar.desktop.
If multiple files have the same desktop file ID, the first one in the $XDG_DATA_DIRS precedence order is used.
Before, desktop entries (not files, but the entries within each file) would be overridden if they had matching Name and Icon fields, and $XDG_DATA_DIRS precedence was disregarded completely. This meant that overriding the Name or Icon fields would be impossible, because it would simply appear as a second entry (not overriding the original one).
This pull request solves #113
The application plugin is now compliant with the Desktop Entry Specification:
Before, desktop entries (not files, but the entries within each file) would be overridden if they had matching
Name
andIcon
fields, and$XDG_DATA_DIRS
precedence was disregarded completely. This meant that overriding theName
orIcon
fields would be impossible, because it would simply appear as a second entry (not overriding the original one).