Hi! Dne čtvrtek 05 červenec 2007 18:36 Scott Reeves napsal(a):
Jiri Srain <jsrain@suse.cz> 06/18/07 6:38 AM >>>
Dne pondělí 18 červen 2007 11:32 Martin Vidner napsal(a):
These ones, right? http://www.freedesktop.org/wiki/Specifications/menu-spec http://www.freedesktop.org/wiki/Specifications/desktop-entry-spec
This file? http://svn.opensuse.org/svn/yast/branches/SuSE-SLE-10-SP1-Branch/control -ce nter-gnome/etc/YaST-gnome.menu
Yes.
I don't understand yet. For example this file http://svn.opensuse.org/svn/yast/branches/SuSE-SLE-10-SP1-Branch/nfs-cli ent /src/nfs.desktop already has the appropriate Categories. Can you be more specific please?
Yes that file has appropriate Categories= entry and so it worked great with our .menu file. The problem arose from .desktop files like the virtualization ones that did not have that entry and relied solely on the yast specific X-SuSE-YaST-Group key for menu placement. See bug#258600
Changing how the group is being read from the .desktop file of an individual module should be the simple part.
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.
The root problem is that yast2-control-center-gnome uses the .menu spec to generate it's menus while yast2-control-center uses the yast specific method.
To make it more difficult, there are two yast control centers - one for Qt and the other one written in YCP (and thus able to work via NCurses). The both use the same way.
What I am hoping for is to have the .menu spec method be an officially supported way of generating the menus. I agree it's hard to argue against something that is currently working but all the other menus in gnome (traditional menu, application browser, control-center) and the top level menu in KDE use the .menu spec. This allows common shared code between all menus and as mentioned also gives the ability to take advantage of other entries supported by the .menu spec such as OnlyShowIn ... It seems like the vast majority of yast module .desktop files already have the "Categories=" entry in them already.
What I do not like on the YaST-gnome.menu file as it is in SVN is that it contains all possible groups. This cannot work for 3rd party modules. I hope that there is a way to workaround this, but it is not obvious to me (without reading the standard properly). Another problem (apart already mentioned translations handling) is that for YCP we do not have a XML parser which would be able parse the .desktop files. Jiri -- 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