[Mageia-dev] Does Mageia fully follow XDG menu specifications?

Franklin Weng franklin at goodhorse.idv.tw
Wed May 11 10:02:56 CEST 2011


Thanks for your reply.

Please see below.

2011/5/11 Pascal Terjan <pterjan at gmail.com>:
> On Wed, May 11, 2011 at 06:10, Franklin Weng <franklin at goodhorse.idv.tw> wrote:
>> Hi list,
>>
>> Right now I'm customizing my own menu (without menu editor).  I'm
>> implementing our own menu structure, so I followed XDG menu specs to
>> create our own menu.
>>
>> However, I found that the menu layout attributes, like "show_empty",
>> "inline", ... etc., seemed to be ignored.
>>
>> AFAIK, the XDG menu spec implementation should be done by distribution
>> vendors.  If yes, would anyone please tell me if Mageia (or even
>> Mandriva) fully follows the XDG menu spec?  Or, what should I do to
>> make the show_empty, inline work?
>
> On which environment did you test? GNOME? KDE?

KDE.

> The specification is followed by the desktop environment as far as I
> know, but the distro defines some rules (using the menu spec)
>
> inline works and is used in /etc/xdg/menus/applications.menu:
>
>  <Name>Applications</Name>
>  <Layout>
>    <Menuname inline="false">Internet</Menuname>
>    <Menuname inline="false">Office</Menuname>
>    <Menuname inline="false">Graphics</Menuname>
>    <Menuname inline="false">SoundVideo</Menuname>
>    <Menuname inline="false">Tools</Menuname>
>    <Menuname inline="false">Development</Menuname>
>    <Menuname inline="false">Games</Menuname>
>    <Menuname inline="false">Education</Menuname>
>    <Menuname inline="false">Sciences</Menuname>
>    <Menuname inline="false">Documentation</Menuname>
>    <Merge type="menus"/>
>    <Merge type="files"/>
>    <Separator/>
>    <Filename>rpmdrake.desktop</Filename>
>  </Layout>
>  <DefaultLayout inline="true" inline_limit="1">
>    <Merge type="files"/>
>    <Menuname>More</Menuname>
>    <Merge type="menus"/>
>  </DefaultLayout>

My rules are like this:


<Menu>
	<Name>Applications</Name>
	<Directory>ezgo.directory</Directory>
	<KDELegacyDirs/>
	<DefaultAppDirs/>
	<DefaultDirectoryDirs/>
	<DefaultLayout inline="true" inline_limit="1">
		<Merge type="menus"/>
		<Merge type="files"/>
		<Separator/>
		<Menuname>More</Menuname>
	</DefaultLayout>
	<Layout>
		<Menuname inline="false" show_empty="true">Office</Menuname>
		<Menuname inline="false" show_empty="true">Graphics</Menuname>
		<Menuname inline="false" show_empty="true">SoundVideo</Menuname>
		<Menuname inline="false" show_empty="true">Internet</Menuname>
		<Menuname inline="false" show_empty="true">Games</Menuname>
		<Menuname inline="false" show_empty="true">Education</Menuname>
		<Menuname inline="false" show_empty="true">Accessibility</Menuname>
		<Separator/>
		<Menuname inline="false" show_empty="true">System</Menuname>
		<Menuname inline="false" show_empty="true">Development</Menuname>
		<Menuname inline="false" show_empty="true">Settingsmenu</Menuname>
		<Separator/>
	</Layout>
	<Menu>
		<Name>Internet</Name>
		<Directory>ezgo-internet.directory</Directory>
		<Layout>
			<Menuname inline="true" inline_limit="0">Internet-Browser</Menuname>
			<Separator/>
			<Menuname inline="true" inline_limit="0">Internet-IM</Menuname>
			<Separator/>
			<Merge type="menus"/>
			<Merge type="files"/>
		</Layout>
		<Menu>
			<Name>Internet-Browser</Menuname>
			<Include>
				<And>
					<Category>Network</Category>
					<Category>WebBrowser</Category>
					<Not><Category>X-KDE-More</Category></Not>
				</And>
			</Include>
		</Menu>
		<Menu>
			<Name>Internet-IM</Menuname>
			<Include>
				<And>
					<Category>Network</Category>
					<Category>InstantMessaging</Category>
					<Not><Category>X-KDE-More</Category></Not>
				</And>
			</Include>
		</Menu>
	</Menu>

[deleted]
</Menu>

The result is: the show_empty attribute didn't work.  The inline
attribute inside the layout of Internet menu didn't work.

I thought that I've followed the XDG men specs.  Did I write anything wrong?


Thanks for your help!


Franklin


More information about the Mageia-dev mailing list