summaryrefslogtreecommitdiffstats
path: root/perl-install/mygtk2.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-10 16:30:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-10 16:30:30 +0000
commit982655f7d9af04424f1baad2508121dc9d681d41 (patch)
treea0f88123373919c7abfcaa941dd71b1fe0f09c34 /perl-install/mygtk2.pm
parentdeaa2b3370d3d586dec6c1a2136bf66c2af555d1 (diff)
downloaddrakx-backup-do-not-use-982655f7d9af04424f1baad2508121dc9d681d41.tar
drakx-backup-do-not-use-982655f7d9af04424f1baad2508121dc9d681d41.tar.gz
drakx-backup-do-not-use-982655f7d9af04424f1baad2508121dc9d681d41.tar.bz2
drakx-backup-do-not-use-982655f7d9af04424f1baad2508121dc9d681d41.tar.xz
drakx-backup-do-not-use-982655f7d9af04424f1baad2508121dc9d681d41.zip
create {icon_no_error}
Diffstat (limited to 'perl-install/mygtk2.pm')
-rw-r--r--perl-install/mygtk2.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index de0a60810..bfb565170 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -415,9 +415,13 @@ sub _gtk_any_Window {
$w->set_border_width(delete $opts->{border_width}) if exists $opts->{border_width};
$w->set_shadow_type(delete $opts->{shadow_type}) if exists $opts->{shadow_type};
$w->set_position(delete $opts->{position_policy}) if exists $opts->{position_policy};
- if (my $name = delete $opts->{icon}) {
- my $f = _find_imgfile($name) or internal_error("can not find $name");
- $w->set_icon(gtknew('Pixbuf', file => $f));
+ my $icon_no_error = $opts->{icon_no_error};
+ if (my $name = delete $opts->{icon} || delete $opts->{icon_no_error}) {
+ if (my $f = _find_imgfile($name)) {
+ $w->set_icon(gtknew('Pixbuf', file => $f));
+ } elsif (!$icon_no_error) {
+ internal_error("can not find $name");
+ }
}
}
$w->set_title(delete $opts->{title}) if exists $opts->{title};