From ad172199eda4e6ca5f5ffbabe4d9de948a2486a6 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 15 Feb 2001 16:59:46 +0000 Subject: (gtkcreate_png): add error message, syntax cleanup --- perl-install/my_gtk.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 69c0d1b95..a125421b9 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -34,7 +34,7 @@ sub new { my ($type, $title, %opts) = @_; Gtk->init; - init Gtk::Gdk::ImlibImage; + Gtk::Gdk::ImlibImage->init; Gtk->set_locale; my $o = bless { %opts }, $type; $o->_create_window($title); @@ -271,13 +271,13 @@ sub gtkcreate_xpm { } sub gtkcreate_png { my ($f) = @_; - my $im = load_image Gtk::Gdk::ImlibImage("$f"); + my $im = Gtk::Gdk::ImlibImage->load_image($f) or die "gtkcreate_png: missing png file $f"; $im->render($im->rgb_width, $im->rgb_height); ($im->move_image(), $im->move_mask); } sub xpm_d { my $w = shift; Gtk::Gdk::Pixmap->create_from_xpm_d($w->window, undef, @_) } sub gtkxpm { new Gtk::Pixmap(gtkcreate_xpm(@_)) } -sub gtkpng { new Gtk::Pixmap (gtkcreate_png(@_)) } +sub gtkpng { new Gtk::Pixmap(gtkcreate_png(@_)) } #-############################################################################### #- createXXX functions -- cgit v1.2.1