summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-01-04 17:52:28 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-01-04 17:52:28 +0000
commitacd0d58172fbb8cbe748d91b5921b638bbcdd39f (patch)
treedea0fb12c79f8eb0f66abac8a656f120e51bbc77 /perl-install
parent6a82c5da31e65ffc53b75a7980b27e072534ecc6 (diff)
downloaddrakx-backup-do-not-use-acd0d58172fbb8cbe748d91b5921b638bbcdd39f.tar
drakx-backup-do-not-use-acd0d58172fbb8cbe748d91b5921b638bbcdd39f.tar.gz
drakx-backup-do-not-use-acd0d58172fbb8cbe748d91b5921b638bbcdd39f.tar.bz2
drakx-backup-do-not-use-acd0d58172fbb8cbe748d91b5921b638bbcdd39f.tar.xz
drakx-backup-do-not-use-acd0d58172fbb8cbe748d91b5921b638bbcdd39f.zip
some pixelization using the new if_
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfigurator.pm19
1 files changed, 10 insertions, 9 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 7ee74a6aa..6bd55004b 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -68,7 +68,7 @@ sub readCardsDB {
my $f = $fs->{$cmd};
- $f ? &$f() : log::l("unknown line $lineno ($_)");
+ $f ? $f->() : log::l("unknown line $lineno ($_)");
}
\%cards;
}
@@ -223,12 +223,12 @@ sub cardConfiguration(;$$$) {
code => sub { $card->{Utah_glx} = $card->{DRI_glx} = ''; $card->{use_xf4} = '';
log::l("Using XFree $xf3_ver") } };
my $msg = _("Which configuration of XFree do you want to have?");
- my @choices = $card->{use_xf4} ? (($card->{prefer_xf3} ? ($xf3_tc) : ()),
- (!$card->{prefer_xf3} || $::expert ?
- ({ text => _("XFree %s", $xf4_ver),
- code => sub { $card->{Utah_glx} = $card->{DRI_glx} = '';
- log::l("Using XFree $xf4_ver") } }) : (),),
- ($::expert && !$card->{prefer_xf3} ? ($xf3_tc) : ())) : ($xf3_tc);
+ my @choices = $card->{use_xf4} ? (if_($card->{prefer_xf3}, $xf3_tc),
+ if_(!$card->{prefer_xf3} || $::expert,
+ { text => _("XFree %s", $xf4_ver),
+ code => sub { $card->{Utah_glx} = $card->{DRI_glx} = '';
+ log::l("Using XFree $xf4_ver") } }),
+ if_(!$card->{prefer_xf3} && $::expert, $xf3_tc)) : $xf3_tc;
#- try to figure if 3D acceleration is supported
#- by XFree 3.3 but not XFree 4.0 then ask user to keep XFree 3.3 ?
@@ -458,7 +458,7 @@ sub testFinalConfig {
open STDERR, ">$f_err";
chroot $prefix if $prefix;
exec $o->{card}{prog},
- ($o->{card}{prog} !~ /Xsun/ ? ("-xf86config", ($::testing ? $tmpconfig : $f) . ($o->{card}{use_xf4} && "-4")) : ()),
+ if_($o->{card}{prog} !~ /Xsun/, "-xf86config", ($::testing ? $tmpconfig : $f) . ($o->{card}{use_xf4} && "-4")),
":9" or c::_exit(0);
}
@@ -1072,7 +1072,8 @@ sub main {
my %c = my @c = (
__("Change Monitor") => sub { $o->{monitor} = monitorConfiguration() },
__("Change Graphic card") => sub { $o->{card} = cardConfiguration('', 'noauto', $allowFB) },
- ($::expert ? (__("Change Server options") => sub { optionsConfiguration($o) }) : ()),
+ if_($::expert,
+ __("Change Server options") => sub { optionsConfiguration($o) }),
__("Change Resolution") => sub { resolutionsConfiguration($o) },
__("Show information") => sub { show_info($o) },
__("Test again") => sub { $ok = testFinalConfig($o, 1) },