summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
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,