diff options
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r-- | perl-install/ugtk2.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 00b44ab1c..0e70d8136 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -248,7 +248,7 @@ sub gtktreeview_children { sub create_pixbutton { my ($label, $pix, $reverse_order) = @_; - my @label_and_pix = (0, $label, $pix ? (0, $pix) : ()); + my @label_and_pix = (0, $label, if_($pix, 0, $pix)); gtkadd(Gtk2::Button->new, gtkpack_(Gtk2::HBox->new(0, 3), 1, "", @@ -436,7 +436,7 @@ sub create_okcancel { my $b1 = gtksignal_connect($w->{ok} = Gtk2::Button->new($ok), clicked => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk2->main_quit }); my $b2 = $cancel && gtksignal_connect($w->{cancel} = Gtk2::Button->new($cancel), clicked => $w->{cancel_clicked} || sub { log::l("default cancel_clicked"); undef $w->{retval}; Gtk2->main_quit }); $::isWizard and gtksignal_connect($w->{wizcancel} = Gtk2::Button->new(N("Cancel")), clicked => sub { die 'wizcancel' }); - my @l = grep { $_ } $::isWizard ? ($w->{wizcancel}, $::Wizard_no_previous ? () : $b2, $b1) : ($b1, $b2); + my @l = grep { $_ } $::isWizard ? ($w->{wizcancel}, if_(!$::Wizard_no_previous, $b2, $b1)) : ($b1, $b2); push @l, map { gtksignal_connect(Gtk2::Button->new($_->[0]), clicked => $_->[1]) } @other; $_->can_default($::isWizard) foreach @l; |