gnome-menus-2.10.1: yet another inclusion / exclusion puzzle.



I have figured out how to exclude menu elements from the Applications
menu. Some things have changed since gnome-menus-2.10.0.

gnome-menus-2.10.0
------------------
* mkdir ~/.config [default location for $XDG_CONFIG_HOME]
* mkdir ~/.config/menus
* mkdir ~/.config/menus/applications-merged

* create the local applications menu file

     ~/.config/menus/applications.menu

which contains:

        <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
         "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd";>
        
        <Menu>
         <Name>Applications</Name>
        
        <MergeFile>/opt/garnome/etc/xdg/menus/applications.menu</MergeFile>
        </Menu>

The MergeFile element says that the contents of the main applications
menu are to be merged with the contents of the local applications menu.

* create an exclusions file
       
	~/.config/menus/applications-merged/exclusions.menu

Below is a sample that excludes three menu elements from the Assessories
submenu.  These elements are part of the GNOME-2.6 installation rooted
under /usr. The .desktop files in GNOME-2.6 & GNOME-2.10.1 conveniently
have somewhat different names, which simplifies the construction of an
exclusions file. [Otherwise, you have to deal with AppDir tags.]

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd";>

<Menu>
  <Name>Applications</Name>
  <Menu>
    <Name>Accessories</Name>
    <Exclude>
      <Filename>gnome-gcalctool.desktop</Filename>
    </Exclude>
    <Exclude>
      <Filename>gnome-gucharmap.desktop</Filename>
    </Exclude>
    <Exclude>
      <Filename>gnome-gedit.desktop</Filename>
    </Exclude>
  </Menu>
</Menu>

gnome-menus-2.10.1
------------------
The gnome-menus-2.10.0 set up described above does *not* work with
gnome-menus-2.10.1. When the Applications menu is selected it flashes
into view briefly and then vanishes, which is really, really annoying.

The fix:
--------
* Merge the contents of exclusions.menu into the local
applications.menu. 

For example:

        <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
         "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd";>
        
        <Menu>
          <Name>Applications</Name>
          <MergeFile>/opt/garnome/etc/xdg/menus/applications.menu</MergeFile>
          <Menu>
            <Name>Accessories</Name>
            <Exclude>
              <Filename>gnome-gcalctool.desktop</Filename>
            </Exclude>
            <Exclude>
              <Filename>gnome-gucharmap.desktop</Filename>
            </Exclude>
            <Exclude>
              <Filename>gnome-gedit.desktop</Filename>
            </Exclude>
          </Menu>
        </Menu>

* delete ~/.config/menus/applications-merged/exclusions.menu

All is well... [:-)]

Questions:
-----------
* So what happened???
* Is there another way to do this is [there must be]?
* A folder named ".hidden" has appeared under the Applications menu.
Where did that come from?


-Joseph

-- 
joseph_sacco [at] comcast [dot] net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]