grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] New menu design based on MVC


From: Marco Gerards
Subject: Re: [RFC] New menu design based on MVC
Date: Sun, 28 Jun 2009 10:30:29 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Hi,

Bean <address@hidden> writes:

> The current menu system is a little chaotic, the various components
> are mixed together which make it difficult to maintain and extend.
> Therefore, I propose a new design which seperates model, view and
> controller.
>
> Model. It's the menu items. Currently, menu are added using menuitem
> statement, which is unique to sh script engine. I think it'd be
> advantageous to have a scipt independent way to define menu. Also,
> using configfile to define submenu is not good, as it is
> difficult to implement interaction between parent and child menu, for
> example, auto expand the child menu when parent is selected, or
> implement a hotkey that will jump back to the top menu regardless of
> the current menu level. IMO, the menu should be loaded as a whole.
>
> The menu is tree structure, a natural way to represent it is to use
> xml, for example, we may write it like this:
>
> <menu>
>   <menu title="OS">
>     <menu title="Windows 98" class="win98" fallback="Linux">
>       root (hd0,1)
>       chainloader +1
>     </menu>
>     <menu title="Linux" class="linux" lock>
>       root (hd0,2)
>       linux /vmlinuz
>       initrd /initrd.img
>     </menu>
>   </menu>
>   <menu title="Tools">
>   </menu
> </menu>

Personally, I do not like XML.  So I have a *very* strong opinion
against using this.  The current syntax is closer to most programming
languages.  Shouldn't we focus on getting that into shape?

Perhaps I should actually make that my first priority when I get some
time again to work on GRUB (fixing scripting support, etc).

--
Marco





reply via email to

[Prev in Thread] Current Thread [Next in Thread]