View Single Post
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#78
Originally Posted by Kamikaze View Post
Thanks again, Rob1n. But I think I've followed all your steps and still not managed to get the submenu directory to show up within the 'More...' directory. If you can be bothered please could you up your applications.menu, submenus.menu and submenus.directory files so I can see if it's something obvious I done wrong? Cheers
Mine's a little hacked around, but you should get the idea.

Here's the applications.menu file. I had to remove all the default layout stuff otherwise there seems to be no way to order the directories before the applications. If you don't mind them all mixed together then you can leave that alone though:
Code:
<Menu>
  <Name>Main</Name>
  
  <Menu>
    <Name>Applications</Name>
    <Directory>applications.directory</Directory>
    <OnlyUnallocated/>
    <Include>
      <All/>
    </Include>

    <Layout>
      <Menuname>office.directory</Menuname>
    </Layout>

    <MergeFile>submenus/office.menu</MergeFile>
  </Menu>

</Menu>
And the submenus/office.menu file:
Code:
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
 "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">

<Menu>
  <Name>Applications</Name>
  
  <Menu>
    <Name>Office</Name>
    <Directory>office.directory</Directory>
    <Include>
      <Filename>calendar.desktop</Filename>
      <Filename>osso_calculator.desktop</Filename>
      <Filename>osso_pdfviewer.desktop</Filename>
      <Filename>sstg.desktop</Filename>
      <Filename>stg.desktop</Filename>
      <Filename>wtg.desktop</Filename>
    </Include>
  </Menu>
</Menu>
and the office.directory file (I still need to sort out better folder icons):
Code:
[Desktop Entry]
Type=Directory
Name=Office
Icon=general_folder
EDIT: Oh, and I used MergeFile instead of MergeDir to enable me to keep all the submenus in the same directory, but add them into different menus. Either will work though.
 

The Following User Says Thank You to Rob1n For This Useful Post: