diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-08-27 13:23:35 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-08-27 13:23:35 +0000 |
commit | a146b05787110bce5a6f47d40cbca3f8b4f822ab (patch) | |
tree | 99665a18d0fc547432753b3503c73d1323b577cc /perl-install/interactive/stdio.pm | |
parent | f82916359be360c46950fc37cd04e73288ebe918 (diff) | |
download | drakx-backup-do-not-use-a146b05787110bce5a6f47d40cbca3f8b4f822ab.tar drakx-backup-do-not-use-a146b05787110bce5a6f47d40cbca3f8b4f822ab.tar.gz drakx-backup-do-not-use-a146b05787110bce5a6f47d40cbca3f8b4f822ab.tar.bz2 drakx-backup-do-not-use-a146b05787110bce5a6f47d40cbca3f8b4f822ab.tar.xz drakx-backup-do-not-use-a146b05787110bce5a6f47d40cbca3f8b4f822ab.zip |
- bug command: fix choosing the usb-key/floppy drive
(ie adapting interactive::stdio to new interactive callbacks)
Diffstat (limited to 'perl-install/interactive/stdio.pm')
-rw-r--r-- | perl-install/interactive/stdio.pm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/perl-install/interactive/stdio.pm b/perl-install/interactive/stdio.pm index 9dca9eaba..199b5573c 100644 --- a/perl-install/interactive/stdio.pm +++ b/perl-install/interactive/stdio.pm @@ -70,7 +70,7 @@ ask_fromW_begin: print N("Your choice? (0/1, default `%s') ", ${$e->{val}} || '0'); my $i = readln(); if ($i) { - to_bool($i) != to_bool(${$e->{val}}) and $common->{changed}->($ind); + to_bool($i) != to_bool(${$e->{val}}) && $e->{changed} and $e->{changed}->(); ${$e->{val}} = $i; } } elsif ($e->{type} =~ /list/) { @@ -89,12 +89,18 @@ ask_fromW_begin: print "\n"; my $i = good_choice(may_apply($e->{format}, ${$e->{val}}), $n); print "Setting to <", $i ? ${$e->{list}}[$i-1] : ${$e->{val}}, ">\n"; - $i and ${$e->{val}} = ${$e->{list}}[$i-1], $common->{changed}->($ind); + if ($i) { + ${$e->{val}} = ${$e->{list}}[$i-1]; + $e->{changed} and $e->{changed}->(); + } } elsif ($e->{type} eq 'button') { print N("Button `%s': %s", $e->{label}, may_apply($e->{format}, ${$e->{val}})), " $e->{text}\n"; print N("Do you want to click on this button?"); my $i = readln(); - $i && $i !~ /^n/i and $e->{clicked_may_quit}(), $common->{changed}->($ind); + if ($i && $i !~ /^n/i) { + $e->{clicked_may_quit}(); + $e->{changed} and $e->{changed}->(); + } } elsif ($e->{type} eq 'label') { my $t = $format_label->($e); push @labels, $t; @@ -106,7 +112,7 @@ ask_fromW_begin: ${$e->{val}} = $i || ${$e->{val}}; ${$e->{val}} = '' if ${$e->{val}} eq 'void'; print "Setting to <", ${$e->{val}}, ">\n"; - $i and $common->{changed}->($ind); + $i && $e->{changed} and $e->{changed}->(); } else { printf "UNSUPPORTED WIDGET TYPE (type <%s> label <%s> text <%s> val <%s>\n", $e->{type}, $e->{label}, $e->{text}, ${$e->{val}}; } |