Proper detection whether SCTP is available. Do not update player names on configuration change if network client is running.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "session.h"
|
||||
#include "configfile.h"
|
||||
#include "tinyxml.h"
|
||||
#include <net/socket_startup.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -90,6 +91,8 @@ void joinNetworkGameDialogImpl::exec() {
|
||||
fillServerProfileList();
|
||||
}
|
||||
|
||||
checkBox_sctp->setEnabled(socket_has_sctp());
|
||||
|
||||
QDialog::exec();
|
||||
|
||||
}
|
||||
|
||||
@@ -511,10 +511,6 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
|
||||
myWaitingForServerGameDialog = new waitForServerToStartGameDialogImpl(this);
|
||||
myAboutPokerthDialog = new aboutPokerthImpl(this);
|
||||
|
||||
//dialog settings
|
||||
// mySettingsDialog->checkBox_useSctp->setEnabled(mySession->hasSctp());
|
||||
// myJoinNetworkGameDialog->checkBox_sctp->setEnabled(mySession->hasSctp());
|
||||
|
||||
// //ShortCuts
|
||||
// QShortcut *quitPokerTHKeys = new QShortcut(QKeySequence(Qt::Key_Control + Qt::Key_Q), this);
|
||||
// connect( quitPokerTHKeys, SIGNAL(activated() ), actionQuit, SLOT( trigger() ) );
|
||||
@@ -798,7 +794,7 @@ void mainWindowImpl::callSettingsDialog() {
|
||||
else { groupBox_RightToolBox->hide(); }
|
||||
|
||||
//Falls Spielernamen geändert wurden --> neu zeichnen --> erst beim nächsten Neustart neu ausgelesen
|
||||
if (mySettingsDialog->getPlayerNickIsChanged() && mySession->getCurrentGame()) {
|
||||
if (mySettingsDialog->getPlayerNickIsChanged() && mySession->getCurrentGame() && !mySession->isNetworkClientRunning()) {
|
||||
|
||||
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
|
||||
currentHand->getPlayerArray()[0]->setMyName(mySettingsDialog->lineEdit_HumanPlayerName->text().toUtf8().constData());
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "myavatarlistitem.h"
|
||||
|
||||
#include "configfile.h"
|
||||
#include <net/socket_startup.h>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -135,7 +136,8 @@ void settingsDialogImpl::exec() {
|
||||
lineEdit_logDir->setText(QString::fromUtf8(myConfig->readConfigString("LogDir").c_str()));
|
||||
spinBox_logStoreDuration->setValue(myConfig->readConfigInt("LogStoreDuration"));
|
||||
comboBox_logInterval->setCurrentIndex(myConfig->readConfigInt("LogInterval"));
|
||||
|
||||
|
||||
checkBox_useSctp->setEnabled(socket_has_sctp());
|
||||
|
||||
QDialog::exec();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user