summaryrefslogtreecommitdiff
path: root/src/gui/editserverdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-06 20:57:24 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-06 22:58:35 +0300
commit4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f (patch)
treea776928bb1339cdd29eb2e54d50eb3fa6e3448d7 /src/gui/editserverdialog.cpp
parent22ed653d8b630c813333d5c73a4ca02dede2a5a5 (diff)
downloadplus-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.gz
plus-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.bz2
plus-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.xz
plus-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.zip
Improve constructors in some classes.
Diffstat (limited to 'src/gui/editserverdialog.cpp')
-rw-r--r--src/gui/editserverdialog.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/editserverdialog.cpp b/src/gui/editserverdialog.cpp
index 15f4b8ac8..c4d36da74 100644
--- a/src/gui/editserverdialog.cpp
+++ b/src/gui/editserverdialog.cpp
@@ -64,6 +64,17 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
ServerInfo server,
const int index) :
Window(_("Edit Server"), true, parent),
+ ActionListener(),
+ KeyListener(),
+ mServerAddressField(new TextField(std::string())),
+ mPortField(new TextField(std::string())),
+ mNameField(new TextField(std::string())),
+ mDescriptionField(new TextField(std::string())),
+ mConnectButton(new Button(_("Connect"), "connect", this)),
+ mOkButton(new Button(_("OK"), "addServer", this)),
+ mCancelButton(new Button(_("Cancel"), "cancel", this)),
+ mTypeListModel(new TypeListModel()),
+ mTypeField(new DropDown(mTypeListModel)),
mServerDialog(parent),
mServer(server),
mIndex(index)
@@ -75,22 +86,11 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent,
Label *const portLabel = new Label(_("Port:"));
Label *const typeLabel = new Label(_("Server type:"));
Label *const descriptionLabel = new Label(_("Description:"));
- mServerAddressField = new TextField(std::string());
- mPortField = new TextField(std::string());
mPortField->setNumeric(true);
mPortField->setRange(1, 65535);
- mTypeListModel = new TypeListModel();
- mTypeField = new DropDown(mTypeListModel);
mTypeField->setSelected(0); // TmwAthena by default for now.
- mNameField = new TextField(std::string());
- mDescriptionField = new TextField(std::string());
-
- mConnectButton = new Button(_("Connect"), "connect", this);
- mOkButton = new Button(_("OK"), "addServer", this);
- mCancelButton = new Button(_("Cancel"), "cancel", this);
-
mServerAddressField->addActionListener(this);
mPortField->addActionListener(this);