NoDisplay interpretation

Mark McLoughlin markmc at redhat.com
Fri Oct 1 15:39:43 EEST 2004


Hi Waldo,

On Fri, 2004-09-10 at 10:47, Waldo Bastian wrote:
> On Sunday 29 August 2004 15:56, Mark McLoughlin wrote:
> > Hi,
> > 	I've just added a test to menu-spec which interprets NoDisplay=true as
> > follows:
> >
> >   - in a .desktop file, it makes that entry basically not exist
> >
> >   - in a .directory file its the same behaviour as a <Deleted> in the
> >     <Menu> node
> >
> > 	Shout if its being interpreted differently somewhere else.
> 
> 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. 

	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?

	(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.

Cheers,
Mark.




More information about the xdg mailing list