commit b33d85f1e130c2e40f656e65da6975da69098f2b Author: Tomás Touceda chiiph@torproject.org Date: Wed Aug 15 20:58:54 2012 -0300
Improve displaying settings at first run --- src/vidalia/config/ServerPage.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/vidalia/config/ServerPage.cpp b/src/vidalia/config/ServerPage.cpp index 35d3955..2f5942f 100644 --- a/src/vidalia/config/ServerPage.cpp +++ b/src/vidalia/config/ServerPage.cpp @@ -112,6 +112,9 @@ ServerPage::ServerPage(QWidget *parent) connect(ui.cmbTime, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(toggleDisplayDay(const QString &)));
+ connect(ui.chkEnableTransports, SIGNAL(stateChanged(int)), + this, SLOT(toggleTransports(int))); + /* Set validators for address, mask and various port number fields */ ui.lineServerNickname->setValidator(new NicknameValidator(this)); ui.lineServerPort->setValidator(new QIntValidator(1, 65535, this)); @@ -247,7 +250,7 @@ ServerPage::serverModeChanged(bool enabled) TransportSettings transports; ui.transportsFrame->setVisible(enabled && bridgeEnabled && transports.getTransports().size() > 0);
- if (ui.transportsFrame->isVisible()) { + if (enabled && bridgeEnabled && transports.getTransports().size() > 0) { QStringList transportList = transports.getTransports(); foreach(QString transport, transportList) { QCheckBox *chkTransport = new QCheckBox(transport); @@ -784,8 +787,6 @@ ServerPage::toggleDisplayDay(const QString &str) void ServerPage::loadTransports() { - disconnect(ui.chkEnableTransports, 0, 0, 0); - connect(ui.chkEnableTransports, SIGNAL(stateChanged(int)), this, SLOT(toggleTransports(int))); QStringList stps = Vidalia::torrc()->value("ServerTransportPlugin"); ui.chkEnableTransports->setCheckState(stps.size() > 0 ? Qt::Checked : Qt::Unchecked); toggleTransports(stps.size() > 0 ? Qt::Checked : Qt::Unchecked);
tor-commits@lists.torproject.org