summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive_gtk.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2001-08-12 15:18:56 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2001-08-12 15:18:56 +0000
commit21ab80882381d8f37f7f20d7823981e576074e93 (patch)
tree27bbd9d274d8a1ef468b1b88fb03500f3b947103 /perl-install/interactive_gtk.pm
parentf8fc4183b538d0843bf2c544ef47ff5130dfa45f (diff)
downloaddrakx-21ab80882381d8f37f7f20d7823981e576074e93.tar
drakx-21ab80882381d8f37f7f20d7823981e576074e93.tar.gz
drakx-21ab80882381d8f37f7f20d7823981e576074e93.tar.bz2
drakx-21ab80882381d8f37f7f20d7823981e576074e93.tar.xz
drakx-21ab80882381d8f37f7f20d7823981e576074e93.zip
When a dialog has too many widgets use a scrollbar so that the dialog does not exceed the screen size
Diffstat (limited to 'perl-install/interactive_gtk.pm')
-rw-r--r--perl-install/interactive_gtk.pm7
1 files 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;
};