diff options
Diffstat (limited to 'perl-install/interactive/gtk.pm')
-rw-r--r-- | perl-install/interactive/gtk.pm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 4648c2d6b..9ca5b3b72 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -452,9 +452,7 @@ sub create_widget { 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, 'gtk-go-' . $_ if $actions->{$_}; - } + push @buttons, map { if_($actions->{$_}, 'gtk-go-' . $_) } qw(Up Down); @buttons = map { my $button = /^gtk-/ ? gtknew('Button', image => gtknew('Image', stock => lc($_))) : Gtk2::Button->new(translate($_)); @@ -485,7 +483,7 @@ sub create_widget { if_($images, gtknew('HButtonBox', layout => 'spread', - children_loose => [ map { $_->{button} } @$images] + children_loose => [ map { $_->{button} } @$images ] ) ), ), @@ -664,7 +662,7 @@ sub create_widgets_block { ]); } - my $eater = gtknew('Label') if $e->{alignment} eq 'right' && !$label_w; + my $eater = if_($e->{alignment} eq 'right' && !$label_w, gtknew('Label')); $e->{real_w} = gtkpack_(Gtk2::HBox->new, if_($e->{icon}, 0, eval { gtkcreate_img($e->{icon}) }), |