summaryrefslogtreecommitdiff
path: root/src/gui/changeemaildialog.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-10-04 22:28:19 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2009-10-04 22:31:43 +0200
commit924e0a887f87ce531bc5bd26cb55e410b7303383 (patch)
treea592304792e8ae877dabaa2062d6bdff1d406f02 /src/gui/changeemaildialog.cpp
parentcff9f1947bac8fa49aaf6f846a6e4335a439ac2e (diff)
downloadmana-924e0a887f87ce531bc5bd26cb55e410b7303383.tar.gz
mana-924e0a887f87ce531bc5bd26cb55e410b7303383.tar.bz2
mana-924e0a887f87ce531bc5bd26cb55e410b7303383.tar.xz
mana-924e0a887f87ce531bc5bd26cb55e410b7303383.zip
Introduced Net::LoginHandler::SetEmailOnRegister
This "optional action" specifies whether the server expects to get an email address during registration. It is used now instead of having the general handlers of eAthena and tmwserv set a pointer to an email string on the GUI dialogs (to keep things understandable, the dependency should preferably go one way).
Diffstat (limited to 'src/gui/changeemaildialog.cpp')
-rw-r--r--src/gui/changeemaildialog.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/gui/changeemaildialog.cpp b/src/gui/changeemaildialog.cpp
index 15e54895..45dcc5f8 100644
--- a/src/gui/changeemaildialog.cpp
+++ b/src/gui/changeemaildialog.cpp
@@ -39,11 +39,10 @@
#include <string>
#include <sstream>
-std::string *ChangeEmailDialog::emailPointer = NULL;
-
ChangeEmailDialog::ChangeEmailDialog(Window *parent, LoginData *loginData):
Window(_("Change Email Address"), true, parent),
- mWrongDataNoticeListener(new WrongDataNoticeListener)
+ mWrongDataNoticeListener(new WrongDataNoticeListener),
+ mLoginData(loginData)
{
gcn::Label *accountLabel = new Label(strprintf(_("Account: %s"),
mLoginData->username.c_str()));
@@ -159,15 +158,9 @@ void ChangeEmailDialog::action(const gcn::ActionEvent &event)
// No errors detected, change account password.
mChangeEmailButton->setEnabled(false);
// Set the new email address
- *emailPointer = newFirstEmail;
+ mLoginData->email = newFirstEmail;
state = STATE_CHANGEEMAIL_ATTEMPT;
scheduleDelete();
}
-
}
}
-
-void ChangeEmailDialog::setEmail(std::string *email)
-{
- emailPointer = email;
-}