[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xdg
Subject:    Re: menu-spec: Making menu-editing work,
From:       Waldo Bastian <bastian () kde ! org>
Date:       2005-03-31 10:28:42
Message-ID: 200503311228.45939.bastian () kde ! org
[Download RAW message or body]


On Thursday 31 March 2005 11:25, Matt Kynaston wrote:
> On Wed, 30 Mar 2005 14:30:40 +0100, Waldo Bastian <bastian@kde.org> wrote:
> > Hi,
> >
> > I would like to propose the attached change to the menu-spec, the
> > explanation is given below.
>
> This hasn't had much response, so I'll chip in my +1.
>
> It sounds like an excellent idea to me. The spec seems to be missing a
> trick when it says "<Move> is used primarily to fix up legacy
> directories". And the wording about using Moves in menu editing is
> most off-putting - to the point where it seems the most realistic way
> for a menu editor to accomplish a move is to <Deleted> the old menu
> and copy the contents to a new menu. Definitely not ideal.
>
> But I'm coming at this completely from the menu editing side. Am I
> right that they will be the only depth-first processing the menu
> parser needs to do? Will that add much overhead?

A typical recursion looks like:

process_node()
{
   do_breadth_first_stuff();
   for each child node
      process_node();
   do_depth_first_stuff();
}

So if you are lucky you can just move a few lines of code around, and if you 
are unlucky you will have to do a bit of copying and pasting and do the 
recursion twice.

> FWIW, in my current installs (KDE 3.4 and Gnome 2.10) I can only find
> Move being used once - in kde-essential.menu.

Cheers,
Waldo

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic