diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-01-14 14:54:39 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-01-14 14:54:39 +0000 |
commit | f842e0b40d8382011f0bc46b1446945d99ac0425 (patch) | |
tree | 5ddbb7c146a8ece28a4260d788350b1c2cf0dbed /src/gui/login.cpp | |
parent | cbbcc5489e2f72a76b66ae849cbe8f1dc44246ca (diff) | |
download | mana-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.gz mana-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.bz2 mana-f842e0b40d8382011f0bc46b1446945d99ac0425.tar.xz mana-f842e0b40d8382011f0bc46b1446945d99ac0425.zip |
Upgraded to Guichan 0.6.0 (merge from guichan-0.6.0 branch).
Diffstat (limited to 'src/gui/login.cpp')
-rw-r--r-- | src/gui/login.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 97814360..cda57103 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(""); @@ -91,9 +91,9 @@ LoginDialog::LoginDialog(LoginData *loginData): mRegisterButton->setPosition(mKeepCheck->getX() + mKeepCheck->getWidth() + 10, 100 - mRegisterButton->getHeight() - 5); - mUserField->setEventId("ok"); - mPassField->setEventId("ok"); - mServerField->setEventId("ok"); + mUserField->setActionEventId("ok"); + mPassField->setActionEventId("ok"); + mServerField->setActionEventId("ok"); mUserField->addActionListener(this); mPassField->addActionListener(this); @@ -129,9 +129,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()) @@ -154,11 +154,11 @@ LoginDialog::action(const std::string& eventId, gcn::Widget* widget) state = ACCOUNT_STATE; } } - else if (eventId == "cancel") + else if (event.getId() == "cancel") { state = EXIT_STATE; } - else if (eventId == "register") + else if (event.getId() == "register") { state = REGISTER_STATE; } |