diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-23 03:24:07 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-11-24 23:53:10 +0100 |
commit | cca23bf47b1c008a4385beefd02410b22c9bae12 (patch) | |
tree | db16701e1d5c14ad4eb564029754184251067c8e /perl-install | |
parent | 9cd2aac40e4703fcd7143dfc7af3e97bd47222b9 (diff) | |
download | drakx-cca23bf47b1c008a4385beefd02410b22c9bae12.tar drakx-cca23bf47b1c008a4385beefd02410b22c9bae12.tar.gz drakx-cca23bf47b1c008a4385beefd02410b22c9bae12.tar.bz2 drakx-cca23bf47b1c008a4385beefd02410b22c9bae12.tar.xz drakx-cca23bf47b1c008a4385beefd02410b22c9bae12.zip |
add support for ToolButton
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/mygtk3.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/mygtk3.pm b/perl-install/mygtk3.pm index 16988905a..68ae21467 100644 --- a/perl-install/mygtk3.pm +++ b/perl-install/mygtk3.pm @@ -218,6 +218,19 @@ sub _gtk_any_Button { $w; } +sub _gtk__ToolButton { + my ($w, $opts, $class) = @_; + + if (!$w) { + $w = "Gtk3::$class"->new(gtknew('Image', file => delete $opts->{file}), + delete $opts->{label}); + $w->set_tooltip_text(delete $opts->{tooltip}) if $opts->{tooltip}; + $w->signal_connect(clicked => delete $opts->{clicked}) if exists $opts->{clicked}; + } + + $w; +} + sub _gtk__CheckMenuItem { my ($w, $opts, $class) = @_; |