summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/resolution_and_depth.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-07 13:22:28 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-07 13:22:28 +0000
commitc2f200920f04dba0874c054038770a91a71fbba5 (patch)
tree7448485cea94afcd511535b592b1f061c543f3b9 /perl-install/Xconfig/resolution_and_depth.pm
parent0a813b0ea3c7c30ca81e79b6303f5141e95fee4b (diff)
downloaddrakx-c2f200920f04dba0874c054038770a91a71fbba5.tar
drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.gz
drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.bz2
drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.xz
drakx-c2f200920f04dba0874c054038770a91a71fbba5.zip
use "if any" instead of "if grep", and various other occurences of "any", "every", "partition"
Diffstat (limited to 'perl-install/Xconfig/resolution_and_depth.pm')
-rw-r--r--perl-install/Xconfig/resolution_and_depth.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/Xconfig/resolution_and_depth.pm b/perl-install/Xconfig/resolution_and_depth.pm
index 1461f64be..ea859b5c7 100644
--- a/perl-install/Xconfig/resolution_and_depth.pm
+++ b/perl-install/Xconfig/resolution_and_depth.pm
@@ -163,7 +163,7 @@ sub choices {
#- finding it in @resolutions (well @matching)
#- (that way, we check it exists, and we get field "bios" for fbdev)
my @default_resolutions = sort { $b->{Y} <=> $a->{Y} } grep { $_->{Depth} eq $Depth } @matching;
- my $default_resolution = first(grep { $resolution_wanted->{Y} eq $_->{Y} } @default_resolutions) || $default_resolutions[0];
+ my $default_resolution = (find { $resolution_wanted->{Y} eq $_->{Y} } @default_resolutions) || $default_resolutions[0];
$default_resolution, @resolutions;
}
@@ -243,7 +243,7 @@ sub choose_gtk {
$chosen_y_res = $_[1];
} else {
#- take one
- my ($one) = grep { $_->{X} eq $chosen_x_res } @resolutions;
+ my $one = find { $_->{X} eq $chosen_x_res } @resolutions;
$chosen_y_res = $one->{Y};
}
my $image = $monitor_images_x_res{$chosen_x_res} or internal_error("no image for resolution $chosen_x_res");
@@ -303,9 +303,9 @@ sub choose_gtk {
$x_res_combo->entry->set_text($chosen_x_res . "x" . $chosen_y_res);
$W->main or return;
- first(grep { $_->{X} == $chosen_x_res &&
- $_->{Y} == $chosen_y_res &&
- $_->{Depth} == $chosen_Depth } @resolutions);
+ find { $_->{X} == $chosen_x_res &&
+ $_->{Y} == $chosen_y_res &&
+ $_->{Depth} == $chosen_Depth } @resolutions);
}
1;