From 924e0a887f87ce531bc5bd26cb55e410b7303383 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 4 Oct 2009 22:28:19 +0200 Subject: 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). --- src/gui/changeemaildialog.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/gui/changeemaildialog.cpp') 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 #include -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; -} -- cgit v1.2.3-70-g09d2