diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2002-09-03 10:48:41 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2002-09-03 10:48:41 +0000 |
commit | 552009d5013200f01753d71ef4904c0c3a7d2003 (patch) | |
tree | 2eb962c16f222bc5c249531cf6375dbf2051fdcf /perl-install/ugtk.pm | |
parent | 044e7a202bdba27bb4dc40f56cc7c9ad9627c511 (diff) | |
download | drakx-552009d5013200f01753d71ef4904c0c3a7d2003.tar drakx-552009d5013200f01753d71ef4904c0c3a7d2003.tar.gz drakx-552009d5013200f01753d71ef4904c0c3a7d2003.tar.bz2 drakx-552009d5013200f01753d71ef4904c0c3a7d2003.tar.xz drakx-552009d5013200f01753d71ef4904c0c3a7d2003.zip |
gtkcreate_png was too stupid to allow subdirectories for images,
fix it
Diffstat (limited to 'perl-install/ugtk.pm')
-rw-r--r-- | perl-install/ugtk.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/ugtk.pm b/perl-install/ugtk.pm index b8b7b4206..25e3b9f0a 100644 --- a/perl-install/ugtk.pm +++ b/perl-install/ugtk.pm @@ -17,7 +17,9 @@ my $use_pixbuf; my $use_imlib; my $use_gnome; -BEGIN { +BEGIN { + require Gtk; + Gtk->init; eval { require Gtk::Gdk::Pixbuf; Gtk::Gdk::Pixbuf->init }; $use_pixbuf = $@ ? 0 : 1; eval { require Gtk::Gdk::ImlibImage; Gtk::Gdk::ImlibImage->init }; @@ -26,8 +28,6 @@ BEGIN { $use_gnome = $@ ? 0 : 1; } -use Gtk; - use c; use log; use common; @@ -752,8 +752,8 @@ sub gtkcreate_png_pixbuf { sub gtkcreate_png { my ($f) = shift; - $f =~ m|.png$| or $f = "$f.png"; - if ($f !~ /\//) { -e "$_/$f" and $f = "$_/$f", last foreach icon_paths() } + $f =~ /\.png$/ or $f .= '.png'; + if ($f !~ /^\//) { -e "$_/$f" and $f = "$_/$f", last foreach icon_paths() } if ($use_imlib) { my $im = Gtk::Gdk::ImlibImage->load_image($f) or die "gtkcreate_png: missing png file $f"; $im->render($im->rgb_width, $im->rgb_height); |