diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-10-07 15:31:54 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-10-07 15:31:54 -0600 |
commit | 11b3ff85e9dc8f39ddcfdff511c6340b899ba414 (patch) | |
tree | a63ab360f58ac4e76066b1969e75a6e53a49a000 /src/gui/unregisterdialog.cpp | |
parent | f708a9bf4aeff8781ec5697ff3936e5791a9137a (diff) | |
download | mana-client-11b3ff85e9dc8f39ddcfdff511c6340b899ba414.tar.gz mana-client-11b3ff85e9dc8f39ddcfdff511c6340b899ba414.tar.bz2 mana-client-11b3ff85e9dc8f39ddcfdff511c6340b899ba414.tar.xz mana-client-11b3ff85e9dc8f39ddcfdff511c6340b899ba414.zip |
Clean up state machine some more
Diffstat (limited to 'src/gui/unregisterdialog.cpp')
-rw-r--r-- | src/gui/unregisterdialog.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/unregisterdialog.cpp b/src/gui/unregisterdialog.cpp index be54453d..0dfc8df9 100644 --- a/src/gui/unregisterdialog.cpp +++ b/src/gui/unregisterdialog.cpp @@ -41,12 +41,13 @@ #include <string> #include <sstream> -UnRegisterDialog::UnRegisterDialog(Window *parent, LoginData *loginData): - Window(_("Unregister"), true, parent), +UnRegisterDialog::UnRegisterDialog(LoginData *loginData): + Window(_("Unregister"), true), mWrongDataNoticeListener(new WrongDataNoticeListener), mLoginData(loginData) { - gcn::Label *userLabel = new Label(strprintf(_("Name: %s"), mLoginData->username.c_str())); + gcn::Label *userLabel = new Label(strprintf(_("Name: %s"), mLoginData-> + username.c_str())); gcn::Label *passwordLabel = new Label(_("Password:")); mPasswordField = new PasswordField(mLoginData->password); mUnRegisterButton = new Button(_("Unregister"), "unregister", this); @@ -77,7 +78,7 @@ UnRegisterDialog::UnRegisterDialog(Window *parent, LoginData *loginData): add(mUnRegisterButton); add(mCancelButton); - setLocationRelativeTo(getParent()); + center(); setVisible(true); mPasswordField->requestFocus(); mPasswordField->setActionEventId("cancel"); @@ -93,7 +94,7 @@ UnRegisterDialog::action(const gcn::ActionEvent &event) { if (event.getId() == "cancel") { - scheduleDelete(); + state = STATE_CHAR_SELECT; } else if (event.getId() == "unregister") { @@ -135,7 +136,6 @@ UnRegisterDialog::action(const gcn::ActionEvent &event) mUnRegisterButton->setEnabled(false); mLoginData->password = password; state = STATE_UNREGISTER_ATTEMPT; - scheduleDelete(); } } } |