summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2012-04-08 13:44:23 +0000
committerPascal Terjan <pterjan@mageia.org>2012-04-08 13:44:23 +0000
commit2a59fef66b6e6fcf840911f7abe5ae5116df7ffa (patch)
tree5bba87f00bf6adc08c58be06ebccc1b88750f3e9 /perl-install
parent7e0fdb5fc5be257ae205f80cfec0d4b484c067f8 (diff)
downloaddrakx-2a59fef66b6e6fcf840911f7abe5ae5116df7ffa.tar
drakx-2a59fef66b6e6fcf840911f7abe5ae5116df7ffa.tar.gz
drakx-2a59fef66b6e6fcf840911f7abe5ae5116df7ffa.tar.bz2
drakx-2a59fef66b6e6fcf840911f7abe5ae5116df7ffa.tar.xz
drakx-2a59fef66b6e6fcf840911f7abe5ae5116df7ffa.zip
make sure ranges are always within limits in text mode (mga#646)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/install/NEWS1
-rw-r--r--perl-install/interactive/curses.pm15
3 files changed, 19 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 21128a97c..a03cd4eee 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,6 @@
+- interactive::curses:
+ o make sure ranges are always within limits (mga#646)
+
Version 14.3 - 7 April 2012
- diskdrake:
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 2c5ac5cb6..91fc76f2b 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,4 +1,5 @@
- install btrfs-progs if needed (mga#5274)
+- make sure ranges are always within limits in text mode (mga#646)
Version 14.3 - 7 April 2012
diff --git a/perl-install/interactive/curses.pm b/perl-install/interactive/curses.pm
index 81e0f0459..482f14e45 100644
--- a/perl-install/interactive/curses.pm
+++ b/perl-install/interactive/curses.pm
@@ -412,6 +412,21 @@ sub create_widget {
my $width = $w->{'-sw'} - ($w->{'-vscrollbar'} ? 1 : 0);
$w->text(join("\n", _messages($width, $text)));
};
+ } elsif ($e->{type} eq 'range') {
+ $w = $win->add(undef, 'TextEntry',
+ '-sbborder' => 1,
+ '-text' => '',
+ '-regexp' => '/^\d*$/',
+ '-onchange' => sub {
+ log::l("onchange: ".$w->text);
+ $w->text($e->{min}) if $w->text < $e->{min};
+ $w->text($e->{max}) if $w->text > $e->{max};
+ ${$e->{val}} = $w->text;
+ log::l("/onchange: ".$w->text);
+ $changed->() if $changed;
+ },
+ %options);
+ $set = sub { $w->text($_[0] || '') };
} else {
$w = $win->add(undef, $e->{hidden} ? 'PasswordEntry' : 'TextEntry',
'-sbborder' => 1,