[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-linux
Subject:    Re: [kde-linux] Editing the K menu
From:       James Richard Tyrer <tyrerj () acm ! org>
Date:       2005-07-09 5:49:03
Message-ID: 42CF654F.2000602 () acm ! org
[Download RAW message or body]

Marcelo Amorim wrote:
> Thanks! But I still need some help.
> I'd like to create a new category, called "MODELO",
> and inside this I'd like to put my applications,
> developed at my job.

You need to create two files for the menu.

First a file for the directory which needs to go in:

	$KDEDIR/share/desktop-directories

This is quite simple, for example to create the Engineering category:


engineering.directory
------8<------8<------8<------8<------8<------8<------8<------8<------
[Desktop Entry]
Icon=package
Name=Engineering

------8<------8<------8<------8<------8<------8<------8<------8<------

This simply states two things.  The name to appear in the menu 
"Engineering" and the name of the icon to be used in the menu "package". 
  You can add language tagged names in the usual manner if you wish.

Then you need an XML file to add the entry to the menu in:

	/etc/xdg/menus/applications-merged

Again in my example this would be:

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

<Menu>
	<Menu>
		<Name>Engineering</Name>
		<Directory>engineering.directory</Directory>
		<Include>
			<Category>Engineering</Category>
		</Include>
	</Menu>
</Menu>

------8<------8<------8<------8<------8<------8<------8<------8<------

This again has the name of menu entry "Engineering" and it has the of 
the 'directory' file "engineering.directory".  It also has the name of 
the Category which in this case is also "Engineering" but it doesn't 
have to be.  This is the what you put in the 'desktop' files for the 
apps that you want listed in this category:

	Categories=Engineering

According to the standard, if this isn't one of the standard categories, 
it should be prefixed with "X-" (e.g. X-Unusual).

So, if you simply substitute your name, icon, and category into my 
examples, it should work.

If you need to have more than one app category included in your new menu 
division, you can list them on additional lines in the "Include" section.

-- 
JRT
___________________________________________________
This message is from the kde-linux mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde-linux.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic