This commit is contained in:
@@ -49,7 +49,7 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
|
|||||||
if(strcmp(argv[i], "--nowriteaccess") == 0) { noWriteAccess = 1; }
|
if(strcmp(argv[i], "--nowriteaccess") == 0) { noWriteAccess = 1; }
|
||||||
}
|
}
|
||||||
// !!!! Revisionsnummer der Configdefaults !!!!!
|
// !!!! Revisionsnummer der Configdefaults !!!!!
|
||||||
configRev = 24;
|
configRev = 25;
|
||||||
|
|
||||||
//standard defaults
|
//standard defaults
|
||||||
logOnOffDefault = "1";
|
logOnOffDefault = "1";
|
||||||
@@ -163,6 +163,7 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
|
|||||||
configList.push_back(ConfigInfo("NetTimeOutPlayerAction", CONFIG_TYPE_INT, "20"));
|
configList.push_back(ConfigInfo("NetTimeOutPlayerAction", CONFIG_TYPE_INT, "20"));
|
||||||
configList.push_back(ConfigInfo("ServerPassword", CONFIG_TYPE_STRING, ""));
|
configList.push_back(ConfigInfo("ServerPassword", CONFIG_TYPE_STRING, ""));
|
||||||
configList.push_back(ConfigInfo("ServerUseIpv6", CONFIG_TYPE_INT, "0"));
|
configList.push_back(ConfigInfo("ServerUseIpv6", CONFIG_TYPE_INT, "0"));
|
||||||
|
configList.push_back(ConfigInfo("ServerUseSctp", CONFIG_TYPE_INT, "0"));
|
||||||
configList.push_back(ConfigInfo("ServerPort", CONFIG_TYPE_INT, "7234"));
|
configList.push_back(ConfigInfo("ServerPort", CONFIG_TYPE_INT, "7234"));
|
||||||
configList.push_back(ConfigInfo("MyName", CONFIG_TYPE_STRING, "Human Player"));
|
configList.push_back(ConfigInfo("MyName", CONFIG_TYPE_STRING, "Human Player"));
|
||||||
configList.push_back(ConfigInfo("MyAvatar", CONFIG_TYPE_STRING, ""));
|
configList.push_back(ConfigInfo("MyAvatar", CONFIG_TYPE_STRING, ""));
|
||||||
|
|||||||
@@ -128,6 +128,12 @@ void joinNetworkGameDialogImpl::fillServerProfileList() {
|
|||||||
if( tempInt == 1 ) { isIpv6 = "yes"; }
|
if( tempInt == 1 ) { isIpv6 = "yes"; }
|
||||||
item->setData(3, 0, QString::fromUtf8(isIpv6.c_str()));
|
item->setData(3, 0, QString::fromUtf8(isIpv6.c_str()));
|
||||||
|
|
||||||
|
string isSctp = "no";
|
||||||
|
int tempInt1 = 0;
|
||||||
|
profile->QueryIntAttribute("IsSctp", &tempInt1 );
|
||||||
|
if( tempInt1 == 1 ) { isSctp = "yes"; }
|
||||||
|
item->setData(4, 0, QString::fromUtf8(isSctp.c_str()));
|
||||||
|
|
||||||
treeWidget->addTopLevelItem(item);
|
treeWidget->addTopLevelItem(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,6 +165,7 @@ void joinNetworkGameDialogImpl::itemFillForm (QTreeWidgetItem* item, int column)
|
|||||||
lineEdit_password->setText(QString::fromUtf8(profile->Attribute("Password")));
|
lineEdit_password->setText(QString::fromUtf8(profile->Attribute("Password")));
|
||||||
spinBox_port->setValue(QString::fromUtf8(profile->Attribute("Port")).toInt(&toIntTrue, 10));
|
spinBox_port->setValue(QString::fromUtf8(profile->Attribute("Port")).toInt(&toIntTrue, 10));
|
||||||
checkBox_ipv6->setChecked(QString::fromUtf8(profile->Attribute("IsIpv6")).toInt(&toIntTrue, 10));
|
checkBox_ipv6->setChecked(QString::fromUtf8(profile->Attribute("IsIpv6")).toInt(&toIntTrue, 10));
|
||||||
|
checkBox_sctp->setChecked(QString::fromUtf8(profile->Attribute("IsSctp")).toInt(&toIntTrue, 10));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,6 +207,7 @@ void joinNetworkGameDialogImpl::saveServerProfile() {
|
|||||||
profile1->SetAttribute("Password", lineEdit_password->text().toUtf8().constData());
|
profile1->SetAttribute("Password", lineEdit_password->text().toUtf8().constData());
|
||||||
profile1->SetAttribute("Port", spinBox_port->value());
|
profile1->SetAttribute("Port", spinBox_port->value());
|
||||||
profile1->SetAttribute("IsIpv6", checkBox_ipv6->isChecked());
|
profile1->SetAttribute("IsIpv6", checkBox_ipv6->isChecked());
|
||||||
|
profile1->SetAttribute("IsSctp", checkBox_sctp->isChecked());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QMessageBox::No:
|
case QMessageBox::No:
|
||||||
@@ -220,6 +228,7 @@ void joinNetworkGameDialogImpl::saveServerProfile() {
|
|||||||
profile2->SetAttribute("Password", lineEdit_password->text().toUtf8().constData());
|
profile2->SetAttribute("Password", lineEdit_password->text().toUtf8().constData());
|
||||||
profile2->SetAttribute("Port", spinBox_port->value());
|
profile2->SetAttribute("Port", spinBox_port->value());
|
||||||
profile2->SetAttribute("IsIpv6", checkBox_ipv6->isChecked());
|
profile2->SetAttribute("IsIpv6", checkBox_ipv6->isChecked());
|
||||||
|
profile2->SetAttribute("IsSctp", checkBox_sctp->isChecked());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -511,6 +511,9 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
myWaitingForServerGameDialog = new waitForServerToStartGameDialogImpl(this);
|
myWaitingForServerGameDialog = new waitForServerToStartGameDialogImpl(this);
|
||||||
myAboutPokerthDialog = new aboutPokerthImpl(this);
|
myAboutPokerthDialog = new aboutPokerthImpl(this);
|
||||||
|
|
||||||
|
//dialog settings
|
||||||
|
// mySettingsDialog->checkBox_useSctp->setEnabled(mySession->hasSctp());
|
||||||
|
// myJoinNetworkGameDialog->checkBox_sctp->setEnabled(mySession->hasSctp());
|
||||||
|
|
||||||
// //ShortCuts
|
// //ShortCuts
|
||||||
// QShortcut *quitPokerTHKeys = new QShortcut(QKeySequence(Qt::Key_Control + Qt::Key_Q), this);
|
// QShortcut *quitPokerTHKeys = new QShortcut(QKeySequence(Qt::Key_Control + Qt::Key_Q), this);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<item row="0" column="1" >
|
<item row="0" column="1" >
|
||||||
<widget class="QStackedWidget" name="stackedWidget" >
|
<widget class="QStackedWidget" name="stackedWidget" >
|
||||||
<property name="currentIndex" >
|
<property name="currentIndex" >
|
||||||
<number>3</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="page" >
|
<widget class="QWidget" name="page" >
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
@@ -725,7 +725,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>15</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="2" >
|
<item row="1" column="2" >
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ void settingsDialogImpl::exec() {
|
|||||||
spinBox_serverPort->setValue(myConfig->readConfigInt("ServerPort"));
|
spinBox_serverPort->setValue(myConfig->readConfigInt("ServerPort"));
|
||||||
lineEdit_serverPassword->setText(QString::fromUtf8(myConfig->readConfigString("ServerPassword").c_str()));
|
lineEdit_serverPassword->setText(QString::fromUtf8(myConfig->readConfigString("ServerPassword").c_str()));
|
||||||
checkBox_useIpv6->setChecked(myConfig->readConfigInt("ServerUseIpv6"));
|
checkBox_useIpv6->setChecked(myConfig->readConfigInt("ServerUseIpv6"));
|
||||||
|
checkBox_useSctp->setChecked(myConfig->readConfigInt("ServerUseSctp"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -187,6 +188,7 @@ void settingsDialogImpl::isAccepted() {
|
|||||||
myConfig->writeConfigInt("ServerPort", spinBox_serverPort->value());
|
myConfig->writeConfigInt("ServerPort", spinBox_serverPort->value());
|
||||||
myConfig->writeConfigString("ServerPassword", lineEdit_serverPassword->text().toUtf8().constData());
|
myConfig->writeConfigString("ServerPassword", lineEdit_serverPassword->text().toUtf8().constData());
|
||||||
myConfig->writeConfigInt("ServerUseIpv6", checkBox_useIpv6->isChecked());
|
myConfig->writeConfigInt("ServerUseIpv6", checkBox_useIpv6->isChecked());
|
||||||
|
myConfig->writeConfigInt("ServerUseSctp", checkBox_useSctp->isChecked());
|
||||||
|
|
||||||
// Interface
|
// Interface
|
||||||
myConfig->writeConfigInt("ShowLeftToolBox", checkBox_showLeftToolbox->isChecked());
|
myConfig->writeConfigInt("ShowLeftToolBox", checkBox_showLeftToolbox->isChecked());
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
Session::Session(GuiInterface *g, ConfigFile *c)
|
Session::Session(GuiInterface *g, ConfigFile *c)
|
||||||
: currentGameID(0), myNetClient(0), myNetServer(0), myGui(g), myConfig(c)
|
: currentGameID(0), myNetClient(0), myNetServer(0), myGui(g), myConfig(c), thisHasSctp(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ public:
|
|||||||
|
|
||||||
bool isNetworkClientRunning() const; // TODO hack
|
bool isNetworkClientRunning() const; // TODO hack
|
||||||
|
|
||||||
|
void setHasSctp ( bool theValue ) { thisHasSctp = theValue; }
|
||||||
|
bool hasSctp() const { return thisHasSctp; }
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
int currentGameID;
|
int currentGameID;
|
||||||
@@ -74,6 +78,8 @@ private:
|
|||||||
GuiInterface *myGui;
|
GuiInterface *myGui;
|
||||||
ConfigFile *myConfig;
|
ConfigFile *myConfig;
|
||||||
|
|
||||||
|
bool thisHasSctp;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user