summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-19 13:00:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-19 13:00:53 +0000
commit71db231163e1952fd430fc7ad1bae39c98a4b5c3 (patch)
tree9fd83e6d74faf137d4df1be6d4f15e42ea16ebff
parent5dca68385f218b8ec3f7350fb65770b1f75f9a58 (diff)
downloaddrakx-71db231163e1952fd430fc7ad1bae39c98a4b5c3.tar
drakx-71db231163e1952fd430fc7ad1bae39c98a4b5c3.tar.gz
drakx-71db231163e1952fd430fc7ad1bae39c98a4b5c3.tar.bz2
drakx-71db231163e1952fd430fc7ad1bae39c98a4b5c3.tar.xz
drakx-71db231163e1952fd430fc7ad1bae39c98a4b5c3.zip
(ask_from_entries_refW):
- ensure the width is less than $width - 7 (in french and 80x25, the treelist was too big) - if term is very big, use 10 lines instead of 5 - if no button is asked, but one in any case otherwise it's buggy
-rw-r--r--perl-install/interactive_newt.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/interactive_newt.pm b/perl-install/interactive_newt.pm
index 4ea1a2a4f..a94748a70 100644
--- a/perl-install/interactive_newt.pm
+++ b/perl-install/interactive_newt.pm
@@ -104,7 +104,7 @@ sub ask_from_entries_refW {
} elsif ($e->{type} eq 'button') {
$w = Newt::Component::Button(-1, -1, may_apply($e->{format}, ${$e->{val}}));
} elsif ($e->{type} =~ /list/) {
- my ($h, $wi) = (5, 20);
+ my ($h, $wi) = (@$l == 1 && $height > 30 ? 10 : 5, 20);
my $scroll = @{$e->{list}} > $h ? 1 << 2 : 0;
$size = min(int @{$e->{list}}, $h);
@@ -114,7 +114,7 @@ sub ask_from_entries_refW {
$w->ListboxAddEntry($t, $_);
$wi = max($wi, length $t);
}
- $w->ListboxSetWidth($wi + 3); # 3 added for the scrollbar (?)
+ $w->ListboxSetWidth(min($wi + 3, $width - 7)); # 3 added for the scrollbar (?)
$get = sub { $w->ListboxGetCurrent };
$set = sub {
my ($val) = @_;
@@ -163,7 +163,7 @@ sub ask_from_entries_refW {
$grid;
}
};
- my ($buttons, $ok, $cancel) = Newt::Grid::ButtonBar($common->{ok} || '', if_($common->{cancel}, $common->{cancel}));
+ my ($buttons, $ok, $cancel) = Newt::Grid::ButtonBar($common->{ok} || _("Ok"), if_($common->{cancel}, $common->{cancel}));
my $form = Newt::Component::Form(\undef, '', 0);
my $window = Newt::Grid::GridBasicWindow(first(myTextbox(@widgets == 0, @{$common->{messages}})), $listg, $buttons);