From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JASYs-0004gj-Hj for mharc-grub-devel@gnu.org; Thu, 03 Jan 2008 11:04:50 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JASYq-0004dw-T3 for grub-devel@gnu.org; Thu, 03 Jan 2008 11:04:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JASYq-0004cP-D4 for grub-devel@gnu.org; Thu, 03 Jan 2008 11:04:48 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JASYq-0004c9-1n for grub-devel@gnu.org; Thu, 03 Jan 2008 11:04:48 -0500 Received: from pne-smtpout4-sn2.hy.skanova.net ([81.228.8.154]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JASYp-0003Pq-8z for grub-devel@gnu.org; Thu, 03 Jan 2008 11:04:47 -0500 Received: from [127.0.0.1] (88.193.32.97) by pne-smtpout4-sn2.hy.skanova.net (7.3.129) id 471A7B0C003D7D88 for grub-devel@gnu.org; Thu, 3 Jan 2008 17:03:36 +0100 Message-ID: <477D07AB.5000904@nic.fi> Date: Thu, 03 Jan 2008 18:04:59 +0200 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: The development of GRUB 2 References: <20080101124728.GA30417@thorin> <200801030042.01855.okuji@enbug.org> <20080103010414.GC6843@thorin> <20080103153533.GA24992@thorin> In-Reply-To: <20080103153533.GA24992@thorin> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) Subject: Re: [PATCH] allow user-configurable menucolor 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: Thu, 03 Jan 2008 16:04:49 -0000 Robert Millan wrote: > On Thu, Jan 03, 2008 at 02:04:14AM +0100, Robert Millan wrote: >>> So, if you don't hesitate to create so many variables, you can simply >>> create "normal_color", "normal_background_color", "highlight_color" >>> and "highlight_background_color", although I don't know who would like it. >> Sounds like this could save us some code space. I'd go for _fg and _bg to >> preserve alignment in the names. > > Uhm actually, splitting those in _fg and _bg was a bit of a hassle, because GRUB > internally thinks of colors as (bg << 4 | fg) like vga does, so obtaining them > from two separate variables didn't bring any real benefit. > > See attached new patch, using variable hooks. > > Note: if you're going to test this using "configfile" command, think that > this opens a new context and exposes the problem with hooks I just reported > in the other thread. About error handling: Why not call grub_error() with error message and just return from callback, and let prompt handle error processing (grub_print_error()). This would keep error reporting centralized. About new context: Shouldn't new context have clone of it's parent contexts settings?