Garcon does not correctly detect menu type
Submitted by Michael Perlov
Assigned to Xfce Bug Triage
Description
Hi, according to Desktop Menu Spec, default merge dir for applications menu is always $XDG_CONFIG_DIRS/menus/applications-merged/:
"Note that a system that uses either gnome-applications.menu or kde-applications.menu depending on the desktop environment in use must still use applications-merged as the default merge directory in both cases." https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html#paths
Currently, If $XDG_MENU_PREFIX+"applications.menu" != base menu filename, menu is not considered as application one, thus default merge directory is not used. https://github.com/xfce-mirror/garcon/blob/fbb2d43f48a99d5b8378a0d95f7131ff8f22877b/garcon/garcon-menu-merger.c#L510 https://github.com/xfce-mirror/garcon/blob/fbb2d43f48a99d5b8378a0d95f7131ff8f22877b/garcon/garcon-menu-merger.c#L518
For example, I'm using awesome wm, so XDG_MENU_PREFIX is not set, but I want to use awesome-applications.menu as root menu. Garcon will use "awesome-applications-merged" as default merge directory, which does not exist, so no additional categories will be merged.
Instead, garcon should check if menu file name ends with 'applications.menu' If I understand specs correctly, XDG_MENU_PREFIX is used to find root menu file automatically, not to detect menu type.
Thanks.