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=e617a5baec4b8971...
or downloaded here:
http://code.x2go.org/gitweb?p=x2goserver.git;a=blobdiff_plain;f=x2goserver/b...
Can you please test if my patch fixes your problem, too? I'd rather commit this more complete patch to the main branches.
Mihai