Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MKpmc-0004ly-Pb for mharc-grub-devel@gnu.org; Sun, 28 Jun 2009 04:30:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKpmb-0004lp-Q9 for grub-devel@gnu.org; Sun, 28 Jun 2009 04:30:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKpmW-0004fX-JO for grub-devel@gnu.org; Sun, 28 Jun 2009 04:30:41 -0400 Received: from [199.232.76.173] (port=42821 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKpmW-0004fL-F5 for grub-devel@gnu.org; Sun, 28 Jun 2009 04:30:36 -0400 Received: from smtp-vbr17.xs4all.nl ([194.109.24.37]:1136) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKpmV-0003Ff-Rj for grub-devel@gnu.org; Sun, 28 Jun 2009 04:30:36 -0400 Received: from marco (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr17.xs4all.nl (8.13.8/8.13.8) with ESMTP id n5S8UTWV020249 for ; Sun, 28 Jun 2009 10:30:30 +0200 (CEST) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: Mail-Copies-To: mgerards@xs4all.nl Date: Sun, 28 Jun 2009 10:30:29 +0200 In-Reply-To: (bean123ch@gmail.com's message of "Thu, 25 Jun 2009 12:07:18 +0800") Message-ID: <873a9kahga.fsf@xs4all.nl> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 Subject: Re: [RFC] New menu design based on MVC X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2009 08:30:41 -0000 Hi, Bean 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: > > > > > root (hd0,1) > chainloader +1 > > > root (hd0,2) > linux /vmlinuz > initrd /initrd.img > > > > 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