From 5820f0fd91c7081971d66edcb3e173f04597204d Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 1 Dec 1999 18:27:36 +0000 Subject: *** empty log message *** --- perl-install/Xconfigurator.pm | 1 + perl-install/install_any.pm | 34 +++++++++++++++++++++++++++++++++- perl-install/install_steps.pm | 5 +++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 626ccd7bb..822f51534 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -563,6 +563,7 @@ Try with another video card or monitor")), return; #- otherwise there'll be a virtual screen :( $card->{depth}{$depth} = [ grep { $_->[0] <= $wres } @{$card->{depth}{$depth}} ]; $card->{default_depth} = $depth; + $card->{default_wres} = $wres; $card->{vga_mode} = $vgamodes{"${wres}xx$depth"} || $vgamodes{"${res}x$depth"}; #- for use with frame buffer. 1; } diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 00d869cff..7e176fbbe 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -513,7 +513,39 @@ sub template2userfile($$$$%) { } } -sub kdeicons_postinstall { +sub kderc_largedisplay($) { + my ($prefix) = @_; + + foreach ("/etc/skel", "/root", list_home($prefix)) { + my ($inputfile, $outputfile) = ("$prefix$_/.kderc", "$prefix$_/.kderc.new"); + my %subst = ( contrast => "Contrast=7\n", + kfmiconstyle => "kfmIconStyle=Large\n", + kpaneliconstyle => "kpanelIconStyle=Large\n", + kdeiconstyle => "KDEIconStyle=Large\n", + ); + + local *INFILE; local *OUTFILE; + open INFILE, $inputfile or return; + open OUTFILE, ">$outputfile" or return; + + print OUTFILE map { + if (my $i = /^\s*\[KDE\]/ ... /^\s*\[/) { + if (/^\s*(\w*)=/ && $subst{lc($1)}) { + delete $subst{lc($1)}; + } else { + ($i > 1 && /^\s*\[/ && join '', values %subst). $_; + } + } else { + $_; + } + } ; + + unlink $inputfile; + rename $outputfile, $inputfile; + } +} + +sub kdeicons_postinstall($) { my ($prefix) = @_; #- parse etc/fstab file to search for dos/win, zip, cdroms icons. diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 50ebd11b4..669683cb6 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -543,9 +543,14 @@ sub setupXfreeAfter { my ($o) = @_; if ($o->{X}{card}{server} eq 'FBDev') { unless (install_any::setupFB($o, Xconfigurator::getVGAMode($o->{X}))) { + log::l("disabling automatic start-up of X11 if any as setup framebuffer failed"); Xconfigurator::rewriteInittab(3) unless $::testing; #- disable automatic start-up of X11 on error. } } + if ($o->{X}{card}{default_depth} >= 16 || $o->{X}{card}{default_wres} >= 1024) { + log::l("setting large icon style for kde"); + install_any::kderc_largedisplay($o->{prefix}); + } } #------------------------------------------------------------------------------ -- cgit v1.2.1