From 7976d195653a3d788655f9a3ff7fce8c22c2880f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 17 Sep 2008 21:40:21 +0000 Subject: (_gtknew_handle_layout_children) split it out of _gtk__Fixed() (needed for next commit) --- perl-install/mygtk2.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'perl-install/mygtk2.pm') diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index aacfea56e..117529bab 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -635,7 +635,13 @@ sub _gtk__Fixed { if (!$w) { $w = Gtk2::Fixed->new; $w->set_has_window(delete $opts->{has_window}) if exists $opts->{has_window}; + _gtknew_handle_layout_children($w, $opts); + } + $w; +} +sub _gtknew_handle_layout_children { + my ($w, $opts) = @_; $opts->{children} ||= []; push @{$opts->{children}}, [ delete $opts->{child}, delete $opts->{x}, delete $opts->{y} ] if exists $opts->{child}; foreach (@{$opts->{children}}) { @@ -650,8 +656,6 @@ sub _gtk__Fixed { ugtk2::set_back_pixbuf($w, $pixbuf); }); } - } - $w; } -- cgit v1.2.1