diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-03-22 00:47:41 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-03-22 00:47:41 +0000 |
commit | cacb143040c018a24aed00c3ce1f513b75ec7f99 (patch) | |
tree | 22afb23dc50f2bad06abb0730f88745b09ff654a /src/gui/register.h | |
parent | 823aa330987205b251d9f662cfdd4c39149c6ec7 (diff) | |
download | mana-cacb143040c018a24aed00c3ce1f513b75ec7f99.tar.gz mana-cacb143040c018a24aed00c3ce1f513b75ec7f99.tar.bz2 mana-cacb143040c018a24aed00c3ce1f513b75ec7f99.tar.xz mana-cacb143040c018a24aed00c3ce1f513b75ec7f99.zip |
Only enable login button when a username, password and server are filled in.
Pass username, password and server on to the register dialog. Go back to login
dialog when canceling registration. Fixed a crash caused by deleting an
OkDialog twice (it also deletes itself). Made the register dialog a bit wider.
Register dialog no longer clears username field when it is invalid.
Diffstat (limited to 'src/gui/register.h')
-rw-r--r-- | src/gui/register.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/gui/register.h b/src/gui/register.h index 6176aef7..6b23c97f 100644 --- a/src/gui/register.h +++ b/src/gui/register.h @@ -32,17 +32,31 @@ class LoginData; class OkDialog; -class WrongDataNoticeListener; /** - * The login dialog. + * Listener used while dealing with wrong data. It is used to direct the focus + * to the field which contained wrong data when the Ok button was pressed on + * the error notice. + */ +class WrongDataNoticeListener : public gcn::ActionListener { + public: + void setTarget(gcn::TextField *textField); + void action(const gcn::ActionEvent &event); + private: + gcn::TextField *mTarget; +}; + +/** + * The registration dialog. * * \ingroup Interface */ -class RegisterDialog : public Window, public gcn::ActionListener { +class RegisterDialog : public Window, public gcn::ActionListener +{ public: /** - * Constructor + * Constructor. Name, password and server fields will be initialized to + * the information already present in the LoginData instance. * * @see Window::Window */ @@ -73,7 +87,6 @@ class RegisterDialog : public Window, public gcn::ActionListener { gcn::RadioButton *mFemaleButton; WrongDataNoticeListener *mWrongDataNoticeListener; - OkDialog *mWrongRegisterNotice; LoginData *mLoginData; }; |