From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19318 invoked by uid 1002); 30 May 2003 15:09:39 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 29708 invoked from network); 30 May 2003 15:09:39 -0000 Date: Fri, 30 May 2003 17:09:36 +0200 From: Spider To: gentoo-dev Message-Id: <20030530170936.782fa567.spider@gentoo.org> Organization: Chaotic X-Mailer: Sylpheed version 0.9.0 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="=.dScRPq6mO''gl:" Subject: Re: Fw: [gentoo-dev] [PROPOSAL] Menu system for all gentoo wm's. X-Archives-Salt: 0e29a793-586e-4c72-991d-5be85478f899 X-Archives-Hash: 0d59a6510fa9c095d9400c52dec4e25c --=.dScRPq6mO''gl: Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit hi folks, this came as a reply when I bounced the initial mail to a friend of mine whom I have been discussing implementation and so on with (quite a while before any discussion on the list) //Spider begin forwarded message: Date: Fri, 30 May 2003 17:02:25 +0200 From: redhog To: Spider Subject: Re: Fw: [gentoo-dev] [PROPOSAL] Menu system for all gentoo wm's. Kan du fwd:a mitt svar kanske? ----- Hi! First of all both Debian and Mdk does have such systems. But they are different, with different file-formats. In addition, http://www.freedesktop.org/standards/desktop-entry-spec/desktop-entry-spec.html specifies a third format, which is used by GNOME and KDE at the moment. The system in Debian is quite broken, and the implementation (the hack to convert from their format to the ones of the different window-managers) even more so. Esepecially when it comes to translating and transforming the menu. We at TakeIT/Jamtlinux are currently using Debian (don't hate us for that folks!) for a system for high-schools, and thus translation into our native language, aswell as "dumbing-down" the menu (moving all but the most frequently used apps to a special sub-menu), is very important for our application. As the current Debian hack is so broken, I decided to hack a new implementation of it, in Python. I succeeded with a minimal version (supporting the same input format and output to the GNOME/KDE format) of this in just an eavening (the old hack was written in C, and thus much clumsier than mine), and continued with support for different input sources, like the one specified by freedesktop.org. The program reads a set of menu-sources (files or directory structures) of different formats using input-modules, stores all tanslations find in the input-files and combines them with ones provided in special translation/language-packs, filters the entries using simple python-expressions, transforms them (for example their paths down through the menu-tree) using other such expressions, combines all the entries to a tree, translates them using the stored translations, and finally exports them to one or more destination files/directory structures using output-modules for the different fomats. This hack is totally independent of the Debian distribution as such (it depends only on the Python language), and I wouldn't mind if you included it in your distribution and/or added some more input our output modules. /Egil >Hello Folks! >I have recently been thinking on implementing the menu system for >gentoo, something like what we have in mandrake (I guess it came from >debian). At the moment when a user installs a new app he needs to >figure out what is the name of the binary he needs and then add it to >the menu of his window manager(s). This is done automatically only if >you're installing an app for your desktop (i.e. gnome apps on gnome, >kde apps on kde). The whole idea is make thins process automatic - the >user installs a programm foo, log out back in and sees the menu entry >in all window managers. > >Here is my suggestion on who it should work. >On the system we have a central location for the menu, say /etc/menu.d/ >Here all subfolders represent categories and files - menu entries >respectively. The file contains three entries, something like this: > >Name=MyApp >Command=/usr/bin/myapp >Icon=icon.png > >These entries are created when a pckage is merged by a special domenu >command in a ebuild. E.g. domenu Editors, GVim, gvim >In addition to the categories folder the menu.d/ would contain a folder >"rules", which has the ebuild style files describing how the menus for >each installed wm/de should be generated. It would look like this: > >init_menu() { >#Do all nessecary init. here. Eg. touch the menu file. >} > >start_menu() { >#Wright whatever should be in heading of the menu. >#Especially important for one file menus file fluxbox. >} > >write_entry() { >#Ovious. Here we have ${Cat} ${Name} ${Com} vars defined and set. >} > >end_menu() { >#whatever should be done to finish the menu. >} > >Now the most important step: genrating users menu. First of all a user >should have a choice of whether to use this system or not. If the user >likes it he should add a call to syncmenu (a bash scipt) to the >.bash_profile or whatever file. > >When the syncmenu starts it first of all syncronises the ~/.menu with >/etc/menu.d (It will basically sync everything except the files that >have Custom tag - means edited by user and don't touch). Then this file >sources the files in the /etc/menu.d/rules and calls the functions in >the order: init, start, write (for every entry), end. > >I guess the system is quite flexible and allows to support any wm, >irrespectively of the menu style it uses. However, before starting >woking on it I just wanted to get some feedback on the idea. > >Ok, waiting for your criticism ;) > >-- >Sergey Kuleshov >Let the Force be with us! > > >-- >gentoo-dev@gentoo.org mailing list > > > -- begin .signature This is a .signature virus! Please copy me into your .signature! See Microsoft KB Article Q265230 for more information. end --=.dScRPq6mO''gl: Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE+13QxZS9CZTi033kRArdMAKCdF76Q6XahYWkrqr99H8q/b2mXiQCfU9pU p3YveJZW7vB/x4sCCA8lFXw= =Yw6H -----END PGP SIGNATURE----- --=.dScRPq6mO''gl:--