From f919742bfe11cea0b208686404d6a211c96f5aa3 Mon Sep 17 00:00:00 2001 From: damien Date: Mon, 26 Nov 2001 16:35:31 +0000 Subject: new features for new mcc --- perl-install/common.pm | 8 ++++++++ perl-install/my_gtk.pm | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/perl-install/common.pm b/perl-install/common.pm index 3dcacfb49..282112275 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -130,6 +130,14 @@ sub expand_symlinks_but_simple { sub sync { &MDK::Common::System::sync } +# Group the list by n. Returns a reference of lists of length n +sub group_n_lm { + my $n = shift; + my @l; + push @l, [ splice(@_, 0, $n) ] while (@_); + @l +} + #-###################################################################################### #- Wonderful perl :( #-###################################################################################### diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index acdbe9977..6c4f51b35 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -462,9 +462,10 @@ sub create_box_with_title($@) { } sub createScrolledWindow { - my ($W) = @_; + my ($W, $policy) = @_; my $w = new Gtk::ScrolledWindow(undef, undef); - $w->set_policy('automatic', 'automatic'); + $policy ||= [ 'automatic', 'automatic']; + $w->set_policy(@{$policy}); member(ref $W, qw(Gtk::CList Gtk::CTree Gtk::Text)) ? $w->add($W) : $w->add_with_viewport($W); -- cgit v1.2.1