2008-11-01 Carles Pina i Estany <carles@pina.cat>
* normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
This commit is contained in:
parent
de4fa71c6c
commit
1432e95890
2 changed files with 55 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2008-11-01 Carles Pina i Estany <carles@pina.cat>
|
||||
|
||||
* normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
|
||||
|
||||
2008-10-29 Guillem Jover <guillem.jover@nokia.com>
|
||||
|
||||
* disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
|
||||
|
|
|
@ -457,6 +457,57 @@ run_menu (grub_menu_t menu, int nested)
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GRUB_TERM_PPAGE:
|
||||
if (first == 0)
|
||||
{
|
||||
offset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
first -= GRUB_TERM_NUM_ENTRIES;
|
||||
|
||||
if (first < 0)
|
||||
{
|
||||
offset += first;
|
||||
first = 0;
|
||||
}
|
||||
}
|
||||
print_entries (menu, first, offset);
|
||||
break;
|
||||
|
||||
case GRUB_TERM_NPAGE:
|
||||
if (offset == 0)
|
||||
{
|
||||
offset += GRUB_TERM_NUM_ENTRIES - 1;
|
||||
if (first + offset >= menu->size)
|
||||
{
|
||||
offset = menu->size - first - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
first += GRUB_TERM_NUM_ENTRIES;
|
||||
|
||||
if (first + offset >= menu->size)
|
||||
{
|
||||
first -= GRUB_TERM_NUM_ENTRIES;
|
||||
offset += GRUB_TERM_NUM_ENTRIES;
|
||||
|
||||
if (offset > menu->size - 1 ||
|
||||
offset > GRUB_TERM_NUM_ENTRIES - 1)
|
||||
{
|
||||
offset = menu->size - first - 1;
|
||||
}
|
||||
if (offset > GRUB_TERM_NUM_ENTRIES)
|
||||
{
|
||||
first += offset - GRUB_TERM_NUM_ENTRIES + 1;
|
||||
offset = GRUB_TERM_NUM_ENTRIES - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
print_entries (menu, first, offset);
|
||||
break;
|
||||
|
||||
case '\n':
|
||||
case '\r':
|
||||
|
|
Loading…
Reference in a new issue