Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1N0G4O-0003Aq-PF for mharc-grub-devel@gnu.org; Tue, 20 Oct 2009 10:52:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0G4K-00038K-NS for grub-devel@gnu.org; Tue, 20 Oct 2009 10:52:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0G4F-00035I-Fv for grub-devel@gnu.org; Tue, 20 Oct 2009 10:52:11 -0400 Received: from [199.232.76.173] (port=54639 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0G4F-00035D-Be for grub-devel@gnu.org; Tue, 20 Oct 2009 10:52:07 -0400 Received: from mail-pw0-f47.google.com ([209.85.160.47]:38111) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0G4D-0001nY-OV for grub-devel@gnu.org; Tue, 20 Oct 2009 10:52:06 -0400 Received: by pwj10 with SMTP id 10so784977pwj.26 for ; Tue, 20 Oct 2009 07:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=oeU6ra5v01zPGXSGS15Jj6KI5zLH2tJ0rvpA94R/o+8=; b=nnv2JY3WkZmhstM4elYnLIUBmcbV74kgXsbrilaBKoIv+NwtY+98M7tVR393mThoag BeXFf993hsukRrtvgqJgTn3ht3y7gNCcuYhX+0o9JJczO4NvN6yp9ydJYTNDSEx63tNL dTVhkOyXlvtgsYO+hIM+xtktvzFMLb6m0Q9Wc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=IGYp9IjaRaUe2KFC+rFokEnhKWMKGdsOFISgikZalmzuefEJsu2MfmHG1965M45SaW wDzkbzx0rT9tBt0y0pM78bzvYB8k4SMk7JQWCInwDaPHIwECfxZbzoqU6O8Yh7CvPzT5 U/yRb+lbj4hEyRcnosqmn3YJbmIQtu+/bCKuc= MIME-Version: 1.0 Received: by 10.140.131.1 with SMTP id e1mr1654499rvd.219.1256050324806; Tue, 20 Oct 2009 07:52:04 -0700 (PDT) In-Reply-To: References: Date: Tue, 20 Oct 2009 22:52:04 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] New menu interface (implementation) 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: Tue, 20 Oct 2009 14:52:13 -0000 Hi, Update: Add dialog support, it allows you to write a template and call it with different parameters, for example: dialog_edit { panel { parameters = "text=edit.text" class = frame width = 80% attach_hcenter = 0 attach_vcenter = 0 edit { lines = 10 } } } The parameters property control the mapping between parameter and internal property name. To use it to edit current command: menu_edit dialog_edit text=command It also allows you to edit other properties, for example, the demo add a hotkey t to edit the title: t = "menu_edit dialog_edit text=title\nmenu_refresh" The generated menu also uses templates, one for submenu, and one for menuitem: menu_template { panel { class = frame } } item_template { panel { parameters = "class=image.class:title=text.text" class = select image {} text {} } } The names of the template is passed to menu_create command: menu_create menu_template item_template. Smart popup window. The sub menu would pop to the direction with the most space, which would make sure it won't be truncated by the border. For example, if the parent menu is at the top of screen, sub menu pops at the bottom, if it's at the bottom, sub menu pops at the top. add command menu_next_node, menu_prev_node, menu_next_anchor and menu_prev_anchor, you can assign these to other keys. The demo adds the two terminal example. Inside terminal, direction key and TAB are all used, so you need to assign another hotkey to switch between the two window. The demo uses f6: f6 = menu_next_anchor Set maximum text mode in EFI. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/