summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive/gtk.pm
diff options
context:
space:
mode:
authorAurélien Lefebvre <alefebvre@mandriva.com>2009-08-17 13:12:08 +0000
committerAurélien Lefebvre <alefebvre@mandriva.com>2009-08-17 13:12:08 +0000
commit30a1ab53da96801eb89f3632cc5b8e4951a1b73c (patch)
treef20efd9f14a6788aabd989cfe3e55f4ff4eef9a5 /perl-install/interactive/gtk.pm
parent4d5eb7b1986eaec7368d2a2506683af6c9f7a045 (diff)
downloaddrakx-backup-do-not-use-30a1ab53da96801eb89f3632cc5b8e4951a1b73c.tar
drakx-backup-do-not-use-30a1ab53da96801eb89f3632cc5b8e4951a1b73c.tar.gz
drakx-backup-do-not-use-30a1ab53da96801eb89f3632cc5b8e4951a1b73c.tar.bz2
drakx-backup-do-not-use-30a1ab53da96801eb89f3632cc5b8e4951a1b73c.tar.xz
drakx-backup-do-not-use-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/interactive/gtk.pm')
-rw-r--r--perl-install/interactive/gtk.pm7
1 files changed, 6 insertions, 1 deletions
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 {