From 883d05ad7dd8e33c862334c48dc2d912aced551b Mon Sep 17 00:00:00 2001 From: doitux Date: Thu, 15 Nov 2012 09:35:49 +0100 Subject: [PATCH] bugfix for #148 --- src/gui/qt/settingsdialog.ui | 162 +++++++++--------- .../qt/settingsdialog/settingsdialogimpl.cpp | 16 +- 2 files changed, 91 insertions(+), 87 deletions(-) diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui index 1da41760..a6d320cc 100644 --- a/src/gui/qt/settingsdialog.ui +++ b/src/gui/qt/settingsdialog.ui @@ -1561,8 +1561,8 @@ p, li { white-space: pre-wrap; } - - + + QLabel { font-weight: bold; } @@ -1572,14 +1572,14 @@ p, li { white-space: pre-wrap; } - + Qt::Horizontal - + 0 @@ -1588,8 +1588,8 @@ p, li { white-space: pre-wrap; } Server - - + + Automatic Server Configuration URL @@ -1597,28 +1597,25 @@ p, li { white-space: pre-wrap; } true - - + + + 4 + + Serverlist Address: - + - + - - - 0 - 116 - - Manual Server Configuration @@ -1679,70 +1676,6 @@ p, li { white-space: pre-wrap; } - - - - - - Use IPv6 - - - - - - - <a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a> - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Use SCTP - - - - - - - <a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a> - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - @@ -1935,11 +1868,78 @@ p, li { white-space: pre-wrap; } - + + + + + + Use IPv6 + + + + + + + <a href="http://en.wikipedia.org/wiki/Ipv6">What is this?</a> + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Use SCTP + + + + + + + <a href="http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol">What is this?</a> + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + Qt::Vertical + + QSizePolicy::Expanding + 20 diff --git a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp index a6ae15d4..ff1aebe0 100644 --- a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp +++ b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp @@ -213,12 +213,11 @@ void settingsDialogImpl::prepareDialog() checkBox_useIpv6->setChecked(myConfig->readConfigInt("ServerUseIpv6")); checkBox_useSctp->setChecked(myConfig->readConfigInt("ServerUseSctp")); - //Internet Game Settings - if(myConfig->readConfigInt("InternetServerConfigMode")) { - groupBox_manualServerConfig->setChecked(TRUE); - } else { - groupBox_automaticServerConfig->setChecked(TRUE); - } + //Internet Game Settings + + checkBox_InternetServerUseSctp->hide(); //temporarely disabled until sctp support is back + label_whatIsSctp->hide(); + lineEdit_InternetServerListAddress->setText(QString::fromUtf8(myConfig->readConfigString("InternetServerListAddress").c_str())); lineEdit_InternetServerAddress->setText(QString::fromUtf8(myConfig->readConfigString("InternetServerAddress").c_str())); spinBox_InternetServerPort->setValue(myConfig->readConfigInt("InternetServerPort")); @@ -240,6 +239,11 @@ void settingsDialogImpl::prepareDialog() checkBox_InetGane_AutoLeaveTheTableAfterGameFinished->setChecked(myConfig->readConfigInt("NetAutoLeaveGameAfterFinish")); comboBox_internetGameType->setCurrentIndex(myConfig->readConfigInt("InternetGameType")); lineEdit_internetGameName->setText(QString::fromUtf8(myConfig->readConfigString("InternetGameName").c_str())); + if(myConfig->readConfigInt("InternetServerConfigMode")) { + groupBox_manualServerConfig->setChecked(TRUE); + } else { + groupBox_automaticServerConfig->setChecked(TRUE); + } std::list playerIgnoreList = myConfig->readConfigStringList("PlayerIgnoreList"); std::list::iterator it5;