From ionic@ionic.de  Wed Mar 11 21:14:34 2015
Received: (at 812) by bugs.x2go.org; 11 Mar 2015 20:14:36 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID,
	URIBL_BLOCKED autolearn=ham version=3.3.2
Received: from Root24.de (powered.by.root24.eu [5.135.3.88])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id CC4BD3BE7C
	for <812@bugs.x2go.org>; Wed, 11 Mar 2015 21:14:34 +0100 (CET)
Received: from nopileos.local (home.ionic.de [217.92.117.31])
	by mail.ionic.de (Postfix) with ESMTPSA id AF1DF4F088B5;
	Wed, 11 Mar 2015 21:14:32 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ionic.de; s=default;
	t=1426104874; bh=13m/v+mehFIik2hrnh40brYfEydpoVqJcjn5rLvVSCI=;
	h=Date:From:To:Subject:References:In-Reply-To:From;
	b=l2NU7SMuXGXwWeKLheQ1fERh3bnsw5bxtrfEJeGSBjFPSoXoRHAxlbP90Azm/K3IM
	 hlGFNTRvjyIU66U5sHL4OaEBxlaRL69jrdLxWqrkyn35g0NN4e6kMwHsosU4F5UrEN
	 BFzby8R+Loe5lACGPt1sJfFV+Q3eDgGJBj3vdCIU=
Message-ID: <5500A221.7090301@ionic.de>
Date: Wed, 11 Mar 2015 21:14:25 +0100
From: Mihai Moldovan <ionic@ionic.de>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version: 1.0
To: Jason Alavaliant <alavaliant@ra09.com>, 812@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#812: x2gogetapps should ignore NoDisplay=true
 desktop application entries
References: <54FEABB7.5090705@ra09.com>
In-Reply-To: <54FEABB7.5090705@ra09.com>
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature";
 boundary="rEuJobtmsM3gTXBmnXQIi29dpBIoQDc4K"

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--rEuJobtmsM3gTXBmnXQIi29dpBIoQDc4K
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Hi Jason,


On 10.03.2015 09:30 AM, Jason Alavaliant wrote:
> Currently the x2gogetapps command prints out all .desktop application
> files irrespective of if they have the value NoDisplay=3Dtrue set in th=
e
> file or not.
> [...]
> The attached patch updates the x2gogetapps command to check the file
> to see if NoDisplay=3Dtrue is set and if so doesn't print out the
> contents of that file removing all the duplicates and other entries
> not intended to be listed in a normal application launch menu.

Thank you for the patch!


I've reviewed your patch and re-implemented it.

First, there's also a "Hidden" key which indicates that the application
shall be regarded as deleted (and not show up either.) We didn't respect
that either, previously.

Further, there's no need to read the whole file once we stumble upon
Hidden or NoDisplay. We can stop processing there. The same goes when
finding a non-Desktop Entry group after a Desktop Entry group.

The new patch can be seen here:

http://code.x2go.org/gitweb?p=3Dx2goserver.git;a=3Dcommitdiff;h=3De617a5b=
aec4b8971606bf37f5cef76c29ccd7423

or downloaded here:

http://code.x2go.org/gitweb?p=3Dx2goserver.git;a=3Dblobdiff_plain;f=3Dx2g=
oserver/bin/x2gogetapps;h=3D84a5779c317299618b7308a48e07d4bc2e550dc8;hp=3D=
43a2fec7d606a834d828def79e49f5a2e74ad899;hb=3De617a5baec4b8971606bf37f5ce=
f76c29ccd7423;hpb=3Dbbad5d6593df3e5659f561d2345a99ef571b30d1

Can you please test if my patch fixes your problem, too? I'd rather
commit this more complete patch to the main branches.



Mihai




--rEuJobtmsM3gTXBmnXQIi29dpBIoQDc4K
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
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCgAGBQJVAKImAAoJEB/WLtluJTqHwWAP/0JIEoKv9sey0eljr8QNBMdT
JVU3HF5t8fN2erE0gFIt8kWJZqFBW1cAgSGc54hglV9Dg1/rOTzSNtBI/6J69sgz
WqkwV8DpXwJCrZ57KEsOdP9qIEOWs5ZWREcq4BJs3SHAOktwrKkQaIC2ogaSlAml
0MUuYhaWbbfK/DwO7X4J0iKP5UAQPzwo1da45jbj3RoOUe9FBSTtI/YkcjalUaCM
a6X/z1IIZdDc5jQYgtnFhpZUuyPoKh2ZXJnZ/SQKvYvSZe7CwZKqMu3We9UFpHUF
NU9pUsmDe/BzUIIYYOkLAYsYdBdPaR1mGYnGuOa1vBf+Y4mYYF+WSeOjc8bo7Bg/
MPglWpFM25eRmubjMPWlRRZ3iakz9VDDvbTLl+xp09Z0OLZ42zfgOo0mV6xkBrwV
L8kszXAhFdcUgN/JDUk4zsxyS+kpMODsKQVlLSV7GoSRiSYdpxNkxnB2vR34d9r0
88ryBGMn3uyJRn72KpE7W7ijelk+jwA23WvjDETgarpdYaAuogmszScB7prpMhJc
M+ALhDZfo5aYg/auKP7MKKrKCITt5r26H3bz1QYcNed+1UZ8E/uh4BwC3annKQrW
p+zMoQaUONysG4AHeuJjwh8BblzwNW40+un/pdBUshf2fALh3vR3d4YwUd5VEdqo
1hHofGQoUz34Nz8q/akg
=6DgI
-----END PGP SIGNATURE-----

--rEuJobtmsM3gTXBmnXQIi29dpBIoQDc4K--

