summaryrefslogtreecommitdiff
path: root/src/gui/register.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/register.cpp')
-rw-r--r--src/gui/register.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gui/register.cpp b/src/gui/register.cpp
index 216ac211..5fb8b579 100644
--- a/src/gui/register.cpp
+++ b/src/gui/register.cpp
@@ -19,8 +19,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <guichan/widgets/label.hpp>
-
#include "../configuration.h"
#include "../log.h"
#include "../logindata.h"
@@ -28,6 +26,7 @@
#include "button.h"
#include "checkbox.h"
+#include "label.h"
#include "login.h"
#include "ok_dialog.h"
#include "passwordfield.h"
@@ -49,23 +48,20 @@ void WrongDataNoticeListener::setTarget(gcn::TextField *textField)
void WrongDataNoticeListener::action(const gcn::ActionEvent &event)
{
if (event.getId() == "ok")
- {
mTarget->requestFocus();
- }
}
-
RegisterDialog::RegisterDialog(LoginData *loginData):
Window(_("Register")),
mWrongDataNoticeListener(new WrongDataNoticeListener),
mLoginData(loginData)
{
- gcn::Label *userLabel = new gcn::Label(_("Name:"));
- gcn::Label *passwordLabel = new gcn::Label(_("Password:"));
- gcn::Label *confirmLabel = new gcn::Label(_("Confirm:"));
+ gcn::Label *userLabel = new Label(_("Name:"));
+ gcn::Label *passwordLabel = new Label(_("Password:"));
+ gcn::Label *confirmLabel = new Label(_("Confirm:"));
#ifdef EATHENA_SUPPORT
- gcn::Label *serverLabel = new gcn::Label(_("Server:"));
- gcn::Label *portLabel = new gcn::Label(_("Port:"));
+ gcn::Label *serverLabel = new Label(_("Server:"));
+ gcn::Label *portLabel = new Label(_("Port:"));
#endif
mUserField = new TextField(loginData->username);
mPasswordField = new PasswordField(loginData->password);
@@ -131,7 +127,7 @@ RegisterDialog::RegisterDialog(LoginData *loginData):
mPortField->addActionListener(this);
#endif
- setLocationRelativeTo(getParent());
+ center();
setVisible(true);
mUserField->requestFocus();
mUserField->setCaretPosition(mUserField->getText().length());