aanatoly / fbpanel

lightweight X11 desktop panel
http://aanatoly.github.io/fbpanel/
Other
56 stars 27 forks source link

no-double-entries in menu #33

Open capt-d opened 7 years ago

capt-d commented 7 years ago

User's *.desktop entries are overwriting system's ones. It is based on files' names for specified category. Patch in attachment.

JDM1492 commented 7 years ago

http://standards.freedesktop.org/menu-spec/menu-spec-latest.html says: "When two desktop entries have the same name, the one appearing earlier in the path is used."

The spec is referring to the "Name" key in the file, not the file name. Currently, duplicates are the result of not scanning user directories first and not rejecting additional occurrences of names.

This change does not correctly comply with the freedesktop.org spec since it uses file names. Menu editors which generate local .desktop files with names differing from the system ones will stop working.