summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2007-11-20 22:32:01 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2007-11-20 22:32:01 +0000
commitb628c55d867d6146ac4a1aa76f1a17324188e2c0 (patch)
tree2d0d6ccce3d4ceb4089e8e48853bf59f2f3426f5 /eclass
parentAdd reference to bug #199548 to ChangeLog. (diff)
downloadgentoo-2-b628c55d867d6146ac4a1aa76f1a17324188e2c0.tar.gz
gentoo-2-b628c55d867d6146ac4a1aa76f1a17324188e2c0.tar.bz2
gentoo-2-b628c55d867d6146ac4a1aa76f1a17324188e2c0.zip
Added a couple minor fixes for make_desktop_entry to clean it up, per discussion on the gentoo-dev mailing list. This closes bug #181999 and bug #197891. Thanks to Carsten Lohrke <carlo@gentoo.org>, Samuli Suominen <drac@gentoo.org, and Daniel Pielmeier <daniel.pielmeier@googlemail.com>.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/eutils.eclass9
1 files changed, 4 insertions, 5 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 88b9318feb97..16aa18994f75 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.292 2007/10/14 21:55:35 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.293 2007/11/20 22:32:01 wolf31o2 Exp $
# @ECLASS: eutils.eclass
# @MAINTAINER:
@@ -741,7 +741,7 @@ make_desktop_entry() {
local exec=${1}
local name=${2:-${PN}}
- local icon=${3:-${PN}.png}
+ local icon=${3:-${PN}}
local type=${4}
local path=${5}
@@ -875,18 +875,18 @@ make_desktop_entry() {
cat <<-EOF > "${desktop}"
[Desktop Entry]
- Encoding=UTF-8
Version=1.0
Name=${name}
Type=Application
Comment=${DESCRIPTION}
Exec=${exec}
TryExec=${exec%% *}
- Path=${path}
Icon=${icon}
Categories=${type};
EOF
+ [[ ${path} ]] && echo "Path=${path}" >> "${desktop}"
+
(
# wrap the env here so that the 'insinto' call
# doesn't corrupt the env of the caller
@@ -938,7 +938,6 @@ make_session_desktop() {
cat <<-EOF > "${desktop}"
[Desktop Entry]
- Encoding=UTF-8
Name=${title}
Comment=This session logs you into ${title}
Exec=${command}