diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-08-20 19:03:40 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-08-20 19:03:40 +0000 |
commit | d0783fce4aa3092d6a83ddead3e0224c16df82b9 (patch) | |
tree | f0083e74074c3d3039e61fe44141d6bcd4b6801a | |
parent | 9c62f6e1ca3d30509924b175525f40cca7c0a6bd (diff) | |
download | drakx-d0783fce4aa3092d6a83ddead3e0224c16df82b9.tar drakx-d0783fce4aa3092d6a83ddead3e0224c16df82b9.tar.gz drakx-d0783fce4aa3092d6a83ddead3e0224c16df82b9.tar.bz2 drakx-d0783fce4aa3092d6a83ddead3e0224c16df82b9.tar.xz drakx-d0783fce4aa3092d6a83ddead3e0224c16df82b9.zip |
use set_image() to set button image, to be able to add both label and image
-rw-r--r-- | perl-install/mygtk2.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index ec8249fa9..6569c3180 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -147,7 +147,7 @@ sub _gtk_any_Button { if ($class eq 'RadioButton') { @radio_options = delete $opts->{group}; } - $w = $opts->{image} || $opts->{child} ? "Gtk2::$class"->new : + $w = $opts->{child} ? "Gtk2::$class"->new : delete $opts->{mnemonic} ? "Gtk2::$class"->new_with_mnemonic(@radio_options, delete $opts->{text} || '') : $opts->{text} ? "Gtk2::$class"->new_with_label(@radio_options, delete $opts->{text} || '') : "Gtk2::$class"->new(@radio_options); @@ -155,10 +155,11 @@ sub _gtk_any_Button { $w->{format} = delete $opts->{format} if exists $opts->{format}; } - if (my $widget = delete $opts->{image} || delete $opts->{child}) { + if (my $widget = delete $opts->{child}) { $w->add($widget); $widget->show; } + $w->set_image(delete $opts->{image}) if exists $opts->{image}; $w->set_relief(delete $opts->{relief}) if exists $opts->{relief}; if (my $text_ref = delete $opts->{text_ref}) { |