summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-06 13:52:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-06 13:52:11 +0000
commit3b92747aaadc71433aa808edde7e01d450fe99e3 (patch)
treec93d97b4cf147c9435961d479c7c4c2b67742275 /perl-install/ugtk2.pm
parentc26267fdbe8196da11186f0bda1ef7a013700411 (diff)
downloaddrakx-3b92747aaadc71433aa808edde7e01d450fe99e3.tar
drakx-3b92747aaadc71433aa808edde7e01d450fe99e3.tar.gz
drakx-3b92747aaadc71433aa808edde7e01d450fe99e3.tar.bz2
drakx-3b92747aaadc71433aa808edde7e01d450fe99e3.tar.xz
drakx-3b92747aaadc71433aa808edde7e01d450fe99e3.zip
(create_okcancel): allow buttons on the left (for the "Help" button)
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm16
1 files changed, 12 insertions, 4 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index a9f3a3f42..52b710e12 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -439,7 +439,6 @@ sub create_packtable {
sub create_okcancel {
my ($w, $ok, $cancel, $spread, @other) = @_;
my $wizard_buttons = $::isWizard && !$w->{pop_it};
- $spread ||= $wizard_buttons ? "end" : "spread";
$cancel = $wizard_buttons ? N("<- Previous") : N("Cancel") if !defined $cancel && !defined $ok;
$ok = $wizard_buttons ? ($::Wizard_finished ? N("Finish") : N("Next ->")) : N("Ok") if !defined $ok;
my $b1 = gtksignal_connect($w->{ok} = Gtk2::Button->new($ok), clicked => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk2->main_quit });
@@ -447,10 +446,19 @@ sub create_okcancel {
gtksignal_connect($w->{wizcancel} = Gtk2::Button->new(N("Cancel")), clicked => sub { die 'wizcancel' }) if $wizard_buttons && !$::isInstall;
my @l = grep { $_ } $wizard_buttons ? (if_(!$::isInstall, $w->{wizcancel}),
if_(!$::Wizard_no_previous, $b2), $b1) : ($b1, $b2);
- my @l2 = map { gtksignal_connect(Gtk2::Button->new($_->[0]), clicked => $_->[1]) } @other;
+ my @l2 = map { gtksignal_connect(Gtk2::Button->new($_->[0]), clicked => $_->[1]) } grep { $_->[2] } @other;
+ my @r2 = map { gtksignal_connect(Gtk2::Button->new($_->[0]), clicked => $_->[1]) } grep { !$_->[2] } @other;
- $_->can_default($wizard_buttons) foreach @l2, @l;
- gtkadd(create_hbox($spread), @l2, @l);
+ my $box = create_hbox($spread || "edge");
+
+ $box->pack_start($_, 0, 0, 1) foreach @l2;
+ gtkpack($box, '');
+ $box->pack_end($_, 0, 0, 1) foreach @r2, @l;
+ foreach (@l2, @r2, @l) {
+ $_->show;
+ $_->can_default($wizard_buttons);
+ }
+ $box;
}
sub _setup_paned {