summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-05 10:38:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-05 10:38:38 +0000
commit07e0ecd0ed6222ae98b0a5e8c0d4e1d80497bb8f (patch)
treea441b04237638e496171d58bf9b29d39ae3cc8ac /perl-install/interactive
parent6350cc9f4b3d2cdb67566f3c582c991d72a6cf5c (diff)
downloaddrakx-07e0ecd0ed6222ae98b0a5e8c0d4e1d80497bb8f.tar
drakx-07e0ecd0ed6222ae98b0a5e8c0d4e1d80497bb8f.tar.gz
drakx-07e0ecd0ed6222ae98b0a5e8c0d4e1d80497bb8f.tar.bz2
drakx-07e0ecd0ed6222ae98b0a5e8c0d4e1d80497bb8f.tar.xz
drakx-07e0ecd0ed6222ae98b0a5e8c0d4e1d80497bb8f.zip
- display a warning when capslock is enabled and entering a password (#33028)
Diffstat (limited to 'perl-install/interactive')
-rw-r--r--perl-install/interactive/gtk.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 59b0fb288..306ea0c9e 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -535,7 +535,17 @@ sub create_widget {
}
}
$w->signal_connect(key_press_event => $e->{may_go_to_next});
- $w->set_visibility(0) if $e->{hidden};
+ if ($e->{hidden}) {
+ $w->set_visibility(0);
+ $w->signal_connect(key_press_event => sub {
+ my (undef, $event) = @_;
+ if (!$o->{capslock_warned} && member('lock-mask', @{$event->state}) && !$w->get_text) {
+ $o->{capslock_warned} = 1;
+ $o->ask_warn('', N("Beware, Caps Lock is enabled"));
+ }
+ 0;
+ });
+ }
}
if (my $focus_out = $e->{focus_out}) {