diff --git a/src/config/configfile.cpp b/src/config/configfile.cpp
index 24194db6..eaf83692 100644
--- a/src/config/configfile.cpp
+++ b/src/config/configfile.cpp
@@ -52,7 +52,7 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
if(strcmp(argv[i], "--nowriteaccess") == 0) { noWriteAccess = 1; }
}
// !!!! Revisionsnummer der Configdefaults !!!!!
- configRev = 44;
+ configRev = 45;
//standard defaults
logOnOffDefault = "1";
@@ -162,6 +162,7 @@ ConfigFile::ConfigFile(int argc, char **argv) : noWriteAccess(0)
configList.push_back(ConfigInfo("SoundVolume", CONFIG_TYPE_INT, "8"));
configList.push_back(ConfigInfo("PlayGameActions", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("PlayLobbyChatNotification", CONFIG_TYPE_INT, "1"));
+ configList.push_back(ConfigInfo("PlayNetworkGameNotification", CONFIG_TYPE_INT, "1"));
configList.push_back(ConfigInfo("NumberOfPlayers", CONFIG_TYPE_INT, "7"));
configList.push_back(ConfigInfo("StartCash", CONFIG_TYPE_INT, "3000"));
configList.push_back(ConfigInfo("FirstSmallBlind", CONFIG_TYPE_INT, "10"));
diff --git a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp
index ae358562..1420a6c3 100644
--- a/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp
+++ b/src/gui/qt/gamelobbydialog/gamelobbydialogimpl.cpp
@@ -378,15 +378,14 @@ void gameLobbyDialogImpl::addConnectedPlayer(unsigned playerId, QString playerNa
item->setData(0, Qt::UserRole, playerId);
item->setData(0, Qt::DisplayRole, playerName);
-/* assert(mySession);
- GameInfo info = mySession->getClientGameInfo(currentGameName.toUtf8().constData());
-
- if(treeWidget_connectedPlayers->topLevelItemCount() != info.data.maxNumberOfPlayers) {
- myW->getMySDLPlayer()->playSound("playerconnected", 0);
+ if(this->isVisible() && inGame && && myConfig->readConfigInt("PlayNetworkGameNotification")) {
+ if(treeWidget_connectedPlayers->topLevelItemCount() < label_MaximumNumberOfPlayers->text().toInt()) {
+ myW->getMySDLPlayer()->playSound("playerconnected", 0);
+ }
+ else {
+ myW->getMySDLPlayer()->playSound("onlinegameready", 0);
+ }
}
- else {
- myW->getMySDLPlayer()->playSound("onlinegameready", 0);
- }*/
checkPlayerQuantity();
}
diff --git a/src/gui/qt/settingsdialog.ui b/src/gui/qt/settingsdialog.ui
index 2e922a97..bdc47d3f 100644
--- a/src/gui/qt/settingsdialog.ui
+++ b/src/gui/qt/settingsdialog.ui
@@ -383,7 +383,14 @@ p, li { white-space: pre-wrap; }
-
- Play notifications for lobby chat
+ Play lobby chat notifications
+
+
+
+ -
+
+
+ Play network/internet game notifications like "player joined the game"
diff --git a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp
index bf55467f..3120e685 100644
--- a/src/gui/qt/settingsdialog/settingsdialogimpl.cpp
+++ b/src/gui/qt/settingsdialog/settingsdialogimpl.cpp
@@ -177,6 +177,7 @@ void settingsDialogImpl::exec() {
horizontalSlider_soundVolume->setValue(myConfig->readConfigInt("SoundVolume"));
checkBox_playGameActions->setChecked(myConfig->readConfigInt("PlayGameActions"));
checkBox_playLobbyChatNotification->setChecked(myConfig->readConfigInt("PlayLobbyChatNotification"));
+ checkBox_playNetworkGameNotification->setChecked(myConfig->readConfigInt("PlayNetworkGameNotification"));
//Log
groupBox_logOnOff->setChecked(myConfig->readConfigInt("LogOnOff"));
@@ -305,6 +306,7 @@ void settingsDialogImpl::isAccepted() {
myConfig->writeConfigInt("SoundVolume", horizontalSlider_soundVolume->value());
myConfig->writeConfigInt("PlayGameActions", checkBox_playGameActions->isChecked());
myConfig->writeConfigInt("PlayLobbyChatNotification", checkBox_playLobbyChatNotification->isChecked());
+ myConfig->writeConfigInt("PlayNetworkGameNotification", checkBox_playNetworkGameNotification->isChecked());
// Log
myConfig->writeConfigInt("LogOnOff", groupBox_logOnOff->isChecked());
diff --git a/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp b/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp
index 5d7455d4..7553b628 100644
--- a/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp
+++ b/src/gui/qt/startnetworkgamedialog/startnetworkgamedialogimpl.cpp
@@ -74,11 +74,15 @@ void startNetworkGameDialogImpl::addConnectedPlayer(unsigned playerId, QString p
item->setData(0, Qt::UserRole, playerId);
item->setData(0, Qt::DisplayRole, playerName);
- if(treeWidget->topLevelItemCount() != maxPlayerNumber) {
- myW->getMySDLPlayer()->playSound("playerconnected", 0);
- }
- else {
- myW->getMySDLPlayer()->playSound("onlinegameready", 0);
+ GameInfo info = mySession->getClientGameInfo(0);
+
+ if(this->isVisible() && myConfig->readConfigInt("PlayNetworkGameNotification")) {
+ if(treeWidget->topLevelItemCount() < info.data.maxNumberOfPlayers) {
+ myW->getMySDLPlayer()->playSound("playerconnected", 0);
+ }
+ else {
+ myW->getMySDLPlayer()->playSound("onlinegameready", 0);
+ }
}
checkPlayerQuantity();