Dne pondělí 18 červen 2007 11:32 Martin Vidner napsal(a):
Hi Scott,
code sharing is good.
On Fri, Jun 15, 2007 at 03:33:00PM -0600, Scott Reeves wrote:
GNOME uses the freedesktop menu and .desktop spec standards to generate all it's menus - the traditional menu, the application browser and the control center. This method uses a .menu file and the Category= line from .desktop files to determine which menu entry a .desktop file falls into. AFAIK KDE also uses this for it's main top level menu.
These ones, right? http://www.freedesktop.org/wiki/Specifications/menu-spec http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec
As of sp1 we added the yast2 control center which also uses this method. I was not involved in the very start of this so I don't want to speak incorrectly but I think a .menu file was generated that simply contained all the menu categories that currently showed in the qt shell. Then it used the already existing Categories= lines in .desktop files like /usr/share/applications/YaST2/users.desktop
This file? http://svn.opensuse.org/svn/yast/branches/SuSE-SLE-10-SP1-Branch/control-ce nter-gnome/etc/YaST-gnome.menu
Unfortunately, that means there is currently two ways to generate the yast2 menus - the yast2 specific way using the X-SuSE-YaST-Group key and the Category= way. Towards the end of SP1 we ran into some issues with this.
Using the .menu/.desktop specs to generate the menus means we get common code shared between all the menus and we can use the standard gmenu library to parse all the relevant information from the .desktop files including supporting all the other tags such as OnlyShowIn, Hidden, ...
Could we move to supporting the .menu/.desktop spec way of generating menus for the yast shells – given that almost all of the existing .desktop files contain some sort of “Categories=X-SuSE-YaST-*” line it appears something along that lines is already under way.
I don't understand yet. For example this file http://svn.opensuse.org/svn/yast/branches/SuSE-SLE-10-SP1-Branch/nfs-client /src/nfs.desktop already has the appropriate Categories. Can you be more specific please?
To my understanding, the problem is not in the way .desktop files for individual YaST modules are written. IIRC the problems were like missing group icon or similar. YaST for QT and NCurses uses .desktop files for both group and individual module, however, GTK uses .desktop files only for individual modules and for groups it uses .menu files. I quickly checked the spec and must admit that I didn't find where we violate it by using .desktop files even for groups. We already have all the infrastructure (eg. for translations) in place and it is proven to work properly. -- Regards, Jiri Srain YaST Team Leader --------------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: jsrain@suse.cz Lihovarska 1060/12 tel: +420 284 028 959 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz