summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 5bed679b1..dffd5d674 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -600,12 +600,12 @@ sub _find_imgfile {
# use it if you want to display an icon/image in your app
sub gtkcreate_img {
- return Gtk2::Image->new_from_file(_find_imgfile(@_));
+ return Gtk2::Image->new_from_file(_find_imgfile(@_) || internal_error("can't find $_[0]"));
}
# use it if you want to draw an image onto a drawingarea
sub gtkcreate_pixbuf {
- return Gtk2::Gdk::Pixbuf->new_from_file(_find_imgfile(@_));
+ return Gtk2::Gdk::Pixbuf->new_from_file(_find_imgfile(@_) || internal_error("can't find $_[0]"));
}
sub gtktext_append { gtktext_insert(@_, append => 1) }
@@ -970,7 +970,7 @@ sub main {
my ($o, $o_completed, $o_canceled) = @_;
gtkset_mousecursor_normal();
my $timeout = Glib::Timeout->add(1000, sub { gtkset_mousecursor_normal(); 1 });
- my $_b = MDK::Common::Func::before_leaving { Glib::Source->remove($timeout) };
+ my $_b = MDK::Common::Func::before_leaving { $o->destroy; Glib::Source->remove($timeout) };
$o->show;
do {