Menu config file merge menus from standard locations too soon so defaults override merges.

Bug #1191530 reported by Len Ovens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxlauncher (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Merged files from /etc/xdg/menus/applications-merged/ or the user's home directory are supposed to be able to override the default file settings. According to the freedesktop standard the merge files should therefore be read in last. However, the <DefaultMergeDirs/> element is at the top of /etc/xdg/menus/lxlauncher-applications.menu and so the default overrides the merge. The best way to test this is with a layout portion in the merge file. The <DefaultMergeDirs/> should be the last entry before the last </Menu>.

This bug breaks packages that add files to /etc/xdg/menus/applications-merged/ directory like ubuntustudio-menu and menu editors such as alacarte (this is not a full list, just examples) and it breaks the freedesktop standard as well.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: lxlauncher 0.2.2-3ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-19.13-lowlatency 3.8.8
Uname: Linux 3.8.0-19-lowlatency i686
ApportVersion: 2.10.2-0ubuntu1
Architecture: i386
Config_System_Lubuntu_settings.conf:
 [Main]
 BUTTON_SIZE=120
 IMG_SIZE=48
Date: Sun Jun 16 07:46:37 2013
InstallationDate: Installed on 2013-06-04 (12 days ago)
InstallationMedia: Lubuntu 13.10 "Saucy Salamander" - Alpha i386 (20130603)
MarkForUpload: True
SourcePackage: lxlauncher
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Len Ovens (len-ovenwerks) wrote :
Revision history for this message
LStranger (andrej-rep) wrote :

I think you are wrong because <DefaultMergeDirs> is not designed to change menu layout but to add own submenu(s), it's why it should be after common menu definitions but is it before any menu-specific layout items or after them is irrelevant, and if it placed before that makes menu editing more simple as it will not be buried between menu items after some were added by some editor, and it's how it's placed in /etc/xdg/menus/lxlauncher-applications.menu, and also GNOME and XFCE do the same. In any case, menus added by <DefaultMergeDirs> cannot be removed/replaced by menu-specific <Menu> items just because menus are merged on building menu, not replaced, and later all merged menu items are sorted alphabetically. Read XDG specification more closely, please.

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

calling this invalid due to not meeting the specifications.

Changed in lxlauncher (Ubuntu):
status: New → Won't Fix
Revision history for this message
Len Ovens (len-ovenwerks) wrote : Re: [Bug 1191530] Re: Menu config file merge menus from standard locations too soon so defaults override merges.

On Tue, 4 Nov 2014, Walter Lapchynski wrote:

> calling this invalid due to not meeting the specifications.

Which specification are you looking at? Any setting in
/etc/xdg/menus/applications-merged, ~/.config/menus should be able to
override the system menu config.

http://standards.freedesktop.org/menu-spec/latest/ar01s05.html Par.12

"Merged menu elements are kept in order because <Include> and <Exclude>
elements later in the file override <Include> and <Exclude> elements
earlier in the file. This means that if the user's menu file merges the
system menu file, the user can always override what the system menu
specifies by placing elements after the <MergeFile> that incorporates the
system file."

So, the way to test this is, is that a *.menu file in ~/.config/menus/ can
change the layout of the menu. Right now this does not happen. Another sub
menu can be added, but the layout of the main menu can not be changed as
it should be able to be. For example, the user installs a number of apps
that pertain to the user's primary use of their computer. But it ends up
part way doen the menu and they wish to have it at the top. They should be
able to change the layout without editting the system menu file.

ubuntustudio uses a group of sub menus that should be grouped for easy
user reference in the /etc/xdg/menus/applications-merged/ directory. It
groups the 5 submenus for audio, graphics, photography, pubplishing and
video. The stock *menu file does not merge this correctly. That is to the
spec.

priority:

system menu file is default and therefore has the lowest priority.

/etc/xdg/menus/applications-merged/ files are installed by other
applications or meta files. This should have a higher priority that the
system menu file.

~/.config/menus/ is the user's version of things how they would like to
see it. Therefore, it should have the highest priority and be able to
override anything else.

in http://standards.freedesktop.org/menu-spec/latest/ar01s05.html
paragraph 5 the first bulletted item (1) we see that the last item read
is prioritized.

So the <DefaultMergeDirs> must be near the bottom of the system menu file
in order to work to specification. KDE (BTW) has this right and it does
work to specification, nobody else does.

--
Len Ovens
www.ovenwerks.net

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

read above message from the developer.

Revision history for this message
Len Ovens (len-ovenwerks) wrote :

On Tue, 4 Nov 2014, Walter Lapchynski wrote:

> read above message from the developer.

I did, I dissagree, see my post above (which refers to the same documents
he does BTW), I give up. Again KDE does get this right.

xfce, gnome (when it still had a working menu) and lxde do work correctly
when the system menu file is corrected. I still believe this is a long
standing bug that no one has really noticed in most uses, but should be
corrected so that menu editors will work correctly and so that users can
change the look and feel of their personal menu without hacking the system
file. People have just put up with things not working the way they should
because "Won't fix".

--
Len Ovens
www.ovenwerks.net

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

this is certainly outside of the understanding of the upstream developer. if you wish to convince him, i would recommend filing a bug report there, since this is really not an ubuntu issue, but an lxde one. still, it is outside the scope as the developer sees it, so you'd have to convince him:

https://sourceforge.net/p/lxde/bugs

thank you!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.