! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Menu not merged with MergeFile type=parent.
Status:
RESOLVED: FIXED

Comments

Description Nick Schermer editbugs 2011-01-23 20:47:01 CET
If you only click the alacarte button in xfce4-panel's menu plugins, alacarte creates the following menu file:

<!DOCTYPE Menu
  PUBLIC '-//freedesktop//DTD Menu 1.0//EN'
  'http://standards.freedesktop.org/menu-spec/menu-1.0.dtd'>
<Menu>
	<Name>Xfce</Name>
	<MergeFile type="parent">/opt/xfce/etc/xdg/menus/xfce-applications.menu</MergeFile>
</Menu>

This file results in an empty menu; removing the type="parent" makes it work again.
Comment 1 Jannis Pohlmann editbugs 2011-01-23 21:48:09 CET
To help with the discussions, this is what the menu specification says about type="parent":

  If the type attribute is set to "parent" and the file that contains this <MergeFile> element is located under one of the paths specified by $XDG_CONFIG_DIRS, the contents of the element should be ignored and the remaining paths specified by $XDG_CONFIG_DIRS are searched for a file with the same relative filename. The first file encountered should be merged. There should be no merging at all if no matching file is found.

It also says:

  Compatibility note: The filename specified inside the <MergeFile> element should be ignored if the type attribute is set to "parent", it should however be expected that implementations based on previous versions of this specification will ignore the type attribute and that such implementations will use the filename inside the <MergeFile> element instead.
Comment 2 Jannis Pohlmann editbugs 2011-01-23 21:50:50 CET
In this case, the panel tries to access ~/.config/menus/xfce-applications.menu. That file is in $XDG_CONFIG_HOME. $XDG_CONFIG_HOME is considered part of $XDG_CONFIG_DIRS conceptually, so the correct behavior would be to ignore the /opt/xfce/... path in the <MergeFile> and check if the first dir in $XDG_CONFIG_DIRS has menus/xfce-applications.menu, then check the second dir etc. The first one to have xfce-applications.menu wins and that file should be merged into the <Menu> element.

It seems like in this case, the panel/garcon is either not doing this or $XDG_CONFIG_DIRS does not contain a path where menus/xfce-applications.menu exists.
Comment 3 Nick Schermer editbugs 2011-01-23 22:34:42 CET
echo $XDG_CONFIG_DIRS => /etc/xdg:/etc/xdg:/opt/xfce/etc/xdg

So no problems there.
Comment 4 Nick Schermer editbugs 2011-06-19 15:13:51 CEST
Found the problem, break was in the wrong position. Fixed in c22e3fe.

Bug #7169

Reported by:
Nick Schermer
Reported on: 2011-01-23
Last modified on: 2011-06-19

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Attachments

Additional information