45 Window(
_(
"Change Email Address"), true),
51 gcn::Label *newEmailLabel =
new Label(
_(
"Type new email address twice:"));
57 const int width = 200;
58 const int height = 130;
61 accountLabel->setPosition(5, 5);
62 accountLabel->setWidth(130);
64 newEmailLabel->setPosition(
65 5, accountLabel->getY() + accountLabel->getHeight() + 7);
66 newEmailLabel->setWidth(width - 5);
69 5, newEmailLabel->getY() + newEmailLabel->getHeight() + 7);
105 if (event.getId() ==
"cancel")
109 else if (event.getId() ==
"change_email")
115 Log::info(
"ChangeEmailDialog::Email change, Username is %s",
124 if (newFirstEmail.length() < min)
128 "least %d characters long."), min);
131 else if (newFirstEmail.length() > max - 1 )
135 "less than %d characters long."), max);
138 else if (newFirstEmail != newSecondEmail)
gcn::TextField * mFirstEmailField
gcn::Button * mChangeEmailButton
gcn::Button * mCancelButton
~ChangeEmailDialog() override
WrongDataNoticeListener * mWrongDataNoticeListener
gcn::TextField * mSecondEmailField
ChangeEmailDialog(LoginData *loginData)
void action(const gcn::ActionEvent &event) override
Called when receiving actions from the widgets.
static void setState(State state)
virtual unsigned int getMaxPasswordLength() const
virtual unsigned int getMinPasswordLength() const
void center()
Positions the window in the center of it's parent.
virtual void setVisible(bool visible)
Overloads window setVisible by Guichan to allow sticky window handling.
void setContentSize(int width, int height)
Sets the size of this window.
Listener used while dealing with wrong data.
void setTarget(gcn::TextField *textField)
@ STATE_CHANGEEMAIL_ATTEMPT
void info(const char *log_text,...) LOG_PRINTF_ATTR
LoginHandler * getLoginHandler()
std::string strprintf(char const *format,...)
A safe version of sprintf that returns a std::string of the result.