Menu addition.

Mark McLoughlin markmc at redhat.com
Fri Mar 11 10:48:43 EET 2005


On Fri, 2005-03-11 at 08:41 +0000, Mark McLoughlin wrote:
> Hi,
> 
> On Fri, 2005-03-11 at 09:23 +0100, Josef Spillner wrote:
> > Am Freitag, 11. März 2005 02:35 schrieb Pat Suwalski:
> > > While I know that this whole spec avoids the Windows StartMenu effect,
> > > is there anything that a third-party package can do to add a category to
> > > an existing system?
> > 
> > Sure. Have a look on how the GGZ Gaming Zone project does it.
> > http://cvs.ggzgamingzone.org/cgi-bin/viewcvs.cgi/ggz-client-libs/desktop/
> > Basically, you create a menu file and another one which refers to the first 
> > one and leads to the merge.
> 
> 	That's a very odd way of doing it. Why not just install the following
> in $(sysconfdir)/xdg/menus/applications-merged:
> 
> ---
> <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 0.8//EN"
>  "http://www.freedesktop.org/standards/menu-spec/menu-0.8.dtd">
> 
> <Menu>
>   <Name>Applications</Name>
> 
>   <Menu>
>     <Name>GGZ</Name>
>     <Directory>ggz.directory</Directory>
> 
>     <Include>
>       <Category>X-GGZ</Category>
>     </Include>
> 
>     <Menu>
>       <Name>GGZ Games</Name>
>       <Directory>ggz-games.directory</Directory>
>       <Include>
>         <Category>X-GGZ-Games</Category>
>       </Include>
>     </Menu>
>   </Menu>
> 
> </Menu>
> ---

	Or rather:

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

<Menu>
  <Name>Applications</Name>

  <Menu>
    <Name>Games</Name>

    <Menu>
      <Name>GGZ</Name>
      <Directory>ggz.directory</Directory>

      <Include>
        <Category>X-GGZ</Category>
      </Include>

      <Menu>
        <Name>GGZ Games</Name>
        <Directory>ggz-games.directory</Directory>
        <Include>
          <Category>X-GGZ-Games</Category>
        </Include>
      </Menu>
    </Menu>
  </Menu>

</Menu>

Cheers,
Mark.




More information about the xdg mailing list