NoDisplay interpretation

Waldo Bastian bastian at kde.org
Fri Oct 1 16:09:51 EEST 2004


On Friday 01 October 2004 14:39, you wrote:
> > In KDE we differentiate between "not existing" and "not shown". We use
> > "Hidden=true" for "does not exist" and "NoDisplay=true" for "not shown".
> >
> > For the menu itself this makes no difference, but other applications and
> > e.g. the "Run Command" dialog will be able to start applications that are
> > "not shown" but they will not be able to start applications that do "not
> > exist"
> >
> > Likewise for MIME bindings, it is possible to bind a file type to an
> > application that is "not shown", but it is not possible to bind it to an
> > application that "does not exist".
>
> 	Okay, that makes sense. So, for the purpose of menus, we shouldn't
> immediately discard a .desktop file with NoDisplay=true, but just not
> show it in the menu.

Yes.

> 	A contrived example of when it makes a difference is when you have
> duplicated .desktop files. If the first .desktop file found contains
> NoDisplay=true, but the duplicate .desktop file contains
> NoDisplay=false, you'd expect the entry to not appear in the menu.
>
> 	However, if you consider the same example with Hidden=true, you
> actually *would* expect the entry to appear in the menu since the first
> .desktop file would not preclude the second .desktop file from being
> considered. Right?

It depends on what you mean with "duplicated .desktop files". If they are in 
the same relative location in the hierarchy, (e.g. 
~/.kde/share/applnk/foo.desktop and /usr/share/applnk/foo.desktop) they get 
merged on a key by key basis and then after the merging we look at the 
resulting Hidden and NoDisplay values.

If they are in different locations (e.g. ~/.kde/share/applnk/foo.desktop and 
~/.locale/share/applications/kde/foo.desktop) then we don't merge and if one 
of those has Hidden=true it will get dropped and the other one will get used 
instead.

> 	(Goodness, we haven't made life easy on ourselves :-)
>
> 	What I'm really wondering about, though, is how to interpret
> NoDisplay=true in a .directory file. I think what makes sense is the
> menu isn't shown, but is still part of the menu layout processing
> (whereas a <Menu> with <Deleted> is discarded before we start
> processing).
>
> 	The distinction would only matter with <OnlyUnallocated>, I think. If a
> desktop entry is included <Menu> with NoDisplay=true, then it is
> considered to be allocated but if its included in a <Menu> with
> <Deleted>, then it isn't considered to be allocated.

Yes.

Cheers,
Waldo
-- 
bastian at kde.org  |  Wanted: Talented KDE developer  |  bastian at suse.com
  http://www.suse.de/de/company/suse/jobs/suse_pbu/developer_kde.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20041001/e588cf6b/attachment.pgp 


More information about the xdg mailing list