From ec9fdca8b6d7008ad051f01658e85607cb2e26a3 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 13 Jan 2004 16:31:38 +0000 Subject: do not pack empty label before extra buttons if there'll be no button before it rationale: when there's no cancel button, packing an empty label instead of the cancel button results in extra buttons (eg: help, advanced) to be shifted with a space before; --- perl-install/ugtk2.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'perl-install/ugtk2.pm') diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index e1e3d5847..cf1ae7fb3 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -497,8 +497,6 @@ sub create_okcancel { if ($cancel) { $bprev = gtksignal_connect($w->{cancel} = Gtk2::Button->new($cancel), clicked => $w->{cancel_clicked} || sub { log::l("default cancel_clicked"); undef $w->{retval}; Gtk2->main_quit }); - } elsif($::Wizard_no_previous) { # prevent one button to be centered (eg: "finish" in wizards) - $bprev = Gtk2::Label->new; } $w->{wizcancel} = gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { die 'wizcancel' }) if $::isWizard && !$::isInstall; if (!defined $wm_is_kde) { @@ -510,6 +508,7 @@ sub create_okcancel { # we put space to group buttons in two packs (but if there's only one when not in wizard mode) # but in the installer where all windows run in wizard mode because of design even when not in a wizard step my @extras = (@l2, @r2); + $bprev = Gtk2::Label->new if !$cancel && $::Wizard_no_previous && !@extras; my (@first, @last); # buttons lists if ($::isWizard) { # wizard mode: order is cancel/extras/white/prev/next -- cgit v1.2.1