summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Newt/Newt.xs8
-rw-r--r--perl-install/interactive/newt.pm6
2 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/Newt/Newt.xs b/perl-install/Newt/Newt.xs
index 0b1a757ff..0121452db 100644
--- a/perl-install/Newt/Newt.xs
+++ b/perl-install/Newt/Newt.xs
@@ -219,12 +219,16 @@ OUTPUT:
RETVAL
Newt::Component
-newtTextbox(left,top,width,height,flags)
+newtTextbox(left,top,width,height,want_scroll)
int left;
int top;
int width;
int height;
- int flags;
+ int want_scroll;
+ CODE:
+ RETVAL = newtTextbox(left,top,width,height, (want_scroll ? NEWT_FLAG_SCROLL : 0) | NEWT_FLAG_WRAP);
+ OUTPUT:
+ RETVAL
void
newtTextboxSetText(co,text)
diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm
index 58d03d251..6807b0e38 100644
--- a/perl-install/interactive/newt.pm
+++ b/perl-install/interactive/newt.pm
@@ -37,16 +37,16 @@ sub myTextbox {
my $width = $width - 9;
my @l = warp_text(join("\n", @messages), $width);
my $h = min($free_height - 13, int @l);
- my $flag = 1 << 6;
+ my $want_scroll;
if ($h < @l) {
if ($allow_scroll) {
- $flag |= 1 << 2; #- NEWT_FLAG_SCROLL
+ $want_scroll = 1;
} else {
# remove the text, no other way!
@l = @l[0 .. $h-1];
}
}
- my $mess = Newt::Component::Textbox(1, 0, my $w = max(map { length } @l) + 1, $h, $flag);
+ my $mess = Newt::Component::Textbox(1, 0, my $w = max(map { length } @l) + 1, $h, $want_scroll);
$mess->TextboxSetText(join("\n", @l));
$mess, $w + 1, $h;
}