summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-07-14 19:21:04 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-07-14 19:21:04 +0000
commit1a21cac00c1449a159d6ff5bb0d87a305d44b7d2 (patch)
tree749dbbc1598e87b69417159f2a9a4f6650b0324c /perl-install/ugtk2.pm
parent24df2ffd61569b0ee249cc592d136ecf8480d0c6 (diff)
downloaddrakx-1a21cac00c1449a159d6ff5bb0d87a305d44b7d2.tar
drakx-1a21cac00c1449a159d6ff5bb0d87a305d44b7d2.tar.gz
drakx-1a21cac00c1449a159d6ff5bb0d87a305d44b7d2.tar.bz2
drakx-1a21cac00c1449a159d6ff5bb0d87a305d44b7d2.tar.xz
drakx-1a21cac00c1449a159d6ff5bb0d87a305d44b7d2.zip
sanitize button layouts:
- use stock items everywhere - use ButtonBoxes everywhere - pack buttons always in the same order and places
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index a628ded3d..4f7cc68b2 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -377,12 +377,6 @@ sub create_dialog {
$dialog->vbox->pack_start(create_scrolled_window($text, [ 'never', 'automatic' ]), 1, 1, 0);
$text->set_line_wrap(1);
- my $button = Gtk2::Button->new_from_stock('gtk-ok');
- $button->can_default(1);
- $button->signal_connect(clicked => sub { $ret = 1; $dialog->destroy; Gtk2->main_quit });
- $dialog->action_area->pack_start($button, 1, 1, 0);
- $button->grab_default;
-
if ($o_options->{cancel}) {
my $button2 = Gtk2::Button->new_from_stock('gtk-cancel');
$button2->signal_connect(clicked => sub { $ret = 0; $dialog->destroy; Gtk2->main_quit });
@@ -390,6 +384,12 @@ sub create_dialog {
$dialog->action_area->pack_start($button2, 1, 1, 0);
}
+ my $button = Gtk2::Button->new_from_stock('gtk-ok');
+ $button->can_default(1);
+ $button->signal_connect(clicked => sub { $ret = 1; $dialog->destroy; Gtk2->main_quit });
+ $dialog->action_area->pack_start($button, 1, 1, 0);
+ $button->grab_default;
+
$dialog->show_all;
Gtk2->main;
$ret;
@@ -465,7 +465,7 @@ sub create_okcancel {
my $b2 = $cancel && gtksignal_connect($w->{cancel} = Gtk2::Button->new_from_stock($cancel), clicked => $w->{cancel_clicked} || sub { log::l("default cancel_clicked"); undef $w->{retval}; Gtk2->main_quit });
gtksignal_connect($w->{wizcancel} = Gtk2::Button->new_from_stock('gtk-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);
+ if_(!$::Wizard_no_previous, $b2), $b1) : ($b2, $b1);
my @l2 = map { gtksignal_connect(Gtk2::Button->new_from_stock($_->[0]), clicked => $_->[1]) } grep { $_->[2] } @other;
my @r2 = map { gtksignal_connect(Gtk2::Button->new_from_stock($_->[0]), clicked => $_->[1]) } grep { !$_->[2] } @other;