From 1ce650f013fc40c3618bd8a7c53e0e93dac036da Mon Sep 17 00:00:00 2001
From: Bjørn Lindeijer <bjorn@lindeijer.nl>
Date: Tue, 9 Jun 2009 20:02:10 +0200
Subject: Updated version and changes for 0.0.29.1 release

---
 src/main.h   | 2 +-
 src/winver.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'src')

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"
-- 
cgit v1.2.3-70-g09d2


From 3907d188fa408ee3ef90bd6bb617209f09e19835 Mon Sep 17 00:00:00 2001
From: Bjørn Lindeijer <bjorn@lindeijer.nl>
Date: Tue, 9 Jun 2009 21:05:01 +0200
Subject: Convert the change password dialog to use the layout system

Fixes layout on Windows
---
 src/gui/changepassworddialog.cpp | 66 +++++++++++-----------------------------
 1 file changed, 17 insertions(+), 49 deletions(-)

(limited to 'src')

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")
     {
-- 
cgit v1.2.3-70-g09d2