summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-28 10:47:27 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-28 10:47:27 +0000
commitb638fa938299f4c7f04a46c5ecb80f4e9728202b (patch)
tree7382de32ca6f6c42d0d894a2564fcdf59fa7337d /perl-install
parent88a221b243f12294099f66e8dd133ceea36bcdf1 (diff)
downloaddrakx-b638fa938299f4c7f04a46c5ecb80f4e9728202b.tar
drakx-b638fa938299f4c7f04a46c5ecb80f4e9728202b.tar.gz
drakx-b638fa938299f4c7f04a46c5ecb80f4e9728202b.tar.bz2
drakx-b638fa938299f4c7f04a46c5ecb80f4e9728202b.tar.xz
drakx-b638fa938299f4c7f04a46c5ecb80f4e9728202b.zip
choose a good_default_monitor based on laptop-or-not (thanks to cosmic flo)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/monitor.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/Xconfig/monitor.pm b/perl-install/Xconfig/monitor.pm
index c69f8b281..9b3eea507 100644
--- a/perl-install/Xconfig/monitor.pm
+++ b/perl-install/Xconfig/monitor.pm
@@ -9,8 +9,11 @@ use any;
use log;
-my $good_default_monitor = arch() !~ /ppc/ ? 'Generic|1024x768 @ 70 Hz' :
- detect_devices::get_mac_model =~ /^iBook/ ? 'Apple|iBook 800x600' : 'Apple|iMac/PowerBook 1024x768';
+sub good_default_monitor {
+ arch() =~ /ppc/ ?
+ (detect_devices::get_mac_model =~ /^iBook/ ? 'Apple|iBook 800x600' : 'Apple|iMac/PowerBook 1024x768') :
+ (detect_devices::isLaptop() ? 'Generic|Flat Panel 1024x768' : 'Generic|1024x768 @ 70 Hz');
+}
my @VertRefresh_ranges = ("50-70", "50-90", "50-100", "40-150");
@@ -80,7 +83,7 @@ sub choose {
my $merged_name = $monitor->{VendorName} . '|' . $monitor->{ModelName};
if (!exists $h_monitors{$merged_name}) {
- $merged_name = $monitor->{HorizSync} ? 'Custom' : $good_default_monitor;
+ $merged_name = $monitor->{HorizSync} ? 'Custom' : good_default_monitor();
} else {
$merged_name;
}