menu-spec: Excluded items are Unllocated

Waldo Bastian bastian at kde.org
Thu Feb 3 23:48:52 EET 2005


On Friday 10 December 2004 16:50, Mark McLoughlin wrote:
> Hi,
>
> On Wed, 2004-12-08 at 09:40 -0500, Mark McLoughlin wrote:
> > On Wed, 2004-12-08 at 14:55 +0100, Waldo Bastian wrote:
> > > On Wednesday 08 December 2004 14:32, you wrote:
> > > > 	Well, we could say that items which match an <Include> rule are
> > > > "allocated" whether or not they are later excluded by an <Exclude>
> > > > rule. If the goal of <OnlyUnAllocated/> is to catch items that don't
> > > > fit in any other category, then I think that would work fine.
> > >
> > > Hmm... so
> > >
> > > <Include>
> > >  <And><Category>foo</Category><Not><Category>bar</Category></Not></And>
> > > </Include>
> > >
> > > would not allocate the "bar" items and
> > >
> > > <Include>
> > >  <And><Category>foo</Category></And>
> > > </Include>
> > > <Exclude>
> > >  <And><Category>bar</Category></And>
> > > </Exclude>
> > >
> > > would allocate the "bar" items then?
> > >
> > > I guess that would work.
> >
> > 	Right, the idea being that in former example items with Category Bar
> > aren't a good fit for that menu, but in the latter example they are a
> > good fit, but you just don't want them displayed.
> >
> > 	How does the attached patch look? Also changed the <OnlyUnallocated>
> > test to catch this.
>
> 	I've gone ahead and committed that now ...

Ok, I have adjusted the KDE menu to take this change into account but I am 
still left with a failed regression test "m".

The problem is basically that KDE considers menu entries that are allocated to 
a menu that is hidden as allocated, while the test case doesn't consider them 
to be allocated.

So the test-case puts kwrite, kedit and kate in the "Other" menu, while KDE 
puts them in the "Hidden" menu.

I don't think that hiding a menu should influence the allocation.

The next question is, how should the result look like when the menu was 
<Deleted/> instead of hidden. I have added testcase "n" for that for now. I 
think that also in this case kwrite, kedit and kate should not appear in the 
"Other" menu.

I have attached a proposed patch for the test-cases m and n.

Cheers,
Waldo
-- 
bastian at kde.org   |   Free Novell Linux Desktop 9 Evaluation Download
bastian at suse.com  |   http://www.novell.com/products/desktop/eval.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: menu-spec-test.diff
Type: text/x-diff
Size: 1487 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20050203/508d0823/attachment.diff 
-------------- 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/20050203/508d0823/attachment.pgp 


More information about the xdg mailing list