summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-12-29 07:46:42 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-12-29 07:46:42 +0000
commitf3d86d3a61e0add14402dd3660f94808aaa7d2a2 (patch)
treea08ab31fdacb1580ac8b0db8d71e67b441d75048
parent8509e1dc1a1734335683150eae2d41ed43c900f1 (diff)
downloaddrakx-f3d86d3a61e0add14402dd3660f94808aaa7d2a2.tar
drakx-f3d86d3a61e0add14402dd3660f94808aaa7d2a2.tar.gz
drakx-f3d86d3a61e0add14402dd3660f94808aaa7d2a2.tar.bz2
drakx-f3d86d3a61e0add14402dd3660f94808aaa7d2a2.tar.xz
drakx-f3d86d3a61e0add14402dd3660f94808aaa7d2a2.zip
- simplify button layout
- really pack the two button sets at edgee by packing them in two different hboxes with "start" and "end" grouping style
-rw-r--r--perl-install/ugtk2.pm31
1 files changed, 20 insertions, 11 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 4a34b3a65..663575578 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -508,24 +508,33 @@ sub create_okcancel {
my @r2 = map { gtksignal_connect(Gtk2::Button->new($_->[0]), clicked => $_->[1]) } grep { !$_->[2] } @other;
# 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, if_($::isInstall || ($::isWizard || $ok && $cancel), Gtk2::Label->new));
- my @l; # buttons list
+ my @extras = (@l2, @r2);
+ my (@first, @last); # buttons lists
if ($::isWizard) {
# wizard mode: order is cancel/extras/white/prev/next
- push @l, if_(!$::isInstall, $w->{wizcancel}), @extras, $bprev, $bok;
+ @first = (if_(!$::isInstall, $w->{wizcancel}), @extras);
+ @last = ($bprev, $bok);
} else {
# normal mode: cancel/ok button follow current desktop's HIG
my @extras = (@l2, @r2, if_($ok && $cancel, Gtk2::Label->new)); # space buttons but if there's only one
- push @l, $wm_is_kde ? ($bok, @extras, $bprev) : ($bprev, @extras, $bok);
+ @first = (($wm_is_kde ? $bok : $bprev), @extras);
+ @last = ($wm_is_kde ? $bprev : $bok);
}
- my $box = create_hbox($o_spread || "edge");
-
- foreach (grep { $_ } @l) {
- $box->pack_start(gtkshow($_), 0, 0, 1);
- $_->can_default($::isWizard);
- }
- $box;
+ gtkpack(Gtk2::HBox->new,
+ (map {
+ gtkpack(
+ create_hbox($_->[1]),
+ (map {
+ $_->can_default($::isWizard);
+ $_;
+ } grep { $_ } @{$_->[0]})
+ )
+ } ([ \@first, 'start' ],
+ [ \@last, 'end' ],
+ )
+ )
+ );
}
sub _setup_paned {