From 969469b7c94f420adda2705769f44fe0c3abd47e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 19 Sep 2000 13:20:57 +0000 Subject: no_comment --- perl-install/ChangeLog | 31 ++++++++++- perl-install/Xconfigurator.pm | 92 +++---------------------------- perl-install/install2.pm | 8 +-- perl-install/install_steps_interactive.pm | 26 +++++++-- perl-install/mouse.pm | 2 +- 5 files changed, 64 insertions(+), 95 deletions(-) (limited to 'perl-install') diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index ea247c712..4941f93d9 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,4 +1,33 @@ -2000-09-18 Pixel +2000-09-19 Pixel + + * install2.pm (miscellaneous): renamed LITTLE_FRIED_OIGNONS by + META_CLASS + + * Xconfigurator.pm (cardConfiguration): when ddcxinfos gives false + result (not enough VideoRam), also remove the found resolutions + * Xconfigurator.pm (main): remove the automatic searching of + resolutions + * Xconfigurator.pm (resolutionsConfiguration): cleanup, remove the + automatic searching of resolutions. + + * mouse.pm (fullnames): changed the `_' in `[' before Other + (nicer, uh?) + + * install2.pm (selectMouse): changed clicked to !first_time + +2000-09-19 DrakX + + * snapshot uploaded + +2000-09-19 Pixel + + * Xconfigurator.pm (testFinalConfig): remove the bloody prototype + +2000-09-19 DrakX + + * snapshot uploaded + +2000-09-18 Dam's * Xconfigurator (autologin): do it eve, if newbie. Autologin is now in separated function. diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 999ff1919..d094f27fe 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -182,8 +182,8 @@ sub cardConfiguration(;$$$) { updateCardAccordingName($card, $card->{type}) if $card->{type}; add2hash($card, { vendor => "Unknown", board => "Unknown" }); - $card->{memory} = 4096 if $card->{memory} <= 1024 && $card->{driver} eq "i810"; - $card->{memory} = 16384 if $card->{memory} <= 1024 && $card->{chipset} =~ /PERMEDIA/; + $card->{memory} = 4096, delete $card->{depth} if $card->{memory} <= 1024 && $card->{driver} eq "i810"; + $card->{memory} = 16384, delete $card->{depth} if $card->{memory} <= 1024 && $card->{chipset} =~ /PERMEDIA/; #- 3D acceleration configuration for XFree 3.3 using Utah-GLX. $card->{Utah_glx} = ($card->{identifier} =~ /Matrox.* G[24]00/ || #- 8bpp does not work. @@ -385,7 +385,7 @@ sub testConfig($) { ($resolutions, $clocklines); } -sub testFinalConfig($;$$) { +sub testFinalConfig { my ($o, $auto, $skiptest, $skip_badcard) = @_; $o->{monitor}{hsyncrange} && $o->{monitor}{vsyncrange} or @@ -498,37 +498,6 @@ sub testFinalConfig($;$$) { $rc; } -sub autoResolutions($;$) { - my ($o, $nowarning) = @_; - my $card = $o->{card}; - - $nowarning || $in->ask_okcancel(_("Automatic resolutions"), -_("To find the available resolutions I will try different ones. -Your screen will blink... -You can switch if off if you want, you'll hear a beep when it's over"), 1) or return; - - #- swith to virtual console 1 (hopefully not X :) - my $vt = setVirtual(1); - - #- Configure the modes order. - my ($ok, $best); - foreach (reverse @depths) { - local $o->{default_depth} = $_; - - my ($resolutions, $clocklines) = eval { testConfig($o) }; - if ($@ || !$resolutions) { - delete $card->{depth}{$_}; - } else { - $card->{clocklines} ||= $clocklines unless $card->{flags}{noclockprobe}; - $card->{depth}{$_} = [ @$resolutions ]; - } - } - - #- restore the virtual console - setVirtual($vt); - local $| = 1; print "\a"; #- beeeep! -} - sub autoDefaultDepth($$) { my ($card, $wres_wanted) = @_; my ($best, $depth); @@ -639,8 +608,8 @@ sub chooseResolutions($$;$) { } -sub resolutionsConfiguration($%) { - my ($o, %options) = @_; +sub resolutionsConfiguration { + my ($o, $auto) = @_; my $card = $o->{card}; #- For the mono and vga16 server, no further configuration is required. @@ -655,49 +624,10 @@ sub resolutionsConfiguration($%) { $o->{default_depth} = max(keys %{$card->{depth}}); return 1; #- aka we cannot test, assumed as good (should be). } - - #- some of these guys hate to be poked - #- if we dont know then its at the user's discretion - #-my $manual ||= - #- $card->{server} =~ /^(TGA|Mach32)/ || - #- $card->{name} =~ /^Riva 128/ || - #- $card->{chipset} =~ /^(RIVA128|mgag)/ || - #- $::expert; - #- - #-my $unknown = - #- member($card->{server}, qw(S3 S3V I128 Mach64)) || - #- member($card->{type}, - #- "Matrox Millennium (MGA)", - #- "Matrox Millennium II", - #- "Matrox Millennium II AGP", - #- "Matrox Mystique", - #- "Matrox Mystique", - #- "S3", - #- "S3V", - #- "I128", - #- ) || - #- $card->{type} =~ /S3 ViRGE/; - #- - #-$unknown and $manual ||= !$in->ask_okcancel('', [ _("I can try to autodetect information about graphic card, but it may freeze :("), - #- _("Do you want to try?") ]); - if (is_empty_hash_ref($card->{depth})) { $card->{depth}{$_} = [ map { [ split "x" ] } @resolutions ] foreach @depths; - - unless ($options{noauto}) { - if ($options{nowarning} || $in->ask_okcancel(_("Automatic resolutions"), -_("I can try to find the available resolutions (eg: 800x600). -Sometimes, though, it may hang the machine. -Do you want to try?"), 1)) { - autoResolutions($o, $options{nowarning}); - is_empty_hash_ref($card->{depth}) and $in->ask_warn('', -_("No valid modes found -Try with another video card or monitor")), return; - } - } } - #- sort resolutions in each depth foreach (values %{$card->{depth}}) { my $i = 0; @@ -715,11 +645,11 @@ Try with another video card or monitor")), return; $wres ||= max map { first(grep { $_->[0] <= $wres } @$_)->[0] } values %{$card->{depth}}; my $depth = eval { $o->{default_depth} || autoDefaultDepth($card, $wres) }; - $options{auto} or ($depth, $wres) = chooseResolutions($card, $depth, $wres) or return; + $auto or ($depth, $wres) = chooseResolutions($card, $depth, $wres) or return; unless ($wres) { delete $card->{depth}; - return resolutionsConfiguration($o, noauto => 1); + return resolutionsConfiguration($o); } #- needed in auto mode when all has been provided by the user @@ -1093,7 +1023,7 @@ sub main { $o->{monitor} = monitorConfiguration($o->{monitor}, $o->{card}{server} eq 'FBDev'); } - my $ok = resolutionsConfiguration($o, auto => $::auto, noauto => $::noauto); + my $ok = resolutionsConfiguration($o, $::auto); $ok &&= testFinalConfig($o, $::auto, $o->{skiptest}, $::auto); @@ -1104,11 +1034,7 @@ sub main { __("Change Monitor") => sub { $o->{monitor} = monitorConfiguration() }, __("Change Graphic card") => sub { $o->{card} = cardConfiguration('', 'noauto', $allowFB) }, ($::expert ? (__("Change Server options") => sub { optionsConfiguration($o) }) : ()), - __("Change Resolution") => sub { resolutionsConfiguration($o, noauto => 1) }, - __("Automatical resolutions search") => sub { - delete $o->{card}{depth}; - resolutionsConfiguration($o, nowarning => 1); - }, + __("Change Resolution") => sub { resolutionsConfiguration($o) }, __("Show information") => sub { show_info($o) }, __("Test again") => sub { $ok = testFinalConfig($o, 1) }, __("Quit") => sub { $quit = 1 }, diff --git a/perl-install/install2.pm b/perl-install/install2.pm index 5cf71174b..4d3a78092 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -211,11 +211,11 @@ sub selectLanguage { #------------------------------------------------------------------------------ sub selectMouse { $::live and return; - my ($clicked) = $_[0]; + my ($first_time) = $_[1] == 1; - add2hash($o->{mouse} ||= {}, mouse::read($o->{prefix})) if $o->{isUpgrade} && !$clicked; + add2hash($o->{mouse} ||= {}, mouse::read($o->{prefix})) if $o->{isUpgrade} && $first_time; - $o->selectMouse($clicked); + $o->selectMouse(!$first_time); addToBeDone { mouse::write($o->{prefix}, $o->{mouse}) } 'installPackages'; } @@ -352,7 +352,7 @@ sub miscellaneous { CLASS => $::expert && "expert" || $::beginner && "beginner" || "medium", TYPE => $o->{installClass}, SECURITY => $o->{security}, - LITTLE_OIGNONS_WELL_FRIED => 'PowerPack', # Desktop + META_CLASS => $o->{meta_class} || 'PowerPack', }); my $f = "$o->{prefix}/etc/sysconfig/usb"; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 0093a1441..64cfa1ea9 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -1,3 +1,4 @@ + package install_steps_interactive; # $Id$ @@ -138,7 +139,7 @@ are you ready to answer that kind of questions?"), ); $o->set_help('selectInstallClass2'); $o->{installClass} = $o->ask_from_listf(_("Install Class"), - _("Which usage is your system used for ?"), + _("What is your system used for?"), sub { $c{$_[0]} }, [ keys %c ], $o->{installClass}); @@ -350,16 +351,29 @@ sub choosePackages { my $max_size = 1 + $size; #- avoid division by zero. my $size2install = min($availableC, do { - if ($::beginner) { - my @l = (300, 700, round_up(min($max_size, $availableC) / sqr(1024), 100)); - $l[2] > $l[1] + 200 or splice(@l, 1, 1); #- not worth proposing too alike stuff - $l[1] > $l[0] + 100 or splice(@l, 0, 1); - my @text = (__("Minimum (%dMB)"), __("Recommended (%dMB)"), __("Complete (%dMB)")); + my $max = round_up(min($max_size, $availableC) / sqr(1024), 100); + + if ($::beginner) { + my (@l, @text); + if ($o->{meta_class} eq 'desktop') { + @l = (500, 800, 0); + @text = (__("Minimum (%dMB)"), __("Complete (%dMB)"), __("Custom")); + $max > $l[1] or splice(@l, 1, 1), splice(@text, 1, 1); + $max > $l[0] or @l = $max; + } else { + @l = (300, 700, $max); + @text = (__("Minimum (%dMB)"), __("Recommended (%dMB)"), __("Complete (%dMB)")); + $l[2] > $l[1] + 200 or splice(@l, 1, 1); #- not worth proposing too alike stuff + $l[1] > $l[0] + 100 or splice(@l, 0, 1); + } $o->ask_from_listf('', _("Select the size you want to install"), sub { _ ($text[$_[1]], $_[0]) }, \@l, $l[1]) * sqr(1024); } else { $o->chooseSizeToInstall($packages, $min_size, $max_size, $availableC, $individual) || goto &choosePackages; } }); + if (!$size2install) { #- special case for desktop + $o->chooseGroups($packages, $compssUsers, $compssUsersSorted, \$individual); + } ($o->{packages_}{ind}) = pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, $min_mark, $size2install, $o->{installClass}); } diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm index cc9c3b948..a1debd013 100644 --- a/perl-install/mouse.pm +++ b/perl-install/mouse.pm @@ -122,7 +122,7 @@ sub fullnames { my $l = raw2mouse($type, $_); "$type|$l->{name}"; } else { - $type .= '|_' . _("Other"); + $type .= "|[" . _("Other"); ''; } } @{$::b->[1]} -- cgit v1.2.1