Hi,

It is several xdg menus in my system:

fvwm-menu-desktop --get-menus desktop
/etc/xdg/menus/xfce-applications.menu /etc/xdg/menus/fvwm-applications.menu 
/etc/xdg/menus/xfce-settings-manager.menu /etc/xdg/menus/e-applications.menu

The fvwm-applications menu provide full support for the additional
categories as defined here:
https://specifications.freedesktop.org/menu-spec/latest/apas02.html

With

fvwm-menu-desktop \
        --menu-type applications \
        --all-menus \
        --enable-mini-icons \
        --theme FVWM_Xdg \
        --size 32 \
        --title FvwmMenu \
        --mini-icon-dir ${FVWM_USERDIR}/icons/fvwm-desktop >
${FVWM_USERDIR}/${MENU_FILE} sed -i -e 's:Module FvwmPerl -l
fvwm-menu-desktop-config.fpl:A $[FVWM_SYSTEMDIR]/scripts/XDG-Menu:'
${FVWM_USERDIR}/${MENU_FILE}

The --all-menus is mandatory to get the wanted additional xdg
categories. Without it, the additional categories of the
fvwm-applications menu are missing because several menus provide the
same submenus with identical names but without the additional
categories. But even with that option, the resulting menu is a little
bit messy because if the fvwm and xfce menus are OK, the 2 others are
duplicated (get 2 times all the main categories in each of them).

If I run

fvwm-menu-desktop \
        --menu-type applications \
        --desktop fvwm \
        --enable-mini-icons \
        --theme FVWM_Xdg \
        --size 32 \
        --title FvwmMenu \
        --mini-icon-dir ${FVWM_USERDIR}/icons/fvwm-desktop >
        ${FVWM_USERDIR}/${MENU_FILE}

fvwm-menu-desktop work as expected: I only get the fvwm applications
menu and get all the needed additional categories, as provided by this
xdg menu (can be found here: https://github.com/domichel/fvwm-xdg-menu)

But in both cases, I get no support of the extended categories as
defined here:
https://specifications.freedesktop.org/menu-spec/latest/ar01s03.html

"Appendix A, Registered Categories enumerates the standard categories.
Categories not in this document must be prefixed by the string "X-"
indicating that they are extensions."

I don't know if that issue comes from fvwm-desktop-menu or from PyXdg
on which it depend.

As example, I have several application desktop files like:
#
cat  /usr/share/applications/lsp-plugins-spectrum-analyzer-x1-lsp.desktop
[Desktop Entry]
Name=spectrum-analyzer-x1
Type=Application
Comment=Linux Studio Plugins Project
Exec=lsp-plugins-spectrum-analyzer-x1
TryExec=lsp-plugins-spectrum-analyzer-x1
Icon=lsp-plugins-spectrum-analyzer-x1
Categories=AudioVideo;Audio;X-LSP_Plugins;

and
# cat /usr/share/desktop-directories/LSP-Plugins.directory
[Desktop Entry]
Type=Directory
Verson=1.0
Name=LSP-Plugins
Icon=lsp

# cat /etc/xdg/menus/applications-merged/LSP-Plugins.menu
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd";>
<Menu>
  <Name>Applications</Name>
  <Menu>
    <Name>LSP Plugins</Name>
    <Directory>LSP-Plugins.directory</Directory>
    <Include>
      <Category>X-LSP_Plugins</Category>
    </Include>
  </Menu>
</Menu>

In /etc/xdg/menus/applications-merged, I have an electronics menu very
similar to the LSP-Plugins menu, and it appear correctly. The only
difference I can see that can trigger X-LSP_Plugins to be ignored is
than Electronics is an additional category when X-LSP_Plugins is an
extension.

Best,
Dominique

-- 

If you have a problem and you are not doing anything to fix it, you are
at the heart of the problem.

Reply via email to