diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-06 20:57:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-06 22:58:35 +0300 |
commit | 4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f (patch) | |
tree | a776928bb1339cdd29eb2e54d50eb3fa6e3448d7 /src/gui/editserverdialog.cpp | |
parent | 22ed653d8b630c813333d5c73a4ca02dede2a5a5 (diff) | |
download | ManaVerse-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.gz ManaVerse-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.bz2 ManaVerse-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.xz ManaVerse-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.zip |
Improve constructors in some classes.
Diffstat (limited to 'src/gui/editserverdialog.cpp')
-rw-r--r-- | src/gui/editserverdialog.cpp | 22 |
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); |