summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2002-09-03 14:36:45 +0000
committerdamien <damien@mandriva.com>2002-09-03 14:36:45 +0000
commit8b422089a02e0f1b003d4252ac936744a45770e4 (patch)
tree4fece30d06ac6e3b55c8750157b023eb76768402 /perl-install
parente26426692ef8eec87d9c17deb4d82ef43bd2cc23 (diff)
downloaddrakx-backup-do-not-use-8b422089a02e0f1b003d4252ac936744a45770e4.tar
drakx-backup-do-not-use-8b422089a02e0f1b003d4252ac936744a45770e4.tar.gz
drakx-backup-do-not-use-8b422089a02e0f1b003d4252ac936744a45770e4.tar.bz2
drakx-backup-do-not-use-8b422089a02e0f1b003d4252ac936744a45770e4.tar.xz
drakx-backup-do-not-use-8b422089a02e0f1b003d4252ac936744a45770e4.zip
better icon association
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/my_gtk.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 1a3eaed52..a7a7ff134 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -155,14 +155,13 @@ END { &exit() }
sub create_okcancel {
my ($w, $ok, $cancel, $spread, @other) = @_;
- print "[ $w, $ok, $cancel, $spread ]\n";
$spread ||= $::isWizard ? "end" : "spread";
- my $cancel_xpm= gtkxpm($::isWizard ? 'stock_left.xpm' : 'stock_cancel.xpm') if !defined $cancel && !defined $ok;
- print "cancel_xpm $cancel_xpm\n";
$cancel = $::isWizard ? _("Previous") : _("Cancel") if !defined $cancel && !defined $ok;
- my $ok_xpm= gtkxpm($::isWizard ? ($::Wizard_finished ? 'stock_exit.xpm' : 'stock_right.xpm') : 'stock_ok.xpm') if !defined $ok;
- print "ok_xpm $ok_xpm\n";
+ my $cancel_xpm;
+ $cancel eq $_->[0] and $cancel_xpm = gtkxpm($_->[1]) foreach ([ _("Previous"), 'stock_left.xpm' ], [ _("Cancel"), 'stock_cancel.xpm']);
$ok = $::isWizard ? ($::Wizard_finished ? _("Finish") : _("Next")) : _("Ok") if !defined $ok;
+ my $ok_xpm;
+ $ok eq $_->[0] and $ok_xpm = gtkxpm($_->[1]) foreach ([ _("Finish"), 'stock_exit.xpm' ], [ _("Next"), 'stock_right.xpm'], [ _("Ok"), 'stock_ok.xpm']);
my $b1 = gtksignal_connect($w->{ok} = create_pixbutton($ok, $ok_xpm, $::isWizard), clicked => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk->main_quit });
my $b2 = $cancel && gtksignal_connect($w->{cancel} = create_pixbutton($cancel, $cancel_xpm),
clicked => $w->{cancel_clicked} || sub { log::l("default cancel_clicked"); undef $w->{retval}; Gtk->main_quit });