summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-05 17:37:29 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-05 17:37:29 +0000
commit98c70375d7db642933cfa94bbaa1fbbf4b6cda7c (patch)
tree6a816ef1642a02ad1abdaa7a7db94e305332277d
parent69f6fd1ba37f75a868071c7a870832c4d5361cd3 (diff)
downloaddrakx-98c70375d7db642933cfa94bbaa1fbbf4b6cda7c.tar
drakx-98c70375d7db642933cfa94bbaa1fbbf4b6cda7c.tar.gz
drakx-98c70375d7db642933cfa94bbaa1fbbf4b6cda7c.tar.bz2
drakx-98c70375d7db642933cfa94bbaa1fbbf4b6cda7c.tar.xz
drakx-98c70375d7db642933cfa94bbaa1fbbf4b6cda7c.zip
(ask_browse_tree_info): switch buttons
-rw-r--r--perl-install/ugtk2.pm20
1 files changed, 12 insertions, 8 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 95cf6e0bc..a9f3a3f42 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -1033,13 +1033,17 @@ sub ask_browse_tree_info {
));
gtkpack__($box2, my $toolbar = Gtk2::Toolbar->new('horizontal', 'icons'));
- $box2->pack_end(gtksignal_connect(Gtk2::Button->new($common->{cancel}), clicked => sub {
- $w->{retval} = 0;
- Gtk2->main_quit }), 0, 1, 20) if $common->{cancel};
-
- $box2->pack_end(my $go = gtksignal_connect(Gtk2::Button->new($common->{ok}), clicked => sub {
- $w->{retval} = 1;
- Gtk2->main_quit }), 0, 1, 20);
+ my @l = ([ $common->{ok}, 1 ], if_($common->{cancel}, [ $common->{cancel}, 0 ]));
+ @l = reverse @l if !$::isInstall;
+ my @buttons = map {
+ my ($t, $val) = @$_;
+ $box2->pack_end(my $w = gtksignal_connect(Gtk2::Button->new($t), clicked => sub {
+ $w->{retval} = $val;
+ Gtk2->main_quit;
+ }), 0, 1, 20);
+ $w;
+ } @l;
+ @buttons = reverse @buttons if !$::isInstall;
if ($common->{auto_deps}) {
gtkpack__($box1, gtksignal_connect(gtkset_active(Gtk2::CheckButton->new($common->{auto_deps}), $common->{state}{auto_deps}),
@@ -1048,7 +1052,7 @@ sub ask_browse_tree_info {
$box1->pack_end(my $status = Gtk2::Label->new, 0, 1, 20);
$w->{window}->set_size_request(map { $_ - 2 * $border - 4 } $::windowwidth, $::windowheight) if !$::isInstall;
- $go->grab_focus;
+ $buttons[0]->grab_focus;
$w->{rwindow}->show_all;
my @toolbar = (ftout => [ N("Expand Tree"), sub { $tree->expand_all } ],