summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-01-11 11:51:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-01-11 11:51:31 +0000
commit824049f130f973f256d513bc8226caf18a6c7d7a (patch)
tree336c81aee3b3b844e7b8a7e882f53d06e3d31e0d /perl-install/interactive_gtk.pm
parent3f728aea280bd1286891976114ae183f7f82d4b6 (diff)
downloaddrakx-backup-do-not-use-824049f130f973f256d513bc8226caf18a6c7d7a.tar
drakx-backup-do-not-use-824049f130f973f256d513bc8226caf18a6c7d7a.tar.gz
drakx-backup-do-not-use-824049f130f973f256d513bc8226caf18a6c7d7a.tar.bz2
drakx-backup-do-not-use-824049f130f973f256d513bc8226caf18a6c7d7a.tar.xz
drakx-backup-do-not-use-824049f130f973f256d513bc8226caf18a6c7d7a.zip
(ask_from_entries_refW): apply "format" on label when icon is missing for iconlist
(ask_from_entries_refW): handle "canceled" callback. Permits to overrule the cancel.
Diffstat (limited to 'perl-install/interactive_gtk.pm')
-rw-r--r--perl-install/interactive_gtk.pm22
1 files changed, 13 insertions, 9 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index e6e02c3be..87b6db89c 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -272,7 +272,7 @@ sub ask_from_entries_refW {
my $f = $e->{icon2f}->($_[0]);
$e->{icon} = -e $f ?
new Gtk::Pixmap(gtkcreate_xpm($mainw->{window}, $f)) :
- new Gtk::Label(translate($_[0]));
+ new Gtk::Label(may_apply($e->{format}, $_[0]));
$w->add($e->{icon});
$e->{icon}->show;
};
@@ -376,16 +376,20 @@ sub ask_from_entries_refW {
$set_advanced->(0);
(@widgets ? $widgets[0]{w} : $common->{focus_cancel} ? $mainw->{cancel} : $mainw->{ok})->grab_focus();
- $mainw->main(sub {
- $get_all->();
- my ($error, $focus) = $common->{callbacks}{complete}->();
+ my $check = sub {
+ my ($f) = @_;
+ sub {
+ $get_all->();
+ my ($error, $focus) = $f->();
- if ($error) {
- $set_all->();
- $widgets[$focus || 0]{w}->grab_focus();
+ if ($error) {
+ $set_all->();
+ $widgets[$focus || 0]{w}->grab_focus();
+ }
+ !$error;
}
- !$error;
- });
+ };
+ $mainw->main(map { $check->($common->{callbacks}{$_}) } 'complete', 'canceled');
}