diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-20 20:28:09 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-21 14:06:55 +0200 |
commit | f862804fbc80451f4f93cd292b219fbab1d52b53 (patch) | |
tree | f5acf27fed022cabceb43ca7964c4104c1c0e41a /perl-install/mygtk3.pm | |
parent | 798a84226a3645ea66d493d45c7080b4264eec30 (diff) | |
download | drakx-f862804fbc80451f4f93cd292b219fbab1d52b53.tar drakx-f862804fbc80451f4f93cd292b219fbab1d52b53.tar.gz drakx-f862804fbc80451f4f93cd292b219fbab1d52b53.tar.bz2 drakx-f862804fbc80451f4f93cd292b219fbab1d52b53.tar.xz drakx-f862804fbc80451f4f93cd292b219fbab1d52b53.zip |
add support for Popover widget
Diffstat (limited to 'perl-install/mygtk3.pm')
-rw-r--r-- | perl-install/mygtk3.pm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/perl-install/mygtk3.pm b/perl-install/mygtk3.pm index 2662439ce..564af1d3f 100644 --- a/perl-install/mygtk3.pm +++ b/perl-install/mygtk3.pm @@ -753,6 +753,33 @@ sub _gtk__Expander { +sub _gtk__Popover { + my ($w, $opts) = @_; + + if ($w) { + $w->set_relative_to(delete $opts->{text}) if exists $opts->{text}; + } else { + $w = Gtk3::Popover->new(delete $opts->{relative_to}); + } + $w->set_use_markup(delete $opts->{use_markup}) if exists $opts->{use_markup}; + $w->set_position(delete $opts->{position}) if exists $opts->{position}; + $w->set_relative_to(delete $opts->{relative_to}) if exists $opts->{relative_to}; + if (my $widget = delete $opts->{child}) { + $w->add($widget); + $widget->show; + } + + $w->signal_connect(activate => delete $opts->{activate}) if exists $opts->{activate}; + + if (my $child = delete $opts->{child}) { + $w->add($child); + $child->show; + } + $w; +} + + + sub _gtk__MDV_Notebook { my ($w, $opts, $_class, $_action) = @_; if (!$w) { |