2008-01-05 Robert Millan <rmh@aybabtu.com>
* include/grub/normal.h (grub_env_write_color_normal): New prototype. (grub_env_write_color_highlight): Likewise. (grub_wait_after_message): Likewise. * normal/color.c: New file. * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'. (normal_mod_DEPENDENCIES): Likewise. * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'. (normal_mod_DEPENDENCIES): Likewise. * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'. (normal_mod_DEPENDENCIES): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'. (normal_mod_DEPENDENCIES): Likewise. * normal/menu_entry.c (run): Rely on grub_wait_after_message() for waiting after a message is printed. * normal/main.c (read_config_file): Likewise. (grub_normal_init): Register grub_env_write_color_normal() and grub_env_write_color_highlight() hooks. Mark `color_normal' and `color_highlight' variables as global. * normal/menu.c (grub_wait_after_message): New function. (grub_color_menu_normal): New variable. Replaces ... (GRUB_COLOR_MENU_NORMAL): ... this macro. (grub_color_menu_highlight): New variable. Replaces ... (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro. (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of `GRUB_TERM_COLOR_STANDARD'. (print_message): Use `grub_setcolorstate' to reload colors. Rename `normal_code' and `highlight_code' to `old_color_normal' and `old_color_highlight', respectively. (grub_menu_init_page): Update colors when drawing the menu, based on `menu_color_normal' and `menu_color_highlight' variables. (grub_menu_run): Rely on grub_wait_after_message() for waiting after a message is printed.
This commit is contained in:
parent
182dd4e568
commit
0ece25b1e1
13 changed files with 188 additions and 62 deletions
|
@ -1,7 +1,7 @@
|
|||
/* normal.h - prototypes for the normal mode */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2003,2005,2006,2007 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2002,2003,2005,2006,2007,2008 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -154,6 +154,9 @@ grub_err_t grub_normal_print_device_info (const char *name);
|
|||
grub_err_t grub_normal_menu_addentry (const char *title,
|
||||
struct grub_script *script,
|
||||
const char *sourcecode);
|
||||
char *grub_env_write_color_normal (struct grub_env_var *var, const char *val);
|
||||
char *grub_env_write_color_highlight (struct grub_env_var *var, const char *val);
|
||||
void grub_wait_after_message (void);
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
void grub_normal_init (void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue