Hi, Bean <bean12...@gmail.com> 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 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel