Gentoo Archives: gentoo-dev

From: Tod M Neidt <tod@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Menu System
Date: Wed, 17 Apr 2002 22:42:18
Message-Id: 1019101288.3695.1250.camel@Q.neidt.net
In Reply to: Re: [gentoo-dev] Menu System by Mario Andres Yepes C
1 On Wed, 2002-04-17 at 17:29, Mario Andres Yepes C wrote:
2 >
3 > I think thats the basic idea... The thing would be that portage should provide
4 > a couple of functions to easy the process of adding an entry to the menu.
5 >
6 > Somethink like
7 >
8 > add_menu(){
9 > mkdir -p ${MENUDIR}
10 > cat >> ${MENUDIR}/${PN} << EOF
11 > ?package(${P}): section="$2" icon="$3" title="$4" longtitle="$5" needs="$1"
12 > command="oo$1" $mimetypes_item
13 > EOF
14 > }
15 >
16 > So in an ebuild you could have...
17 >
18 > add_menu Applications/Games amor.png "A waste of cpu" "Amor, a game" x11
19 >
20 > Of course this is just a quick idea, I think that the function could be better
21 > implemented so the way to call it is more straight forward.
22 >
23
24 Hi!
25
26 My thought on this issue would be the addition of a 'domenu' helper
27 script that could be a one line addition in the src_install function.
28
29 The 'domenu' script would cascade through the desktop USE variables
30 (i.e. gnome, kde, etc , might have to add some for other desktops that
31 don't already have a USE variable.) If the USE variable for a
32 particlular desktop is set then insert a menu item. for example (off
33 the top of my head, so illustrative, not ncessarily working),
34
35 if use gnome; then
36 if [ -e ${FILESDIR}/${PN}.desktop]; then
37 SUBMENU=$( grep Type $

Replies

Subject Author
Re: [gentoo-dev] Menu System Jon Nelson <jnelson@×××××××.net>