You have been subscribed to a public bug:

In Ubuntu 8.04, I found it impossible to build a deb package overriding the 
Applications menus.
The attached (incomplete) package adds Game Categories (sub)Menus where games 
declaring to belong to these categories will be included (welcome by those who 
list 200 games!!!). This works.
What is supposed to but doesn't work is disabling in the Games (main) Menu the 
applications that migrate to a Category.

The Freedesktop.org menu-spec specification says this :
http://standards.freedesktop.org/menu-spec/latest/ar01s05.html

> 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.

Ubuntu's menu merging goes like this:
/home/p/.config/menus/applications.menu:
<Menu>
    <Name>Applications</Name>
    <MergeFile type="parent">/etc/xdg/menus/applications.menu</MergeFile>
[end]

/etc/xdg/menus/applications.menu:
<Menu>
  <Name>Applications</Name>
  <Directory>Applications.directory</Directory>

  <!-- Scan legacy dirs first, as later items take priority -->
  <LegacyDir>/etc/X11/applnk</LegacyDir>
  <LegacyDir>/usr/share/gnome/apps</LegacyDir>
  <LegacyDir>/usr/share/control-center-2.0/capplets</LegacyDir>

  <!-- Read standard .directory and .desktop file locations -->
  <DefaultAppDirs/>
  <DefaultDirectoryDirs/>

  <!-- Read in overrides and child menus from applications-merged/ -->
  <DefaultMergeDirs/>
Now defining the menus ...
  <Menu>
    <Name>Accessories</Name>
...

Hence, contrary to what the specification and the above file itself say
("Read in overrides..."), the said overrides can't override much of
anything of a menu : empty or nonexistent legacy directories and non
menu directories.

I have been able to do what I wanted only by updating an
applications.menu file, which is not what I'm allowed to do, even less a
general user, let alone a distribution package.

In fact, according to what is specified and said, the
<DefaultMergeDirs/> should be at the end of the file and if so my
attached deb package would work wonderfully without any risk of
impacting anything (who would code something annihilated by the
following standard system statements).

** Affects: gnome-menus (Ubuntu)
     Importance: Undecided
         Status: New

-- 
impossible to override Application menus
https://bugs.edge.launchpad.net/bugs/297431
You received this bug notification because you are a member of Ubuntu Desktop 
Bugs, which is subscribed to gnome-menus in ubuntu.

-- 
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to