diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-02 21:57:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-02 22:00:37 +0300 |
commit | eca890c92d3b43b8aae5f2c53cab49612f5efd1d (patch) | |
tree | 8acbdfe972044adcfbcc5a6bf7ea28b4bbb54382 /src/gui/windows/editserverdialog.cpp | |
parent | 520a495c466793c29f3e721634dfe6cc616b8ede (diff) | |
download | mv-eca890c92d3b43b8aae5f2c53cab49612f5efd1d.tar.gz mv-eca890c92d3b43b8aae5f2c53cab49612f5efd1d.tar.bz2 mv-eca890c92d3b43b8aae5f2c53cab49612f5efd1d.tar.xz mv-eca890c92d3b43b8aae5f2c53cab49612f5efd1d.zip |
Add option "use same ip" for each server.
By default all servers using same ip for subservers.
Diffstat (limited to 'src/gui/windows/editserverdialog.cpp')
-rw-r--r-- | src/gui/windows/editserverdialog.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp index 6a25a2d77..a3b687113 100644 --- a/src/gui/windows/editserverdialog.cpp +++ b/src/gui/windows/editserverdialog.cpp @@ -31,6 +31,7 @@ #include "gui/windows/serverdialog.h" #include "gui/widgets/button.h" +#include "gui/widgets/checkbox.h" #include "gui/widgets/dropdown.h" #include "gui/widgets/label.h" #include "gui/widgets/layout.h" @@ -56,6 +57,9 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent, mOkButton(new Button(this, _("OK"), "addServer", this)), // TRANSLATORS: edit server dialog button mCancelButton(new Button(this, _("Cancel"), "cancel", this)), + // TRANSLATORS: edit server dialog label + mPersistentIp(new CheckBox(this, _("Use same ip"), + true, this, "persistentIp")), mTypeListModel(new TypeListModel), mTypeField(new DropDown(this, mTypeListModel, false, true)), mServerDialog(parent), @@ -96,9 +100,10 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent, place(1, 4, mDescriptionField, 4).setPadding(3); place(0, 5, onlineListUrlLabel); place(1, 5, mOnlineListUrlField, 4).setPadding(3); - place(0, 6, mConnectButton); - place(4, 6, mOkButton); - place(3, 6, mCancelButton); + place(0, 6, mPersistentIp, 4).setPadding(3); + place(0, 7, mConnectButton); + place(4, 7, mOkButton); + place(3, 7, mCancelButton); // Do this manually instead of calling reflowLayout so we can enforce a // minimum width. @@ -132,6 +137,7 @@ EditServerDialog::EditServerDialog(ServerDialog *const parent, mOnlineListUrlField->setText(mServer.onlineListUrl); mServerAddressField->setText(mServer.hostname); mPortField->setText(toString(mServer.port)); + mPersistentIp->setSelected(mServer.persistentIp); switch (mServer.type) { @@ -200,6 +206,7 @@ void EditServerDialog::action(const ActionEvent &event) mServer.hostname = mServerAddressField->getText(); mServer.port = static_cast<int16_t>(atoi( mPortField->getText().c_str())); + mServer.persistentIp = mPersistentIp->isSelected(); if (mTypeField) { |