From 11b3ff85e9dc8f39ddcfdff511c6340b899ba414 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Wed, 7 Oct 2009 15:31:54 -0600 Subject: Clean up state machine some more --- src/gui/unregisterdialog.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gui/unregisterdialog.cpp') 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 #include -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(); } } } -- cgit v1.2.3-70-g09d2