summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-22 16:56:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-22 16:56:24 +0000
commit76c708d7ad362aaaea3416936119510c156135b2 (patch)
tree167a7d642a9e5e95526bdf57967d8e906018ef42 /perl-install/Xconfig
parenta5a0d13005490f58a309d05d37d2a938aa98ef14 (diff)
downloaddrakx-backup-do-not-use-76c708d7ad362aaaea3416936119510c156135b2.tar
drakx-backup-do-not-use-76c708d7ad362aaaea3416936119510c156135b2.tar.gz
drakx-backup-do-not-use-76c708d7ad362aaaea3416936119510c156135b2.tar.bz2
drakx-backup-do-not-use-76c708d7ad362aaaea3416936119510c156135b2.tar.xz
drakx-backup-do-not-use-76c708d7ad362aaaea3416936119510c156135b2.zip
- do not display "Test" button when bad card and during install (instead of disabling it)
- after install, always display "Test" button but warn strongly not to test
Diffstat (limited to 'perl-install/Xconfig')
-rw-r--r--perl-install/Xconfig/main.pm10
-rw-r--r--perl-install/Xconfig/test.pm12
2 files changed, 15 insertions, 7 deletions
diff --git a/perl-install/Xconfig/main.pm b/perl-install/Xconfig/main.pm
index 27f8fd76b..cc657248a 100644
--- a/perl-install/Xconfig/main.pm
+++ b/perl-install/Xconfig/main.pm
@@ -57,7 +57,7 @@ sub configure_everything {
$ok &&= $X->{card} = Xconfig::card::configure($in, $raw_X, $do_pkgs, $auto, $options);
$ok &&= Xconfig::screen::configure($raw_X, $X->{card});
$ok &&= $X->{resolution} = Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitor}, $auto);
- $ok &&= Xconfig::test::test($in, $raw_X, $X->{card}, $auto);
+ $ok &&= Xconfig::test::test($in, $raw_X, $X->{card}, $auto, 'skip_badcard');
if (!$ok) {
($ok) = configure_chooser_raw($in, $raw_X, $do_pkgs, $options, $X, 1);
@@ -111,10 +111,12 @@ sub configure_chooser_raw {
clicked => sub {
$may_set->('resolution', Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitor}));
} },
- { val => _("Test"), icon => "warning", disabled => sub { !$X->{card} || !$X->{monitor} || !$modified || !Xconfig::card::check_bad_card($X->{card}) },
- clicked => sub {
- $ok = Xconfig::test::test($in, $raw_X, $X->{card}, 1);
+ if_(Xconfig::card::check_bad_card($X->{card}) || $::isStandalone,
+ { val => _("Test"), icon => "warning", disabled => sub { !$X->{card} || !$X->{monitor} },
+ clicked => sub {
+ $ok = Xconfig::test::test($in, $raw_X, $X->{card}, 'auto', 0);
} },
+ ),
{ val => _("Options"), icon => "ic82-tape-40", clicked => sub {
Xconfig::various::various($in, $X->{card}, $options);
} },
diff --git a/perl-install/Xconfig/test.pm b/perl-install/Xconfig/test.pm
index 04074f042..0648a28b1 100644
--- a/perl-install/Xconfig/test.pm
+++ b/perl-install/Xconfig/test.pm
@@ -20,11 +20,17 @@ sub xtest {
}
sub test {
- my ($in, $raw_X, $card, $auto) = @_;
+ my ($in, $raw_X, $card, $auto, $skip_badcard) = @_;
- Xconfig::card::check_bad_card($card) or return 1;
- $in->ask_yesorno(_("Test of the configuration"), _("Do you want to test the configuration?"), 1) or return 1 if !$auto;
+ my $bad_card = !Xconfig::card::check_bad_card($card);
+ return 1 if $skip_badcard && $bad_card;
+ if ($bad_card || !$auto) {
+ my $msg =
+ $in->ask_yesorno(_("Test of the configuration"),
+ _("Do you want to test the configuration?") . ($bad_card ? "\n" . _("Warning: testing this graphic card may freeze your computer") : ''),
+ !$bad_card) or return 1;
+ }
unlink "$::prefix/tmp/.X9-lock";