From b638fa938299f4c7f04a46c5ecb80f4e9728202b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 28 Aug 2002 10:47:27 +0000 Subject: choose a good_default_monitor based on laptop-or-not (thanks to cosmic flo) --- perl-install/Xconfig/monitor.pm | 9 ++++++--- 1 file 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; } -- cgit v1.2.1