summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2001-08-12 15:36:59 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2001-08-12 15:36:59 +0000
commitc2676f6719a95391172f35127e753afb16f827c7 (patch)
treeb3f6d3a0bc06ee4bc68112be5a122756046f7a67
parent21ab80882381d8f37f7f20d7823981e576074e93 (diff)
downloaddrakx-backup-do-not-use-c2676f6719a95391172f35127e753afb16f827c7.tar
drakx-backup-do-not-use-c2676f6719a95391172f35127e753afb16f827c7.tar.gz
drakx-backup-do-not-use-c2676f6719a95391172f35127e753afb16f827c7.tar.bz2
drakx-backup-do-not-use-c2676f6719a95391172f35127e753afb16f827c7.tar.xz
drakx-backup-do-not-use-c2676f6719a95391172f35127e753afb16f827c7.zip
When a dialog has too many widgets use a scrollbar so that the dialog does not exceed the screen size
-rw-r--r--perl-install/interactive_newt.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/interactive_newt.pm b/perl-install/interactive_newt.pm
index 9def62960..8e64c539b 100644
--- a/perl-install/interactive_newt.pm
+++ b/perl-install/interactive_newt.pm
@@ -149,9 +149,13 @@ sub ask_from_entries_refW {
my $listg = do {
my $height = 18;
- #- use a scrolled window if there is a lot of checkboxes (aka ask_many_from_list)
- #- !! works badly together with list's :-(
- if ((grep { $_->{type} eq 'bool' } @$l) > 6 && $total_size > $height) {
+ #- use a scrolled window if there is a lot of checkboxes (aka
+ #- ask_many_from_list) or a lot of widgets in general (aka
+ #- options of a native PostScript printer in printerdrake)
+ #- !! works badly together with list's (lists are one widget, so a
+ #- big list window will not switch to scrollbar mode) :-(
+ if ((((grep { $_->{type} eq 'bool' } @$l) > 6) ||
+ ((@$l) > 3)) && $total_size > $height) {
$grid->GridPlace(1, 1); #- Uh?? otherwise the size allocated is bad
my $scroll = Newt::Component::VerticalScrollbar(-1, -1, $height, 9, 10);