summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-11-23 03:24:07 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-11-24 23:53:10 +0100
commitcca23bf47b1c008a4385beefd02410b22c9bae12 (patch)
treedb16701e1d5c14ad4eb564029754184251067c8e
parent9cd2aac40e4703fcd7143dfc7af3e97bd47222b9 (diff)
downloaddrakx-cca23bf47b1c008a4385beefd02410b22c9bae12.tar
drakx-cca23bf47b1c008a4385beefd02410b22c9bae12.tar.gz
drakx-cca23bf47b1c008a4385beefd02410b22c9bae12.tar.bz2
drakx-cca23bf47b1c008a4385beefd02410b22c9bae12.tar.xz
drakx-cca23bf47b1c008a4385beefd02410b22c9bae12.zip
add support for ToolButton
-rw-r--r--perl-install/mygtk3.pm13
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) = @_;