summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm24
1 files changed, 12 insertions, 12 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index e98985f08..d5409bdbd 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -369,14 +369,14 @@ 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(N("OK"));
+ 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(N("Cancel"));
+ my $button2 = Gtk2::Button->new_from_stock('gtk-cancel');
$button2->signal_connect(clicked => sub { $ret = 0; $dialog->destroy; Gtk2->main_quit });
$button2->can_default(1);
$dialog->action_area->pack_start($button2, 1, 1, 0);
@@ -452,15 +452,15 @@ sub create_packtable {
sub create_okcancel {
my ($w, $o_ok, $o_cancel, $o_spread, @other) = @_;
my $wizard_buttons = $::isWizard && !$w->{pop_it};
- my $cancel = defined $o_cancel || defined $o_ok ? $o_cancel : $wizard_buttons ? N("<- Previous") : N("Cancel");
- my $ok = defined $o_ok ? $o_ok : $wizard_buttons ? ($::Wizard_finished ? N("Finish") : N("Next ->")) : N("Ok");
- my $b1 = gtksignal_connect($w->{ok} = Gtk2::Button->new($ok), clicked => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk2->main_quit });
- my $b2 = $cancel && gtksignal_connect($w->{cancel} = Gtk2::Button->new($cancel), clicked => $w->{cancel_clicked} || sub { log::l("default cancel_clicked"); undef $w->{retval}; Gtk2->main_quit });
- gtksignal_connect($w->{wizcancel} = Gtk2::Button->new(N("Cancel")), clicked => sub { die 'wizcancel' }) if $wizard_buttons && !$::isInstall;
+ my $cancel = defined $o_cancel || defined $o_ok ? $o_cancel : $wizard_buttons ? N("<- Previous") : 'gtk-cancel';
+ my $ok = defined $o_ok ? $o_ok : $wizard_buttons ? ($::Wizard_finished ? N("Finish") : N("Next ->")) : 'gtk-ok';
+ my $b1 = gtksignal_connect($w->{ok} = Gtk2::Button->new_from_stock($ok), clicked => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk2->main_quit });
+ 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);
- 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;
+ 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;
my $box = create_hbox($o_spread || "edge");
@@ -983,7 +983,7 @@ sub _ask_warn($@) {
my ($o, @msgs) = @_;
gtkadd($o->{window},
gtkpack($o->create_box_with_title(@msgs),
- gtksignal_connect(my $w = Gtk2::Button->new(N("Ok")), "clicked" => sub { Gtk2->main_quit }),
+ gtksignal_connect(my $w = Gtk2::Button->new_from_stock('gtk-ok'), "clicked" => sub { Gtk2->main_quit }),
),
);
$w->grab_focus;
@@ -1058,7 +1058,7 @@ sub ask_browse_tree_info {
@l = reverse @l if !$::isInstall;
my @buttons = map {
my ($t, $val) = @$_;
- $box2->pack_end(my $w = gtksignal_connect(Gtk2::Button->new($t), clicked => sub {
+ $box2->pack_end(my $w = gtksignal_connect(Gtk2::Button->new_from_stock($t), clicked => sub {
$w->{retval} = $val;
Gtk2->main_quit;
}), 0, 1, 20);
@@ -1066,7 +1066,7 @@ sub ask_browse_tree_info {
} @l;
@buttons = reverse @buttons if !$::isInstall;
- gtkpack__($box2, gtksignal_connect(Gtk2::Button->new(N("Help")), clicked => sub {
+ gtkpack__($box2, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
ask_warn(N("Help"), $common->{interactive_help}->())
})) if $common->{interactive_help};