summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-08-20 20:13:36 +0000
committerOlivier Blin <oblin@mandriva.com>2007-08-20 20:13:36 +0000
commit75e462557cd824504f8a5b7c713924bf8e52cfa2 (patch)
tree5607b7d64f7aa5821ee8925cf6d058b81a26bfa4 /perl-install/ugtk2.pm
parent7fbad81c1334b8345e2e217cd8a48c31b40a9a81 (diff)
downloaddrakx-75e462557cd824504f8a5b7c713924bf8e52cfa2.tar
drakx-75e462557cd824504f8a5b7c713924bf8e52cfa2.tar.gz
drakx-75e462557cd824504f8a5b7c713924bf8e52cfa2.tar.bz2
drakx-75e462557cd824504f8a5b7c713924bf8e52cfa2.tar.xz
drakx-75e462557cd824504f8a5b7c713924bf8e52cfa2.zip
allow to specify size when creating pixbufs and images
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index d156bc03d..fe20ca05a 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -605,12 +605,14 @@ sub _find_imgfile {
# use it if you want to display an icon/image in your app
sub gtkcreate_img {
- gtknew('Image', file => $_[0]);
+ my ($file, $o_size) = @_;
+ gtknew('Image', file => $file, if_($o_size, size => $o_size));
}
# use it if you want to draw an image onto a drawingarea
sub gtkcreate_pixbuf {
- gtknew('Pixbuf', file => $_[0]);
+ my ($file, $o_size) = @_;
+ gtknew('Pixbuf', file => $_[0], if_($o_size, size => $o_size));
}
sub gtktext_append { gtktext_insert(@_, append => 1) }