From 30a1ab53da96801eb89f3632cc5b8e4951a1b73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Lefebvre?= Date: Mon, 17 Aug 2009 13:12:08 +0000 Subject: - 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 --- perl-install/interactive/gtk.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'perl-install/interactive') diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index e6ad4aaff..e48933dbe 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -450,9 +450,14 @@ sub create_widget { $e->{formatted_list} = [ map { may_apply($e->{format}, $_) } @{$e->{list}} ]; if (my $actions = $e->{add_modify_remove}) { + my @buttons = ( N_("Add"), N_("Modify"), N_("Remove")); + # Add Up/Down buttons if their actions are defined + foreach (qw(Up Down)) { + push @buttons, N_($_) if ($actions->{$_}); + } my @buttons = map { { kind => lc $_, action => $actions->{$_}, button => Gtk2::Button->new(translate($_)) }; - } N_("Add"), N_("Modify"), N_("Remove"); + } @buttons; my $modify = find { $_->{kind} eq 'modify' } @buttons; my $do_action = sub { -- cgit v1.2.1