summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Gotti <jgotti@mandriva.com>2002-09-04 13:09:20 +0000
committerJonathan Gotti <jgotti@mandriva.com>2002-09-04 13:09:20 +0000
commit8ca03b886f5d2bcb0df81cd8852c59e569e6152c (patch)
treea5d15573580bed1dd3f6b15b2f573f316be54b7d
parent06e091c9c6cc6eaddc3ab55900a2af244eca1f8e (diff)
downloaddrakx-8ca03b886f5d2bcb0df81cd8852c59e569e6152c.tar
drakx-8ca03b886f5d2bcb0df81cd8852c59e569e6152c.tar.gz
drakx-8ca03b886f5d2bcb0df81cd8852c59e569e6152c.tar.bz2
drakx-8ca03b886f5d2bcb0df81cd8852c59e569e6152c.tar.xz
drakx-8ca03b886f5d2bcb0df81cd8852c59e569e6152c.zip
replace convert dependencies by gdk-pixbuf dependencies
-rw-r--r--perl-install/bootlook.pm25
1 files changed, 16 insertions, 9 deletions
diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm
index f5ad0cddc..75c772f60 100644
--- a/perl-install/bootlook.pm
+++ b/perl-install/bootlook.pm
@@ -22,6 +22,7 @@
use MDK::Common;
use Gtk;
+use Gtk::Gdk::Pixbuf;
use Config;
init Gtk;
use POSIX;
@@ -102,7 +103,8 @@ my %themes = ('path'=>'/usr/share/bootsplash/themes/',
'lilo'=>{'file'=>'/lilo/message',
'thumb'=>'/lilo/thumb.png'} ,
'boot'=>{'path'=>'/images/',
- 'thumb'=>'/images/thumb.png',},
+ #'thumb'=>'/images/thumb.png',
+ },
);
my ($cur_res) = cat_('/etc/lilo.conf') =~ /vga=(.*)/;
@@ -137,9 +139,12 @@ foreach (keys (%combo)) {
$combo{'thms'}->set_popdown_strings(@thms);
$combo{'lilo'}->set_popdown_strings(@lilo_thms);
$combo{'boot'}->set_popdown_strings(@boot_thms);
+my $lilo_pixbuf = new_from_file Gtk::Gdk::Pixbuf($themes{'def_thmb'});
+my $lilo_pic = new Gtk::Pixmap($lilo_pixbuf->render_pixmap_and_mask(0),'');#gtkcreate_png($themes{'def_thmb'}));
+
+my $boot_pixbuf = new_from_file Gtk::Gdk::Pixbuf($themes{'def_thmb'});
+my $boot_pic = new Gtk::Pixmap($boot_pixbuf->render_pixmap_and_mask(0),'');#gtkcreate_png($themes{'def_thmb'}));
-my $lilo_pic = new Gtk::Pixmap(gtkcreate_png($themes{'def_thmb'}));
-my $boot_pic = new Gtk::Pixmap(gtkcreate_png($themes{'def_thmb'}));
my $thm_button = new Gtk::Button(_("Install themes"));
my $logo_thm = new Gtk::CheckButton(_("Display theme under console"));
my $B_create = new Gtk::Button(_("Create new theme"));
@@ -160,15 +165,17 @@ $combo{'thms'}->entry->signal_connect(changed => sub {
$combo{'lilo'}->entry->signal_connect(changed => sub {
my $new_file = $themes{'path'} . $combo{'lilo'}->entry->get_text() . $themes{'lilo'}{'thumb'};
- $lilo_pic->set(gtkcreate_png(-r $new_file ? $new_file : $themes{'def_thmb'}));
+ undef($lilo_pixbuf);
+ $lilo_pixbuf = new_from_file Gtk::Gdk::Pixbuf(-r $new_file ? $new_file : $themes{'def_thmb'});
+ $lilo_pic->set($lilo_pixbuf->render_pixmap_and_mask(0),'');
});
$combo{'boot'}->entry->signal_connect( changed => sub {
- my $new_file = $themes{'path'}.$combo{'boot'}->entry->get_text().$themes{'boot'}{'thumb'};
- if (! -f $new_file && -f $themes{'path'}.$combo{'boot'}->entry->get_text().$themes{'boot'}{'path'}."bootsplash-$cur_res.jpg"){
- system("convert -scale 159x119 ".$themes{'path'}.$combo{'boot'}->entry->get_text().$themes{'boot'}{'path'}."bootsplash-$cur_res.jpg $new_file") and $in->ask_warn(_("Error"),_("Can't create Bootsplash preview"));
- }
- $boot_pic->set(gtkcreate_png(-r $new_file ? $new_file : $themes{'def_thmb'}));
+ local $img_file = $themes{'path'}.$combo{'boot'}->entry->get_text().$themes{'boot'}{'path'}."bootsplash-$cur_res.jpg";
+ undef($boot_pixmap);
+ $boot_pixmap = new_from_file Gtk::Gdk::Pixbuf(-r $new_file ? $new_file : $img_file);
+ $boot_pixmap = $boot_pixmap->scale_simple(159,119,0);
+ $boot_pic->set($boot_pixmap->render_pixmap_and_mask(0),'');
});
$combo{'thms'}->entry->set_text($themes{'default'});