From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Nk61Y-0004hX-Pe for garchives@archives.gentoo.org; Wed, 24 Feb 2010 01:26:49 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 679DAE0A7F; Wed, 24 Feb 2010 01:26:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 14C17E0997 for ; Wed, 24 Feb 2010 01:26:24 +0000 (UTC) Received: from [192.168.1.3] (pool-72-86-43-250.clppva.fios.verizon.net [72.86.43.250]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 0E13B67FAE; Wed, 24 Feb 2010 01:26:22 +0000 (UTC) Message-ID: <4B848035.7000703@gentoo.org> Date: Tue, 23 Feb 2010 20:26:13 -0500 From: Jonathan Callen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100215 Thunderbird/3.0.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org CC: base-system@gentoo.org Subject: [gentoo-dev] Changes to make_desktop_entry in eutils.eclass X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigAF690D07CB9817D61650369B" X-Archives-Salt: ebc515d2-b0a9-425d-b7e5-3430b7b9d5ac X-Archives-Hash: 8fe9c58fec4aa847e5de2a995a7d8d37 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigAF690D07CB9817D61650369B Content-Type: multipart/mixed; boundary="------------010300000604050804090405" This is a multi-part message in MIME format. --------------010300000604050804090405 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Attached is a patch to properly comply with the part of the FDO Desktop Menu Specification pertaining to Categories (namely, always ensuring that the list ends in a ";") and the part of the FDO Desktop Entry Specification and Icon Theme Specification pertaining to icons (namely, that non-absolute paths MUST NOT have an extension). --------------010300000604050804090405 Content-Type: text/plain; name="eutils.eclass.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="eutils.eclass.diff" --- eutils.eclass +++ eutils.eclass.new @@ -961,6 +961,7 @@ make_desktop_entry() { news) type=3DNews;; nntp) type=3DNews;; p2p) type=3DFileTransfer;; + voip) type=3DTelephony;; *) type=3D;; esac type=3D"Network;${type}" @@ -991,7 +992,7 @@ make_desktop_entry() { client) type=3DWebBrowser;; *) type=3D;; esac - type=3D"Network" + type=3D"Network;${type}" ;; =20 *) @@ -1007,6 +1008,17 @@ make_desktop_entry() { local desktop=3D"${T}/$(echo ${exec} | sed 's:[[:space:]/:]:_:g')-${des= ktop_name}.desktop" #local desktop=3D${T}/${exec%% *:-${desktop_name}}.desktop =20 + # Don't append another ";" when a valid category value is provided. + [[ -n ${type} && ${type} !=3D *';' ]] && type+=3D";" + + eshopts_push -s extglob + if [[ -n ${icon} && ${icon} !=3D /* && ${icon} =3D=3D *.@(xpm|png|svg) = ]]; then + ewarn "As described in the Icon Theme Specification, icon file extensi= ons are not" + ewarn "allowed in .desktop files if the value is not an absolute path.= " + icon=3D${icon%.@(xpm|png|svg)} + fi + eshopts_pop + cat <<-EOF > "${desktop}" [Desktop Entry] Name=3D${name} @@ -1015,7 +1027,7 @@ make_desktop_entry() { Exec=3D${exec} TryExec=3D${exec%% *} Icon=3D${icon} - Categories=3D${type}; + Categories=3D${type} EOF =20 [[ ${path} ]] && echo "Path=3D${path}" >> "${desktop}" --------------010300000604050804090405-- --------------enigAF690D07CB9817D61650369B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuEgDwACgkQOypDUo0oQOr3aQCguSJ4Z5iNYRDteS9Dad8XuA5q qgcAnR3x92Ua9XVW/01QpZip++e0yFvU =j09H -----END PGP SIGNATURE----- --------------enigAF690D07CB9817D61650369B--