Subject: Re: [X2Go-Dev] Bug#812: x2gogetapps should ignore NoDisplay=true desktop application entries

From: Mihai Moldovan <[email-masked]>
Date: Wed, 11 Mar 2015 21:14:25 +0100

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=true set in the
> file or not.
> [...]
> The attached patch updates the x2gogetapps command to check the file
> to see if NoDisplay=true 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=x2goserver.git;a=commitdiff;h=e617a5baec4b8971606bf37f5cef76c29ccd7423

or downloaded here:

http://code.x2go.org/gitweb?p=x2goserver.git;a=blobdiff_plain;f=x2goserver/bin/x2gogetapps;h=84a5779c317299618b7308a48e07d4bc2e550dc8;hp=43a2fec7d606a834d828def79e49f5a2e74ad899;hb=e617a5baec4b8971606bf37f5cef76c29ccd7423;hpb=bbad5d6593df3e5659f561d2345a99ef571b30d1

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

Mihai