diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-02-15 16:59:46 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-02-15 16:59:46 +0000 |
commit | ad172199eda4e6ca5f5ffbabe4d9de948a2486a6 (patch) | |
tree | 0929370864fa3ff0d1c039e813ea2434340305bb /perl-install/my_gtk.pm | |
parent | 3d4ce953e244266a76156cfe0d3625972c7d77f0 (diff) | |
download | drakx-backup-do-not-use-ad172199eda4e6ca5f5ffbabe4d9de948a2486a6.tar drakx-backup-do-not-use-ad172199eda4e6ca5f5ffbabe4d9de948a2486a6.tar.gz drakx-backup-do-not-use-ad172199eda4e6ca5f5ffbabe4d9de948a2486a6.tar.bz2 drakx-backup-do-not-use-ad172199eda4e6ca5f5ffbabe4d9de948a2486a6.tar.xz drakx-backup-do-not-use-ad172199eda4e6ca5f5ffbabe4d9de948a2486a6.zip |
(gtkcreate_png): add error message, syntax cleanup
Diffstat (limited to 'perl-install/my_gtk.pm')
-rw-r--r-- | perl-install/my_gtk.pm | 6 |
1 files changed, 3 insertions, 3 deletions
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 |