summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-06-09 23:51:16 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-06-09 23:51:16 +0200
commit2e8044cbc0644cec692c9b8cd6ac2760a9166278 (patch)
tree05051e00189db4de20ae3474167bd164b0d1570c /src
parent420e770c619c23e6bff94260bb260d289e769534 (diff)
parent64eb7a188bf7edea14729e10029f39ab6e7fb2ef (diff)
downloadmana-2e8044cbc0644cec692c9b8cd6ac2760a9166278.tar.gz
mana-2e8044cbc0644cec692c9b8cd6ac2760a9166278.tar.bz2
mana-2e8044cbc0644cec692c9b8cd6ac2760a9166278.tar.xz
mana-2e8044cbc0644cec692c9b8cd6ac2760a9166278.zip
Merge branch '0.0.29'
Diffstat (limited to 'src')
-rw-r--r--src/gui/changepassworddialog.cpp66
-rw-r--r--src/main.h2
-rw-r--r--src/winver.h4
3 files changed, 20 insertions, 52 deletions
diff --git a/src/gui/changepassworddialog.cpp b/src/gui/changepassworddialog.cpp
index 35f57ef4..4be92b15 100644
--- a/src/gui/changepassworddialog.cpp
+++ b/src/gui/changepassworddialog.cpp
@@ -31,6 +31,7 @@
#include "gui/widgets/passwordfield.h"
#include "gui/widgets/textfield.h"
#include "gui/widgets/label.h"
+#include "gui/widgets/layout.h"
#include "net/logindata.h"
@@ -40,62 +41,30 @@
#include <string>
#include <sstream>
-ChangePasswordDialog::ChangePasswordDialog(Window *parent, LoginData *loginData):
+ChangePasswordDialog::ChangePasswordDialog(Window *parent,
+ LoginData *loginData):
Window(_("Change Password"), true, parent),
mWrongDataNoticeListener(new WrongDataNoticeListener),
mLoginData(loginData)
{
- gcn::Label *accountLabel = new Label(strprintf(_("Account: %s"),
- mLoginData->username.c_str()));
- gcn::Label *oldPassLabel = new Label(_("Password:"));
+ gcn::Label *accountLabel = new Label(
+ strprintf(_("Account: %s"), mLoginData->username.c_str()));
mOldPassField = new PasswordField;
- gcn::Label *newPassLabel = new Label(_("Type New Password twice:"));
mFirstPassField = new PasswordField;
mSecondPassField = new PasswordField;
- mChangePassButton = new Button(_("Change Password"), "change_password", this);
+ mChangePassButton = new Button(_("Change Password"), "change_password",
+ this);
mCancelButton = new Button(_("Cancel"), "cancel", this);
- const int width = 200;
- const int height = 170;
- setContentSize(width, height);
-
- accountLabel->setPosition(5, 5);
- accountLabel->setWidth(130);
- oldPassLabel->setPosition(
- 5, accountLabel->getY() + accountLabel->getHeight() + 7);
- oldPassLabel->setWidth(130);
-
- mOldPassField->setPosition(
- 5, oldPassLabel->getY() + oldPassLabel->getHeight() + 7);
- mOldPassField->setWidth(130);
-
- newPassLabel->setPosition(
- 5, mOldPassField->getY() + mOldPassField->getHeight() + 7);
- newPassLabel->setWidth(width - 5);
-
- mFirstPassField->setPosition(
- 5, newPassLabel->getY() + newPassLabel->getHeight() + 7);
- mFirstPassField->setWidth(130);
-
- mSecondPassField->setPosition(
- 5, mFirstPassField->getY() + mFirstPassField->getHeight() + 7);
- mSecondPassField->setWidth(130);
-
- mCancelButton->setPosition(
- width - 5 - mCancelButton->getWidth(),
- height - 5 - mCancelButton->getHeight());
- mChangePassButton->setPosition(
- mCancelButton->getX() - 5 - mChangePassButton->getWidth(),
- mCancelButton->getY());
-
- add(accountLabel);
- add(oldPassLabel);
- add(mOldPassField);
- add(newPassLabel);
- add(mFirstPassField);
- add(mSecondPassField);
- add(mChangePassButton);
- add(mCancelButton);
+ place(0, 0, accountLabel, 3);
+ place(0, 1, new Label(_("Password:")), 3);
+ place(0, 2, mOldPassField, 3).setPadding(1);
+ place(0, 3, new Label(_("Type new password twice:")), 3);
+ place(0, 4, mFirstPassField, 3).setPadding(1);
+ place(0, 5, mSecondPassField, 3).setPadding(1);
+ place(1, 6, mCancelButton);
+ place(2, 6, mChangePassButton);
+ reflowLayout(200);
setLocationRelativeTo(getParent());
setVisible(true);
@@ -111,8 +80,7 @@ ChangePasswordDialog::~ChangePasswordDialog()
delete mWrongDataNoticeListener;
}
-void
-ChangePasswordDialog::action(const gcn::ActionEvent &event)
+void ChangePasswordDialog::action(const gcn::ActionEvent &event)
{
if (event.getId() == "cancel")
{
diff --git a/src/main.h b/src/main.h
index c0d0a5bd..bd1c6184 100644
--- a/src/main.h
+++ b/src/main.h
@@ -58,7 +58,7 @@
#elif defined WIN32
#include "winver.h"
#elif defined __APPLE__
-#define PACKAGE_VERSION "0.0.29"
+#define PACKAGE_VERSION "0.0.29.1"
#endif
#ifdef PACKAGE_VERSION
diff --git a/src/winver.h b/src/winver.h
index 4996bdfb..708e247b 100644
--- a/src/winver.h
+++ b/src/winver.h
@@ -2,5 +2,5 @@
#define VER_MAJOR 0
#define VER_MINOR 0
#define VER_RELEASE 29
-#define VER_BUILD 0
-#define PACKAGE_VERSION "0.0.29"
+#define VER_BUILD 1
+#define PACKAGE_VERSION "0.0.29.1"