summaryrefslogtreecommitdiffstats
path: root/perl-install/bootlook.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-02-20 16:45:05 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-02-20 16:45:05 +0000
commitf946424df078efcdca74f852a1e4ce34c96752f5 (patch)
tree3b0a049706e3ee34268b259691d29405275dea06 /perl-install/bootlook.pm
parentb0745a0495f5df97d4e143bfba83bcf7f6586927 (diff)
downloaddrakx-backup-do-not-use-f946424df078efcdca74f852a1e4ce34c96752f5.tar
drakx-backup-do-not-use-f946424df078efcdca74f852a1e4ce34c96752f5.tar.gz
drakx-backup-do-not-use-f946424df078efcdca74f852a1e4ce34c96752f5.tar.bz2
drakx-backup-do-not-use-f946424df078efcdca74f852a1e4ce34c96752f5.tar.xz
drakx-backup-do-not-use-f946424df078efcdca74f852a1e4ce34c96752f5.zip
- add --testing support
- fix #1923 (aka reuse consolided code instead of using deprecated code) - minor cleanup - skip comments while parsing /etc/lilo.conf
Diffstat (limited to 'perl-install/bootlook.pm')
-rw-r--r--perl-install/bootlook.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm
index 86115149f..2736befa0 100644
--- a/perl-install/bootlook.pm
+++ b/perl-install/bootlook.pm
@@ -93,7 +93,7 @@ my %themes = ('path' => '/usr/share/bootsplash/themes/',
#'thumb'=>'/images/thumb.png',
},
);
-my ($cur_res) = cat_('/etc/lilo.conf') =~ /vga=(.*)/;
+my $cur_res = top(cat_('/etc/lilo.conf') =~ /[^#]*vga=(.*)/);
#- verify that current resolution is ok
if (member( $cur_res, qw( 785 788 791 794))) {
($cur_res) = $bootloader::vga_modes{$cur_res} =~ /^([0-9x]+).*?$/;
@@ -103,6 +103,7 @@ if (member( $cur_res, qw( 785 788 791 794))) {
#- and check that lilo is the correct loader
$no_bootsplash ||= chomp_(`detectloader -q`) ne 'LILO';
+$no_bootsplash = 0 if $::testing;
my @thms;
my @lilo_thms = if_(!$themes{default}, qw(default));
my @boot_thms = if_(!$themes{default}, qw(default));
@@ -125,7 +126,7 @@ $combo{thms}->set_popdown_strings(@thms);
$combo{lilo}->set_popdown_strings(@lilo_thms);
$combo{boot}->set_popdown_strings(@boot_thms) if !$no_bootsplash;
-my ($lilo_pixbuf, $boot_pixmap);
+my $lilo_pixbuf;
my $lilo_pic = gtkcreate_img($themes{def_thmb});
my $boot_pixbuf;
@@ -160,10 +161,7 @@ $combo{lilo}->entry->signal_connect(changed => sub {
$no_bootsplash == 0
and $combo{boot}->entry->signal_connect( changed => sub {
my $img_file = $themes{path}.$combo{boot}->entry->get_text().$themes{boot}{path}."bootsplash-$cur_res.jpg";
- undef($boot_pixmap);
- $boot_pixmap = gtkcreate_pixbuf( $img_file);
- $boot_pixmap = $boot_pixmap->scale_simple(155, 116, 'nearest');
- $boot_pic->set($boot_pixmap->render_pixmap_and_mask(0), '');
+ $boot_pic = gtkcreate_img( $img_file);
});
$combo{thms}->entry->set_text($themes{default});