summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive_newt.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-01-07 21:11:15 +0000
committerFrancois Pons <fpons@mandriva.com>2000-01-07 21:11:15 +0000
commitbcdadca806b3b301a69d1ff6f69b52fe156b1bb4 (patch)
treef1ce98f6833a0e8ceed3acc41bea6af3d68f738f /perl-install/interactive_newt.pm
parent5a83b0a889e7bb5e517d691953cd34beedfc8ed3 (diff)
downloaddrakx-backup-do-not-use-bcdadca806b3b301a69d1ff6f69b52fe156b1bb4.tar
drakx-backup-do-not-use-bcdadca806b3b301a69d1ff6f69b52fe156b1bb4.tar.gz
drakx-backup-do-not-use-bcdadca806b3b301a69d1ff6f69b52fe156b1bb4.tar.bz2
drakx-backup-do-not-use-bcdadca806b3b301a69d1ff6f69b52fe156b1bb4.tar.xz
drakx-backup-do-not-use-bcdadca806b3b301a69d1ff6f69b52fe156b1bb4.zip
*** empty log message ***
Diffstat (limited to 'perl-install/interactive_newt.pm')
-rw-r--r--perl-install/interactive_newt.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/perl-install/interactive_newt.pm b/perl-install/interactive_newt.pm
index 16831a8df..d16e3632f 100644
--- a/perl-install/interactive_newt.pm
+++ b/perl-install/interactive_newt.pm
@@ -20,7 +20,7 @@ sub new() {
Newt::changeColors;
Newt::Cls;
Newt::SetSuspendCallback;
- open STDERR,">/dev/null";
+ open STDERR,">/dev/null" if $::isStandalone;
bless {}, $_[0];
}
@@ -50,13 +50,16 @@ sub ask_from_listW {
my ($title, @okcancel) = ref $title_ ? @$title_ : ($title_, _("Ok"), _("Cancel"));
my $mesg = join("\n", @$messages);
+ my $len = 0; $len += length($_) foreach @$l;
if (@$l == 1) {
Newt::WinMessage($title, @$l, $mesg);
$l->[0];
- } elsif (@$l == 2) {
+#- because newt will not try to remove window if bigger than screen !
+ } elsif (@$l == 2 && $len < 64) {
$l->[Newt::WinChoice($title, @$l, $mesg) - 1];
- } elsif (@$l == 3) {
+#- because newt will not try to remove window if bigger than screen !
+ } elsif (@$l == 3 && $len < 64) {
$l->[Newt::WinTernary($title, @$l, $mesg) - 1];
} else {
my $special = !@okcancel;
@@ -177,7 +180,7 @@ sub ask_from_entries_refW {
map { &{$updates[$_]} } 0..$#widgets;
$form->FormDestroy;
Newt::PopWindow;
- $$r != $$cancel;
+ $$r != $$cancel;
}