Gentoo Archives: gentoo-dev

From: Jim Ramsay <lack@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] make_desktop_entry in eutils.eclass
Date: Tue, 30 Jan 2007 21:13:44
Message-Id: 20070130151055.0da83239@sed-192.sedsystems.ca
1 I have a few suggestions for the make_desktop_entry function in
2 eutils.eclass:
3
4 1 - Allow me to pass in a full application path. If you pass in the
5 full path to an executable as the first argument, it comes up with a
6 crazy filename like this:
7
8 /var/tmp/portage/rox-base/mime-editor-0.5/temp//usr/lib/rox/MIME-Editor/AppRun-mime-editor.desktop
9
10 When a more appropriate name would be:
11
12 /var/tmp/portage/rox-base/mime-editor-0.5/temp/AppRun-mime-editor.desktop
13
14 In other words, I propose that this function should probably do
15 'basename' on $exec before using it for the .desktop filename.
16
17 2 - Allow me to explicitly set the name of the .desktop file. This
18 would perhaps solve #1 above as well.
19
20 I propose an optional environment variable an ebuild can set before
21 calling make_desktop_entry, called "DESKTOP_BASENAME", which would be
22 the basename of the file (not including the .desktop suffix) that the
23 function would use (if set) to create the file.
24
25 3 - Allow me to add other important settings like 'NoDisplay',
26 'OnlyShowIn', and/or 'MimeType'.
27
28 I propose an optional environment variable 'DESKTOP_EXTRAS' that the
29 ebuild could set before calling make_desktop_entry. This would be an
30 actual verbatim (newline-delimited) copy of the extra lines to be added
31 to the desktop file, for example:
32
33 DESKTOP_EXTRAS="OnlyShowIn=Yes"
34
35 or
36
37 DESKTOP_EXTRAS="MimeType=text/plain
38 NoDisplay=Yes"
39
40 Any objections? Suggestions? I would be willing to add these myself
41 if no one else is.
42
43 --
44 Jim Ramsay
45 Gentoo/Linux Developer (rox)

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] make_desktop_entry in eutils.eclass Mike Frysinger <vapier@g.o>