summaryrefslogtreecommitdiffstats
path: root/perl-install/mygtk2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-09-18 13:45:04 +0000
committerThierry Vignaud <tv@mandriva.org>2008-09-18 13:45:04 +0000
commitd5cf7af735230250e2064ec9aca5f477a7bdbb14 (patch)
tree7dda65b9b070d522ec9ddbe741cd089443dde142 /perl-install/mygtk2.pm
parentb0e2254f4f5242735637cd2c4ff2a0dee191d4ba (diff)
downloaddrakx-d5cf7af735230250e2064ec9aca5f477a7bdbb14.tar
drakx-d5cf7af735230250e2064ec9aca5f477a7bdbb14.tar.gz
drakx-d5cf7af735230250e2064ec9aca5f477a7bdbb14.tar.bz2
drakx-d5cf7af735230250e2064ec9aca5f477a7bdbb14.tar.xz
drakx-d5cf7af735230250e2064ec9aca5f477a7bdbb14.zip
(_gtk__Image) simplify (and needed for next commit)
Diffstat (limited to 'perl-install/mygtk2.pm')
-rw-r--r--perl-install/mygtk2.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm
index 12eacbd61..b44e2af70 100644
--- a/perl-install/mygtk2.pm
+++ b/perl-install/mygtk2.pm
@@ -324,12 +324,8 @@ sub _gtk__Image {
$w->set_from_pixmap($pixmap, undef);
} : sub {
my ($w, $file, $o_size) = @_;
- if ($o_size) {
- my $pixbuf = gtknew('Pixbuf', file => $file, size => $o_size);
- $w->set_from_pixbuf($pixbuf);
- } else {
- $w->set_from_file($file);
- }
+ my $pixbuf = gtknew('Pixbuf', file => $file, if_($o_size, size => $o_size));
+ $w->set_from_pixbuf($pixbuf);
};
}