Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore Hidden=true .desktop files #52

Closed
jriddell opened this issue Aug 17, 2017 · 4 comments
Closed

Ignore Hidden=true .desktop files #52

jriddell opened this issue Aug 17, 2017 · 4 comments

Comments

@jriddell
Copy link

appstream-generator ignores NoDisplay=true files but it should probably also ignore Hidden=true files which hides it from application menus. If it's not in an app menu it's unlikely to be interesting to software managers.

e.g. https://cgit.kde.org/kaddressbook.git/tree/src/data/kaddressbook-importer.desktop?id=4577f0e7e2ab374b592b39a770ed5d5456821a20

@jriddell
Copy link
Author

actually I've the keys the wrong way round. Hidden=true 'means the user deleted (at his level) something that was present' so it should definately make things ignored

@ximion
Copy link
Owner

ximion commented Aug 17, 2017

Woah, this is a fun bit of the spec (possibly also interesting for @hughsie):

NoDisplay

NoDisplay means "this application exists, but don't display it in the menus". This can be useful to e.g. associate this application with MIME types, so that it gets launched from a file manager (or other apps), without having a menu entry for it (there are tons of good reasons for this, including e.g. the netscape -remote, or kfmclient openURL kind of stuff).

Hidden

Hidden should have been called Deleted. It means the user deleted (at his level) something that was present (at an upper level, e.g. in the system dirs). It's strictly equivalent to the .desktop file not existing at all, as far as that user is concerned. This can also be used to "uninstall" existing files (e.g. due to a renaming) - by letting make install install a file with Hidden=true in it.

Urgh... Awful! At least there is a semantic difference. So, from what I see, yes, asgen should recognize Hidden to hide stuff, but also KAddressBook should really not use the Hidden key at all, since that basically voids the desktop-entry file entirely, and also seems to be primarily directed at the user overriding things, and not the project setting a default. Instead, it should be using NoDisplay.

In any case, I'll change asgen to also recognize the Hidden key for now.

@jriddell
Copy link
Author

Yes indeed I've poked the kaddressbook people to fix it.

@ximion
Copy link
Owner

ximion commented Aug 17, 2017

Yes indeed I've poked the kaddressbook people to fix it.

Whoops, I just resolved this directly, since it actually was a real bug (no mimetype association with the app).

@ximion ximion closed this as completed in f325662 Sep 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants