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

Error in menu-spec example



Hi all, 

I'm currently trying to fix desktop-file-utils (and GNOME new gnome-vfs
method) to be compliant with menu-spec 0.8.

I'm almost there but I still having difficulties with test "e" and I'm
not sure this test is complete and the example in menu spec is correct :

-in test "e", all files in legacy_dir/Development have a Categories line
"Qt;KDE;Development", so it doesn't allow you to check if merging legacy
dir is working correctly (because thoses desktop files will go in
"Development" anyway..).
-the "Legacy" add for Categories in the spec is not very clear (at least
for me, I'm not a native english speaker). I had to read the sentence
several times to be sure "Legacy" can only be added when Categories is
already existing in the desktop file (and I'm still not 100% sure of my
understanding). BTW, we don't test for this Legacy category in the test
suite.
-we are missing (I think) a <LegacyDir prefix="foobar"> test (I'm not
sure if it should be merged in test "e" or put in a separate test).
-in the same idea, there is no <KDELegacyDirs> test.
-I tried to apply the example given in the spec for transforming a
legacy dir into a XDG menu file. I got the following result :
 <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
  "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd";>

<Menu>
	<AppDir>/tmp/menutestdir/legacy_applnk</AppDir>
	<DirectoryDir>/tmp/menutestdir/legacy_applnk</DirectoryDir>
	<Include>
		<Filename>Help.desktop</Filename>
		<Filename>Home.desktop</Filename>
		<Filename>Kfind.desktop</Filename>
	</Include>
	<Menu>
		<Name>Development</Name>
		<Include>
			<Filename>Development/gideon.desktop</Filename>
			<Filename>Development/kbabel.desktop</Filename>
			<Filename>Development/quanta.desktop</Filename>
		</Include>
	</Menu>
</Menu>

This would mean all three "Development" desktop file will have
Developement-*.desktop desktop-id, which is not correct.

I think the correct file should be :
 <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
  "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd";>

<Menu>
	<AppDir>/tmp/menutestdir/legacy_applnk</AppDir>
	<DirectoryDir>/tmp/menutestdir/legacy_applnk</DirectoryDir>
	<Include>
		<Filename>Help.desktop</Filename>
		<Filename>Home.desktop</Filename>
		<Filename>Kfind.desktop</Filename>
	</Include>
	<Menu>
		<Name>Development</Name>
		<AppDir>/tmp/menutestdir/legacy_applnk/Development</AppDir>
		<DirectoryDir>/tmp/menutestdir/legacy_applnk/Development</DirectoryDir>
		<Include>
			<Filename>gideon.desktop</Filename>
			<Filename>kbabel.desktop</Filename>
			<Filename>quanta.desktop</Filename>
		</Include>
	</Menu>
</Menu>

So menu spec example should fixed.

Sorry for this long mail, I hope you don't need an aspirin after reading
it (well, I need one to get LegacyDir working properly in
desktop-file-utils :((

-- 
Frederic Crozat <fcrozat mandrakesoft com>
Mandrakesoft



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