Menu file format.

Guðmundur Bjarnason gummi.bj at virgin.net
Thu Jun 15 23:52:43 CEST 2006


On Thursday 15 June 2006 15:13, Olivier Fourdan wrote:
> Guðmundur Bjarnason a écrit :
> > Hello XFCE.
> >
> > I have a situation where I would like to make a generic menu across
> > window managers. I am running KDE, GNOME and XFCE. So far both GNOME and
> > KDE support one file format that I can easily adapt but XFCE has a very
> > different format that would require a substantial adaptation. Is there
> > any moves towards using the same format as them? I would like to narrow
> > the menus down to a very simple structure that uses the .desktop files in
> > /usr/share/applications only and one menu file that defines menu folders.
> > I can't figure out how do do this in XFCE in the first place. I would
> > very much appreciate any helpful comments from someone.
>
> You're confusing menu and launchers. Xfce supports the XDG menu format
> that both KDE and GNOME support thru the Xfce menu (available either
> from the desktop menu or from the panel menu)
>

Ok.
 
So now I have both tried to <include> my menu file that both KDE and GNOME 
happily read or paste it into the xfce4.xml menu file and neither of this 
works. And I can't figure out what modifications i need to do to get it 
working. There was another person after you that sent some links that were 
most informative but I still can't figure it out.

In length:
My .menu file starts somethings like this:

<?xml version = '1.0' encoding = 'UTF-8' ?>
<Menu>  
  <Name>Applications</Name>
  <Directory>Applications.directory</Directory>
  <DefaultDirectoryDirs/>
  <DefaultAppDirs/>
  <MergeDir>/etc/xdg/menus/applications-merged
</MergeDir>
  <MergeDir>$HOME/.config/menus/applications-merged</MergeDir>
  <Menu>
    <Name>Office</Name>
    <Directory>Office.directory</Directory>
    <Menu>
      <Name>More Applications</Name>
      <Directory>kde-more.directory</Directory>
      <Include>
        <And>
          <Category>Office</Category>
          <Not>
            <Category>Preffered</Category>
          </Not>
        </And>
      </Include>
    </Menu>
    <Include>
      <And>
        <Category>Office</Category>
        <Category>Preffered</Category>
      </And>
    </Include>
  </Menu>.................

But the XFCE menu file goes something like this:

<?xml version="1.0" encoding="UTF-8"?>
<xfdesktop-menu>
	<title name="Desktop Menu" icon="xfce4-backdrop"/>
	<separator/>
	<app name="Run Program..." cmd="xfrun4" icon="gnome-fs-executable"/>
	<separator/>
	<app name="Terminal" cmd="xfterm4" icon="gnome-terminal"/>
	<app name="File Manager (xffm)" cmd="xffm" icon="file-manager"/>
	<app name="Web Browser" cmd="mozilla" icon="gnome-globe"/>
	<separator/>
	<menu name="Settings" icon="gnome-settings">
		<app name="Settings Manager" cmd="xfce-setting-show" icon="gnome-settings" 
snotify="true"/>
	</menu>......................

So, the way I understand it now, in order for me to merge my .menu file into 
the XFCE menu system would not be as straightforward as just a merge, but I 
should try to simply code it into the file and see what happens. 

Thanks 
Gummi



More information about the Xfce mailing list