From 764afd8a582e53c536045b8cf24f4ee2ba4f4ed7 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 27 Mar 2001 16:18:02 +0000 Subject: (create_box_with_title): save the box_size in field "box_size" --- perl-install/my_gtk.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 840cdaafb..1d24ab95a 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -347,11 +347,11 @@ sub create_okcancel { sub create_box_with_title($@) { my $o = shift; - my $nb_lines = map { split "\n" } @_; + $o->{box_size} = map { split "\n" } @_; $o->{box} = new Gtk::VBox(0,0); - if (@_ <= 2 && $nb_lines > 4) { + if (@_ <= 2 && $o->{box_size} > 4) { my $font = $o->{box}->style->font; - my $wanted = $nb_lines * ($font->ascent + $font->descent) + 7; + my $wanted = $o->{box_size} * ($font->ascent + $font->descent) + 7; my $height = min(250, $wanted); my $has_scroll = $height < $wanted; -- cgit v1.2.1