summaryrefslogtreecommitdiff
path: root/src/gui/changeemaildialog.cpp
diff options
context:
space:
mode:
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;
-}