[gnome-initial-setup] password: Remove unused password hints



commit 68cc39d1c1144efa78ea01673a66cdc81558b088
Author: Ondrej Holy <oholy redhat com>
Date:   Tue May 30 10:37:17 2017 +0200

    password: Remove unused password hints
    
    Short password hints are not used for some time. Let's remove them.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783236

 .../pages/password/gis-password-page.c             |    5 ++---
 gnome-initial-setup/pages/password/pw-utils.c      |    8 +-------
 gnome-initial-setup/pages/password/pw-utils.h      |    1 -
 3 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/gnome-initial-setup/pages/password/gis-password-page.c 
b/gnome-initial-setup/pages/password/gis-password-page.c
index 5e5a6b0..6afbed8 100644
--- a/gnome-initial-setup/pages/password/gis-password-page.c
+++ b/gnome-initial-setup/pages/password/gis-password-page.c
@@ -116,7 +116,6 @@ validate (GisPasswordPage *page)
   const gchar *verify;
   gint strength_level;
   const gchar *hint;
-  const gchar *long_hint;
 
   if (priv->timeout_id != 0) {
     g_source_remove (priv->timeout_id);
@@ -126,9 +125,9 @@ validate (GisPasswordPage *page)
   password = gtk_entry_get_text (GTK_ENTRY (priv->password_entry));
   verify = gtk_entry_get_text (GTK_ENTRY (priv->confirm_entry));
 
-  pw_strength (password, NULL, priv->username, &hint, &long_hint, &strength_level);
+  pw_strength (password, NULL, priv->username, &hint, &strength_level);
   gtk_level_bar_set_value (GTK_LEVEL_BAR (priv->password_strength), strength_level);
-  gtk_label_set_label (GTK_LABEL (priv->password_explanation), long_hint);
+  gtk_label_set_label (GTK_LABEL (priv->password_explanation), hint);
 
   gtk_label_set_label (GTK_LABEL (priv->confirm_explanation), "");
   priv->valid_confirm = FALSE;
diff --git a/gnome-initial-setup/pages/password/pw-utils.c b/gnome-initial-setup/pages/password/pw-utils.c
index c6e5135..338ca0c 100644
--- a/gnome-initial-setup/pages/password/pw-utils.c
+++ b/gnome-initial-setup/pages/password/pw-utils.c
@@ -125,7 +125,6 @@ pw_strength (const gchar  *password,
              const gchar  *old_password,
              const gchar  *username,
              const gchar **hint,
-             const gchar **long_hint,
              gint         *strength_level)
 {
         gint rv, level = 0;
@@ -138,23 +137,18 @@ pw_strength (const gchar  *password,
 
         strength = CLAMP (0.01 * rv, 0.0, 1.0);
         if (rv < 0) {
-                *hint = C_("Password strength", "Strength: Weak");
         }
         else if (strength < 0.50) {
                 level = 1;
-                *hint = C_("Password strength", "Strength: Low");
         } else if (strength < 0.75) {
                 level = 2;
-                *hint = C_("Password strength", "Strength: Medium");
         } else if (strength < 0.90) {
                 level = 3;
-                *hint = C_("Password strength", "Strength: Good");
         } else {
                 level = 4;
-                *hint = C_("Password strength", "Strength: High");
         }
 
-        *long_hint = pw_error_hint (rv);
+        *hint = pw_error_hint (rv);
 
         if (strength_level)
                 *strength_level = level;
diff --git a/gnome-initial-setup/pages/password/pw-utils.h b/gnome-initial-setup/pages/password/pw-utils.h
index 9960de3..2a3cc42 100644
--- a/gnome-initial-setup/pages/password/pw-utils.h
+++ b/gnome-initial-setup/pages/password/pw-utils.h
@@ -26,5 +26,4 @@ gdouble  pw_strength   (const gchar  *password,
                         const gchar  *old_password,
                         const gchar  *username,
                         const gchar **hint,
-                        const gchar **long_hints,
                         gint         *strength_level);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]