summaryrefslogtreecommitdiff
path: root/src/gui/login.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/login.cpp')
-rw-r--r--src/gui/login.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/login.cpp b/src/gui/login.cpp
index b8d4df2b..664074aa 100644
--- a/src/gui/login.cpp
+++ b/src/gui/login.cpp
@@ -43,9 +43,9 @@ WrongDataNoticeListener::setTarget(gcn::TextField *textField)
}
void
-WrongDataNoticeListener::action(const std::string &eventId, gcn::Widget *widget)
+WrongDataNoticeListener::action(const gcn::ActionEvent &event)
{
- if (eventId == "ok")
+ if (event.getId() == "ok")
{
// Reset the field
mTarget->setText("");
@@ -85,8 +85,8 @@ LoginDialog::LoginDialog(LoginData *loginData):
mKeepCheck->getX() + mKeepCheck->getWidth() + 10,
91 - mRegisterButton->getHeight() - 5);
- mUserField->setEventId("ok");
- mPassField->setEventId("ok");
+ mUserField->setActionEventId("ok");
+ mPassField->setActionEventId("ok");
mUserField->addActionListener(this);
mPassField->addActionListener(this);
@@ -119,9 +119,9 @@ LoginDialog::~LoginDialog()
}
void
-LoginDialog::action(const std::string &eventId, gcn::Widget *widget)
+LoginDialog::action(const gcn::ActionEvent &event)
{
- if (eventId == "ok")
+ if (event.getId() == "ok")
{
// Check login
if (mUserField->getText().empty())
@@ -142,11 +142,11 @@ LoginDialog::action(const std::string &eventId, gcn::Widget *widget)
state = STATE_LOGIN_ATTEMPT;
}
}
- else if (eventId == "cancel")
+ else if (event.getId() == "cancel")
{
state = STATE_EXIT;
}
- else if (eventId == "register")
+ else if (event.getId() == "register")
{
state = STATE_REGISTER;
}