summaryrefslogtreecommitdiff
path: root/src/gui/unregisterdialog.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-10-19 14:18:04 -0600
committerJared Adams <jaxad0127@gmail.com>2009-10-19 14:18:04 -0600
commit7fc4b120bf35daa5d3d96eb565ec7d79ce153653 (patch)
tree159b576c6cb87486e043d5ba103b4b634ef1b230 /src/gui/unregisterdialog.cpp
parent72883051f1c947c324e259dc5e323ca3dfaf3737 (diff)
downloadmana-client-7fc4b120bf35daa5d3d96eb565ec7d79ce153653.tar.gz
mana-client-7fc4b120bf35daa5d3d96eb565ec7d79ce153653.tar.bz2
mana-client-7fc4b120bf35daa5d3d96eb565ec7d79ce153653.tar.xz
mana-client-7fc4b120bf35daa5d3d96eb565ec7d79ce153653.zip
Fix RegisterDialog tab order and detail lengths
Diffstat (limited to 'src/gui/unregisterdialog.cpp')
-rw-r--r--src/gui/unregisterdialog.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/unregisterdialog.cpp b/src/gui/unregisterdialog.cpp
index 0dfc8df9..a5e96532 100644
--- a/src/gui/unregisterdialog.cpp
+++ b/src/gui/unregisterdialog.cpp
@@ -34,6 +34,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"
@@ -106,20 +108,22 @@ UnRegisterDialog::action(const gcn::ActionEvent &event)
std::stringstream errorMessage;
bool error = false;
+ unsigned int min = Net::getLoginHandler()->getMinPasswordLength();
+ unsigned int max = Net::getLoginHandler()->getMaxPasswordLength();
+
// Check password
- if (password.length() < LEN_MIN_PASSWORD)
+ if (password.length() < min)
{
// Pass too short
errorMessage << strprintf(_("The password needs to be at least %d "
- "characters long."), LEN_MIN_PASSWORD);
+ "characters long."), min);
error = true;
}
- else if (password.length() > LEN_MAX_PASSWORD - 1)
+ else if (password.length() > max - 1)
{
// Pass too long
errorMessage << strprintf(_("The password needs to be less than "
- "%d characters long."),
- LEN_MAX_PASSWORD);
+ "%d characters long."), max);
error = true;
}