summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurélien Lefebvre <alefebvre@mandriva.com>2009-09-08 13:17:55 +0000
committerAurélien Lefebvre <alefebvre@mandriva.com>2009-09-08 13:17:55 +0000
commit4f9fdea0d8456f93ecdc3ff76b9706996c80324a (patch)
treeaf7a057cc4ea02be8dd8ef8df5749049e20f08a5
parentc5b9fa61ebd3277b1e512337d7d2249f89a209e8 (diff)
downloaddrakx-4f9fdea0d8456f93ecdc3ff76b9706996c80324a.tar
drakx-4f9fdea0d8456f93ecdc3ff76b9706996c80324a.tar.gz
drakx-4f9fdea0d8456f93ecdc3ff76b9706996c80324a.tar.bz2
drakx-4f9fdea0d8456f93ecdc3ff76b9706996c80324a.tar.xz
drakx-4f9fdea0d8456f93ecdc3ff76b9706996c80324a.zip
- adduserdrake:
o added tooltip text to weakness icon
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/install/NEWS3
-rw-r--r--perl-install/interactive/gtk.pm13
3 files changed, 19 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index fcfe7db5e..50ac914d7 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,6 @@
+- adduserdrake:
+ o added tooltip text to weakness icon
+
Version 12.48 - 7 September 2009
- mygtk2:
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index c59eb4604..b5f0b0812 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,6 @@
+- adduserdrake:
+ o added tooltip text to weakness icon
+
Version 12.48 - 7 September 2009
- mygtk2:
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 8feea073c..ecdccad69 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -555,6 +555,7 @@ sub create_widget {
require authentication;
my $password_weakness = authentication::compute_password_weakness($w->get_text);
$w->set_icon_from_pixbuf('GTK_ENTRY_ICON_SECONDARY', get_weakness_icon($password_weakness));
+ $w->set_icon_tooltip_text('GTK_ENTRY_ICON_SECONDARY', get_weakness_tooltip($password_weakness));
}
$w->get_text;
}));
@@ -982,4 +983,16 @@ sub get_weakness_icon {
$weakness_icon;
}
+sub get_weakness_tooltip {
+ my ($password_weakness) = @_;
+ my %weakness_tooltip = (
+ 1 => N("Password is trivial to guess"),
+ 2 => N("Password is trivial to guess"),
+ 3 => N("Password should resist to basic attacks"),
+ 4 => N("Password seems secure"),
+ 5 => N("Password seems secure"));
+ my $weakness_tooltip = $weakness_tooltip{$password_weakness} || return undef;
+ return $weakness_tooltip;
+}
+
1;