From 21ab80882381d8f37f7f20d7823981e576074e93 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Sun, 12 Aug 2001 15:18:56 +0000 Subject: When a dialog has too many widgets use a scrollbar so that the dialog does not exceed the screen size --- perl-install/interactive_gtk.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index 643cee9c3..c7ed48b38 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -463,8 +463,11 @@ sub ask_from_entries_refW { my $create_widgets = sub { my $w = create_packtable({}, map { [($_->{icon_w}, $_->{e}{label}, $_->{real_w})]} @_); - #- use a scrolled window if there is a lot of checkboxes (aka ask_many_from_list) - my $has = (grep { $_->{e}{type} eq 'bool' } @_) > 4; + #- use a scrolled window if there is a lot of checkboxes (aka + #- ask_many_from_list) or if there are many widgets in general (aka + #- options of native PostScript printer in printerdrake) + my $has = (((grep { $_->{e}{type} eq 'bool' } @_) > 4) || + ((@_) > 10)); $has_scroll ||= $has; $has ? createScrolledWindow($w) : $w; }; -- cgit v1.2.1