Problems with NoDisplay and menu editors
Travis Watkins
amaranth at ubuntu.com
Sun May 3 17:45:06 PDT 2009
Currently NoDisplay has three uses:
* install things that shouldn't be shown in the menus but should
handle MIME types
* install things that shouldn't be shown in the menus by default but
users can enable in a menu editor
* to hide things when a user wants to hide them in a menu editor
Only the first use is really correct but the other two exist because
there is currently no better way.
Let's look at the other choices.
<Exclude> seems to be a perfect fit and is certainly easy enough to
use in a menu editor.
However, for an application to use this it has to not only install a
file into the
applications-merged directory it has to know what menu it is going to end up in.
This is rather impossible when a quick edit to /etc/xdg/menus/applications.menu
can change that.
Hidden is a good candidate as it is easy to use in an application and
easy for a menu
editor to add to a .desktop file. However, this two has problems as it
disables MIME
type handling. If a user hides Firefox from their menu and the editor
uses Hidden
Firefox will no longer be opened when you open an HTML file. Along the
same lines
if an application wants to install a .desktop that is hidden by
default but a user can
enable later it won't be able to do MIME type handling until the user
enables it.
Right now it looks pretty hopeless as every solution is broken somehow
but I do see
a couple of possible fixes. The first one would be to make Hidden
items still work
for MIME type handling. This breaks the Hidden=Deleted idea in the
spec but makes
Hidden perfect for this use case. The other solution would be to
invent a new key
in the desktop entry spec that would be used for this purpose.
Any thoughts on this? Personally I'd rather go with the change to the meaning of
Hidden as it makes the most sense to me (Hidden means it is hidden in the menu)
and would still be compatible with the current menu implementations
since they don't
show Hidden items anyway.
--
Travis Watkins
http://www.realistanew.com
More information about the xdg
mailing list