diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-10-19 14:18:04 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-10-19 14:18:04 -0600 |
commit | 7fc4b120bf35daa5d3d96eb565ec7d79ce153653 (patch) | |
tree | 159b576c6cb87486e043d5ba103b4b634ef1b230 /src/gui/changeemaildialog.cpp | |
parent | 72883051f1c947c324e259dc5e323ca3dfaf3737 (diff) | |
download | mana-7fc4b120bf35daa5d3d96eb565ec7d79ce153653.tar.gz mana-7fc4b120bf35daa5d3d96eb565ec7d79ce153653.tar.bz2 mana-7fc4b120bf35daa5d3d96eb565ec7d79ce153653.tar.xz mana-7fc4b120bf35daa5d3d96eb565ec7d79ce153653.zip |
Fix RegisterDialog tab order and detail lengths
Diffstat (limited to 'src/gui/changeemaildialog.cpp')
-rw-r--r-- | src/gui/changeemaildialog.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/changeemaildialog.cpp b/src/gui/changeemaildialog.cpp index f536bd4f..32e10e98 100644 --- a/src/gui/changeemaildialog.cpp +++ b/src/gui/changeemaildialog.cpp @@ -32,6 +32,8 @@ #include "gui/widgets/textfield.h" #include "net/logindata.h" +#include "net/loginhandler.h" +#include "net/net.h" #include "utils/gettext.h" #include "utils/stringutils.h" @@ -116,20 +118,21 @@ void ChangeEmailDialog::action(const gcn::ActionEvent &event) std::stringstream errorMessage; int error = 0; - if (newFirstEmail.length() < LEN_MIN_PASSWORD) + unsigned int min = Net::getLoginHandler()->getMinPasswordLength(); + unsigned int max = Net::getLoginHandler()->getMaxPasswordLength(); + + if (newFirstEmail.length() < min) { // First email address too short errorMessage << strprintf(_("The new email address needs to be at " - "least %d characters long."), - LEN_MIN_PASSWORD); + "least %d characters long."), min); error = 1; } - else if (newFirstEmail.length() > LEN_MAX_PASSWORD - 1 ) + else if (newFirstEmail.length() > max - 1 ) { // First email address too long errorMessage << strprintf(_("The new email address needs to be " - "less than %d characters long."), - LEN_MAX_PASSWORD); + "less than %d characters long."), max); error = 1; } else if (newFirstEmail != newSecondEmail) |