On Thu, Jun 25, 2009 at 12:07:18PM +0800, Bean wrote: > Hi, > > 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>
Isn't Colin already working on a redesign of the menu? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel