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: Bean
Subject: Re: [RFC] New menu design based on MVC
Date: Thu, 25 Jun 2009 23:54:42 +0800

On Thu, Jun 25, 2009 at 10:25 PM, Robert Millan<address@hidden> wrote:
> On Thu, Jun 25, 2009 at 06:50:55AM -0700, Colin D Bennett wrote:
>> > Isn't Colin already working on a redesign of the menu?
>>
>> Yes, but I haven't drastically changed the design of the core menu system
>
> In general, I'm not happy with this kind of drastical changes specially at
> this time.  We're supposed to be replacing GRUB Legacy with GRUB 2, *that*
> is the reason we rewrote GRUB almost from scratch.
>
> This gives us plenty of room for newer/fancier stuff.  For example GRUB 2 is
> portable, and it's being ported to a number of platforms.  But we haven't
> even finished exploiting the current design and we're already discussing
> major changes to the GRUB core.  Isn't this something for GRUB 3 ?
>
> Distributors want something which does the job and is first and foremost 
> stable
> and robust.

Hi,

Actually, the changes are not so dramatic, my main points are:

Use xml to store data. With Colin's graphic menu path, we are already
introducing a new file format - the theme file. But the current
representation is a little awkward, for example, to write a label, it
uses:

+vbox{ +label{ text="Hello" } +label{ text="World" } }

I think it would be more natural to write it like this:

<vbox>
  <label text="Hello" />
  <label text="World" />
</vox>

Once the official version is out, people could start creating theme
files, which make it more difficult to change the format. I think it'd
be better if we can make it right the first time.

Implement the menu viewer in lua. Colin's patch already make extensive
use of lua, so perhaps we can just standardize the interface a little
bit, and make it easier to write components using either c or lua.

Event model. This reduce code duplication among viewers. For example,
instead of polling the keyboards, it just need to write a keyboard
handler that get called when the a key is pressed. This model also
make it easier to add new input device, such as mouse.

-- 
Bean




reply via email to

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