summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive/gtk.pm
diff options
context:
space:
mode:
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 {