diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-10-18 17:21:35 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-10-18 17:21:35 +0000 |
commit | 0e1b8cf1aaee15aa9b189b9e629ed47b03e0242e (patch) | |
tree | d3ede1cc68b7c3ede9ed7c075a005f8354d50046 | |
parent | 9a68bd7266672ca30196ac2338edd12a8e782d97 (diff) | |
download | drakx-0e1b8cf1aaee15aa9b189b9e629ed47b03e0242e.tar drakx-0e1b8cf1aaee15aa9b189b9e629ed47b03e0242e.tar.gz drakx-0e1b8cf1aaee15aa9b189b9e629ed47b03e0242e.tar.bz2 drakx-0e1b8cf1aaee15aa9b189b9e629ed47b03e0242e.tar.xz drakx-0e1b8cf1aaee15aa9b189b9e629ed47b03e0242e.zip |
perl_checker cleanups
-rw-r--r-- | perl-install/bootsplash.pm | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/perl-install/bootsplash.pm b/perl-install/bootsplash.pm index 53cff9590..b80947b64 100644 --- a/perl-install/bootsplash.pm +++ b/perl-install/bootsplash.pm @@ -110,20 +110,19 @@ sub theme_read_config_for_resolution { my ($theme, $res) = @_; my $file = theme_get_config_for_resolution($theme, $res); my $contents = cat_($file); - my ($bgcolor) = $contents =~ /^bgcolor=(\d+)/m; my ($pb_x1, $pb_y1, $pb_x2, $pb_y2, $pbg_c, $ptransp) = $contents =~ /^box\s+silent\s+noover\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(#\w{6})(\w{2})/m; my ($tb_x1, $tb_y1, $tb_x2, $tb_y2, $tc, $transp) = $contents =~ /^box\s+noover\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(#\w{6})(\w{2})/m; - my ($pc1, $pc2, $pc3, $pc4) = $contents =~ /^box\s+silent\s+inter\s+\d+\s+\d+\s+\d+\s+\d+\s+(#\w+)\s+(#\w+)\s+(#\w+)\s+(#\w+)/m; + my ($pc1, $pc2, $pc3, $_pc4) = $contents =~ /^box\s+silent\s+inter\s+\d+\s+\d+\s+\d+\s+\d+\s+(#\w+)\s+(#\w+)\s+(#\w+)\s+(#\w+)/m; my ($text_color) = $contents =~ /^text_color=0x(\w+)/m; my $gradient; if ($pc1 eq $pc2) { $gradient = 'vertical'; - $pc2 = $pc3 + $pc2 = $pc3; } { pc1 => $pc1, pc2 => $pc2, gradient => $gradient, transp => hex $transp, ptransp => hex $ptransp, tb_x => $tb_x1, tb_y => $tb_y1, tb_w => $tb_x2 - $tb_x1, tb_h => $tb_y2 - $tb_y1, tc => $tc, pbg_c => $pbg_c, px => $pb_x1, pw => $pb_x2 - $pb_x1, py => $pb_y1, ph => $pb_y2 - $pb_y1, - getVarsFromSh($file), text_color => "#$text_color" } + getVarsFromSh($file), text_color => "#$text_color" }; } sub theme_write_config_for_resolution { @@ -135,22 +134,22 @@ sub theme_write_config_for_resolution { # progress/text rectangles border/inter coordinates my ($pb_x1, $pb_x2, $pb_y1, $pb_y2) = ($conf->{px}, $conf->{px} + $conf->{pw}, $conf->{py}, $conf->{py} + $conf->{ph}); - my ($pi_x1, $pi_x2, $pi_y1, $pi_y2) = ($pb_x1 + 1, $pb_x2 - 1, $pb_y1 + 1, $pb_y2 - 1); + my ($pi_y1, $pi_y2) = ($pb_y1 + 1, $pb_y2 - 1); my ($tb_x1, $tb_y1, $tb_x2, $tb_y2) = ($conf->{tb_x}, $conf->{tb_y}, $conf->{tb_x} + $conf->{tb_w}, $conf->{tb_y} + $conf->{tb_h}); my ($tx, $ty, $tw, $th) = ($tb_x1 + 10, $tb_y1 + 5, $conf->{tb_w} - 20 , $conf->{tb_h} - 10); my ($ti_x1, $ti_x2, $ti_y1, $ti_y2) = ($tb_x1 - 1, $tb_x2 + 1, $tb_y1 + 1, $tb_y2 + 1); my ($pc1, $pc2, $pc3, $pc4); if ($conf->{gradient} eq 'vertical') { - ($pc1, $pc2, $pc3, $pc4) = ($conf->{pc1}, $conf->{pc1}, $conf->{pc2}, $conf->{pc2}) + ($pc1, $pc2, $pc3, $pc4) = ($conf->{pc1}, $conf->{pc1}, $conf->{pc2}, $conf->{pc2}); } else { - ($pc1, $pc2, $pc3, $pc4) = ($conf->{pc1}, $conf->{pc2}, $conf->{pc1}, $conf->{pc2}) + ($pc1, $pc2, $pc3, $pc4) = ($conf->{pc1}, $conf->{pc2}, $conf->{pc1}, $conf->{pc2}); } if (!$pc1) { ($pc1, $pc2, $pc3, $pc4) = ('#ffffff', '#ffffff', '#000000', '#000000') } my $ptransp = sprintf '%02x', $conf->{ptransp}; my $transp = sprintf '%02x', $conf->{transp}; $conf->{pbg_c} ||= '#aaaaaa'; $conf->{tc} ||= '#ffffff'; - $text_color = $conf->{text_color} ? "0x$conf->{text_color}" : '0xaaaaaa'; + my $text_color = $conf->{text_color} ? "0x$conf->{text_color}" : '0xaaaaaa'; $text_color =~ s/#//; output($config, qq(# This is the configuration file for the $res bootsplash picture |