diff options
author | Aurélien Lefebvre <alefebvre@mandriva.com> | 2009-08-17 13:12:08 +0000 |
---|---|---|
committer | Aurélien Lefebvre <alefebvre@mandriva.com> | 2009-08-17 13:12:08 +0000 |
commit | 30a1ab53da96801eb89f3632cc5b8e4951a1b73c (patch) | |
tree | f20efd9f14a6788aabd989cfe3e55f4ff4eef9a5 /perl-install/any.pm | |
parent | 4d5eb7b1986eaec7368d2a2506683af6c9f7a045 (diff) | |
download | drakx-30a1ab53da96801eb89f3632cc5b8e4951a1b73c.tar drakx-30a1ab53da96801eb89f3632cc5b8e4951a1b73c.tar.gz drakx-30a1ab53da96801eb89f3632cc5b8e4951a1b73c.tar.bz2 drakx-30a1ab53da96801eb89f3632cc5b8e4951a1b73c.tar.xz drakx-30a1ab53da96801eb89f3632cc5b8e4951a1b73c.zip |
- added the ability to add up/down buttons in add_modify_remove list
of interactive
- drakboot :
o user is now able to re-order bootloader entries
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 595c2af9e..70a112ec3 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -597,6 +597,26 @@ sub setupBootloader__entries { 1; }; + my $Up = sub { + my ($e) = @_; + my @entries = @{$b->{entries}}; + my ($index) = grep { $entries[$_]->{label} eq $e->{label} } 0..$#entries; + if ($index > 0) { + (@{$b->{entries}}->[$index - 1], @{$b->{entries}}->[$index]) = (@{$b->{entries}}->[$index], @{$b->{entries}}->[$index - 1]); + } + 1; + }; + + my $Down = sub { + my ($e) = @_; + my @entries = @{$b->{entries}}; + my ($index) = grep { $entries[$_]->{label} eq $e->{label} } 0..$#entries; + if ($index < $#entries) { + (@{$b->{entries}}->[$index + 1], @{$b->{entries}}->[$index]) = (@{$b->{entries}}->[$index], @{$b->{entries}}->[$index + 1]); + } + 1; + }; + my @prev_entries = @{$b->{entries}}; if ($in->ask_from__add_modify_remove(N("Bootloader Configuration"), N("Here are the entries on your boot menu so far. @@ -607,7 +627,7 @@ You can create additional entries or change the existing ones."), [ { ($b->{default} eq $e->{label} ? " * " : " ") . "$e->{label} ($e->{kernel_or_dev})" : translate($e); }, list => $b->{entries}, - } ], Add => $Add, Modify => $Modify, Remove => $Remove)) { + } ], Add => $Add, Modify => $Modify, Remove => $Remove, Up => $Up, Down => $Down)) { 1; } else { @{$b->{entries}} = @prev_entries; |