56 mChangeEmailButton(
new Button(this,
_(
"Change Email Address"),
68 _(
"Type new email address twice:"));
70 const int width = 200;
71 const int height = 130;
117 const std::string &eventId =
event.getId();
118 if (eventId ==
"cancel")
122 else if (eventId ==
"change_email")
127 logger->
log(
"ChangeEmailDialog::Email change, Username is %s",
130 std::stringstream errorMsg;
136 if (newFirstEmail.length() < min)
140 errorMsg <<
strprintf(
_(
"The new email address needs to be at "
141 "least %u characters long."), min);
144 else if (newFirstEmail.length() > max)
148 errorMsg <<
strprintf(
_(
"The new email address needs to be "
149 "less than %u characters long."), max);
152 else if (newFirstEmail != newSecondEmail)
156 errorMsg <<
_(
"The email address entries mismatch.");
virtual void add(Widget *const widget)
void action(const ActionEvent &event)
TextField * mFirstEmailField
WrongDataNoticeListener * mWrongDataNoticeListener
ChangeEmailDialog(LoginData &data)
TextField * mSecondEmailField
Button * mChangeEmailButton
void setState(const StateT state)
void log(const char *const log_text,...)
virtual unsigned int getMaxPasswordLength() const
virtual unsigned int getMinPasswordLength() const
const std::string & getText() const
void setContentSize(int width, int height)
void setTarget(TextField *const textField)
Net::LoginHandler * loginHandler
const bool LoseFocusOnTab_true
bool error(InputEvent &event) __attribute__((noreturn))
const bool ShowCenter_true
std::string strprintf(const char *const format,...)