diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-07 22:09:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-07 22:09:11 +0300 |
commit | b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2 (patch) | |
tree | ee27a5a1ace7e5dbc588466dc623013e4d5cea99 /src/gui/registerdialog.cpp | |
parent | 7d3059516fc25134d0d29b497e546f2846162399 (diff) | |
download | plus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.gz plus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.bz2 plus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.tar.xz plus-b7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2.zip |
Improve constructors in some classes.
Diffstat (limited to 'src/gui/registerdialog.cpp')
-rw-r--r-- | src/gui/registerdialog.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gui/registerdialog.cpp b/src/gui/registerdialog.cpp index 8710ad9c6..7beec0abc 100644 --- a/src/gui/registerdialog.cpp +++ b/src/gui/registerdialog.cpp @@ -45,6 +45,7 @@ #include "debug.h" WrongDataNoticeListener::WrongDataNoticeListener(): + ActionListener(), mTarget(nullptr) { } @@ -62,23 +63,25 @@ void WrongDataNoticeListener::action(const gcn::ActionEvent &event) RegisterDialog::RegisterDialog(LoginData *const data): Window(_("Register"), false, nullptr, "register.xml"), + ActionListener(), + KeyListener(), + mLoginData(data), + mUserField(new TextField(mLoginData->username)), + mPasswordField(new PasswordField(mLoginData->password)), + mConfirmField(new PasswordField), mEmailField(nullptr), + mRegisterButton(new Button(_("Register"), "register", this)), + mCancelButton(new Button(_("Cancel"), "cancel", this)), mMaleButton(nullptr), mFemaleButton(nullptr), mOtherButton(nullptr), - mWrongDataNoticeListener(new WrongDataNoticeListener), - mLoginData(data) + mWrongDataNoticeListener(new WrongDataNoticeListener) { int optionalActions = Net::getLoginHandler()->supportedOptionalActions(); gcn::Label *const userLabel = new Label(_("Name:")); gcn::Label *const passwordLabel = new Label(_("Password:")); gcn::Label *const confirmLabel = new Label(_("Confirm:")); - mUserField = new TextField(mLoginData->username); - mPasswordField = new PasswordField(mLoginData->password); - mConfirmField = new PasswordField; - mRegisterButton = new Button(_("Register"), "register", this); - mCancelButton = new Button(_("Cancel"), "cancel", this); ContainerPlacer placer; placer = getPlacer(0, 0); |