Re: [PATCH] allow user-configurable menucolor

2008-01-23 Thread Marco Gerards
Robert Millan <[EMAIL PROTECTED]> writes: > On Thu, Jan 03, 2008 at 06:04:59PM +0200, Vesa Jääskeläinen wrote: >> >> 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 wou

Re: [PATCH] allow user-configurable menucolor

2008-01-06 Thread Robert Millan
On Sun, Jan 06, 2008 at 12:33:29PM +0100, Jeroen Dekkers wrote: > > Btw, nice to see you around here. Do you have any news about the CD-ROM > > GSoC ? I looked at the tarball from google.com, but CD access seems > > unfinished (I couldn't access the CD neither in qemu nor in real hw). > > It sho

Re: [PATCH] allow user-configurable menucolor

2008-01-06 Thread Jeroen Dekkers
At Sun, 6 Jan 2008 00:42:40 +0100, Robert Millan wrote: > > On Sat, Jan 05, 2008 at 10:45:46PM +0100, Jeroen Dekkers wrote: > > You should actually also include grub/env.h if you use struct > > grub_env_var in the prototypes. > > Uhm, I included it in normal/color.c to satisfy the dependencies: >

Re: [PATCH] allow user-configurable menucolor

2008-01-05 Thread Robert Millan
On Sat, Jan 05, 2008 at 10:45:46PM +0100, Jeroen Dekkers wrote: > At Thu, 3 Jan 2008 16:35:33 +0100, > Robert Millan wrote: > > diff -x '*~' -x '*.mk' -Nurp grub2/include/grub/normal.h > > grub2.color/include/grub/normal.h > > --- grub2/include/grub/normal.h 2007-07-22 01:32:22.0 +0200

Re: [PATCH] allow user-configurable menucolor

2008-01-05 Thread Jeroen Dekkers
At Thu, 3 Jan 2008 16:35:33 +0100, Robert Millan wrote: > diff -x '*~' -x '*.mk' -Nurp grub2/include/grub/normal.h > grub2.color/include/grub/normal.h > --- grub2/include/grub/normal.h 2007-07-22 01:32:22.0 +0200 > +++ grub2.color/include/grub/normal.h 2008-01-03 16:12:53.0 +

Re: opening new context (was: [PATCH] allow user-configurable menucolor)

2008-01-05 Thread Robert Millan
On Sat, Jan 05, 2008 at 01:03:41PM +0100, Yoshinori K. Okuji wrote: > > Anyway, I wouldn't want to spend much time discussing this. I assume my > > proposed change (propagating read/write hooks for global/exported > > variables) sounds fine? > > Yes. Ok, committed. -- Robert Millan I know my

Re: opening new context (was: [PATCH] allow user-configurable menucolor)

2008-01-05 Thread Yoshinori K. Okuji
On Saturday 05 January 2008 12:49, Robert Millan wrote: > On Sat, Jan 05, 2008 at 02:34:38AM +0100, Yoshinori K. Okuji wrote: > > On Friday 04 January 2008 09:02, Robert Millan wrote: > > > On Thu, Jan 03, 2008 at 06:04:59PM +0200, Vesa Jääskeläinen wrote: > > > > About new context: > > > > > > > >

Re: opening new context (was: [PATCH] allow user-configurable menucolor)

2008-01-05 Thread Robert Millan
On Sat, Jan 05, 2008 at 02:34:38AM +0100, Yoshinori K. Okuji wrote: > On Friday 04 January 2008 09:02, Robert Millan wrote: > > On Thu, Jan 03, 2008 at 06:04:59PM +0200, Vesa Jääskeläinen wrote: > > > About new context: > > > > > > Shouldn't new context have clone of it's parent contexts settings?

Re: opening new context (was: [PATCH] allow user-configurable menucolor)

2008-01-04 Thread Yoshinori K. Okuji
On Friday 04 January 2008 09:02, Robert Millan wrote: > On Thu, Jan 03, 2008 at 06:04:59PM +0200, Vesa Jääskeläinen wrote: > > About new context: > > > > Shouldn't new context have clone of it's parent contexts settings? > > I wouldn't want to change that without having some input from whoever > de

opening new context (was: [PATCH] allow user-configurable menucolor)

2008-01-04 Thread Robert Millan
On Thu, Jan 03, 2008 at 06:04:59PM +0200, Vesa Jääskeläinen wrote: > > About new context: > > Shouldn't new context have clone of it's parent contexts settings? I wouldn't want to change that without having some input from whoever designed (or understands) grub_env_export(). There's probably a

Re: [PATCH] allow user-configurable menucolor

2008-01-03 Thread Robert Millan
On Thu, Jan 03, 2008 at 06:04:59PM +0200, Vesa Jääskeläinen wrote: > > 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. One thing I d

Re: [PATCH] allow user-configurable menucolor

2008-01-03 Thread Vesa Jääskeläinen
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 w

Re: [PATCH] allow user-configurable menucolor

2008-01-03 Thread Robert Millan
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. > > Soun

Re: [PATCH] allow user-configurable menucolor

2008-01-02 Thread Robert Millan
On Thu, Jan 03, 2008 at 12:42:01AM +0100, Yoshinori K. Okuji wrote: > On Tuesday 01 January 2008 13:47, Robert Millan wrote: > > This patch allows the following to work: > > > > set color_normal=cyan/blue > > set color_highlight=white/blue > > Although I am not a native speaker, I feel that th

Re: [PATCH] allow user-configurable menucolor

2008-01-02 Thread Robert Millan
On Thu, Jan 03, 2008 at 12:55:48AM +0100, Yoshinori K. Okuji wrote: > On Wednesday 02 January 2008 22:48, Robert Millan wrote: > > On Tue, Jan 01, 2008 at 06:38:06PM +0100, Robert Millan wrote: > > > `color' command is necessary to propagate user setting from environment > > > variables to the inte

Re: [PATCH] allow user-configurable menucolor

2008-01-02 Thread Yoshinori K. Okuji
On Wednesday 02 January 2008 22:48, Robert Millan wrote: > On Tue, Jan 01, 2008 at 06:38:06PM +0100, Robert Millan wrote: > > `color' command is necessary to propagate user setting from environment > > variables to the internal color of our current terminal. > > Vesa suggested (on IRC) to use write

Re: [PATCH] allow user-configurable menucolor

2008-01-02 Thread Yoshinori K. Okuji
On Tuesday 01 January 2008 13:47, Robert Millan wrote: > This patch allows the following to work: > > set color_normal=cyan/blue > set color_highlight=white/blue Although I am not a native speaker, I feel that they should be better called "normal_color" and "highlight_color". > which is equi

Re: [PATCH] allow user-configurable menucolor

2008-01-02 Thread Robert Millan
On Tue, Jan 01, 2008 at 06:38:06PM +0100, Robert Millan wrote: > > `color' command is necessary to propagate user setting from environment > variables to the internal color of our current terminal. Vesa suggested (on IRC) to use write hooks (grub_env_write_hook_t) in variables to avoid this. I t

Re: [PATCH] allow user-configurable menucolor

2008-01-01 Thread Robert Millan
Some rework to support user-defined colors in non-menu as well. This is most desirable when using the new background image feature implemented by Vesa, since light-grey may not be properly readable depending on the image you're using. Example for bios console, setting up only menu color: set me

Re: [PATCH] allow user-configurable menucolor

2008-01-01 Thread Robert Millan
Thanks for the pointers. While fixing them I found other mistakes, then started "torturing" the code with ill user input, found more mistakes, and ended up refactoring most of it. See attached new patch, this time including ChangeLog entry. -- Robert Millan I know my rights; I want my phone

Re: [PATCH] allow user-configurable menucolor

2008-01-01 Thread Vesa Jääskeläinen
Robert Millan wrote: > On Tue, Jan 01, 2008 at 03:14:50PM +0200, Vesa Jääskeläinen wrote: >> First some questions ;) >> >> - What happens when you forgot to provide / in this string ;) ? > > grub_strchr() returns NULL and... whoops! I'll fix that :-) > >> - What happens when all memory is used?

Re: [PATCH] allow user-configurable menucolor

2008-01-01 Thread Robert Millan
On Tue, Jan 01, 2008 at 03:14:50PM +0200, Vesa Jääskeläinen wrote: > > First some questions ;) > > - What happens when you forgot to provide / in this string ;) ? grub_strchr() returns NULL and... whoops! I'll fix that :-) > - What happens when all memory is used? What do you mean? > - What

Re: [PATCH] allow user-configurable menucolor

2008-01-01 Thread Vesa Jääskeläinen
Robert Millan wrote: > This patch allows the following to work: > > set color_normal=cyan/blue > set color_highlight=white/blue > > which is equivalent to this command in GRUB Legacy: > > color cyan/blue white/blue > > I haven't written a ChangeLog entry yet, because I'd like to receive c

[PATCH] allow user-configurable menucolor

2008-01-01 Thread Robert Millan
This patch allows the following to work: set color_normal=cyan/blue set color_highlight=white/blue which is equivalent to this command in GRUB Legacy: color cyan/blue white/blue I haven't written a ChangeLog entry yet, because I'd like to receive comments on the function names. I don't