diff --git a/src/gui/generic/serverguiwrapper.cpp b/src/gui/generic/serverguiwrapper.cpp
index 6a3c8dfd..c8eb5df4 100644
--- a/src/gui/generic/serverguiwrapper.cpp
+++ b/src/gui/generic/serverguiwrapper.cpp
@@ -95,6 +95,7 @@ void ServerGuiWrapper::logNewGameHandMsg(int gameID, int handID) {}
void ServerGuiWrapper::logPlayerWinsMsg(int playerID, int pot) {}
void ServerGuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5) {}
void ServerGuiWrapper::logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt, std::string showHas) {}
+void ServerGuiWrapper::logPlayerLeftMsg(int playerID) {}
void ServerGuiWrapper::SignalNetClientConnect(int actionID) { if (myClientcb) myClientcb->SignalNetClientConnect(actionID); }
void ServerGuiWrapper::SignalNetClientGameInfo(int actionID) { if (myClientcb) myClientcb->SignalNetClientGameInfo(actionID); }
diff --git a/src/gui/generic/serverguiwrapper.h b/src/gui/generic/serverguiwrapper.h
index 81019522..924382a4 100644
--- a/src/gui/generic/serverguiwrapper.h
+++ b/src/gui/generic/serverguiwrapper.h
@@ -79,6 +79,7 @@ public:
void logPlayerWinsMsg(int playerID, int pot);
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) ;
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") ;
+ void logPlayerLeftMsg(int playerID);
void SignalNetClientConnect(int actionID);
void SignalNetClientGameInfo(int actionID);
diff --git a/src/gui/guiinterface.h b/src/gui/guiinterface.h
index 9340922a..89a753a4 100644
--- a/src/gui/guiinterface.h
+++ b/src/gui/guiinterface.h
@@ -90,6 +90,7 @@ public:
virtual void logPlayerWinsMsg(int playerID, int pot) = 0;
virtual void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1) = 0;
virtual void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows") = 0;
+ virtual void logPlayerLeftMsg(int playerID) =0;
};
#endif
diff --git a/src/gui/qt/guiwrapper.cpp b/src/gui/qt/guiwrapper.cpp
index 1268f093..0f3e3a31 100644
--- a/src/gui/qt/guiwrapper.cpp
+++ b/src/gui/qt/guiwrapper.cpp
@@ -93,7 +93,7 @@ void GuiWrapper::logNewGameHandMsg(int gameID, int handID) { myLog->signalLogNew
void GuiWrapper::logPlayerWinsMsg(int playerID, int pot) { myLog->signalLogPlayerWinsMsg(playerID, pot); }
void GuiWrapper::logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4, int card5) { myLog->signalLogDealBoardCardsMsg(roundID, card1, card2, card3, card4, card5); }
void GuiWrapper::logFlipHoleCardsMsg(string playerName, int card1, int card2, int cardsValueInt, string showHas) { myLog->signalLogFlipHoleCardsMsg(playerName, card1, card2, cardsValueInt, showHas); }
-
+void GuiWrapper::logPlayerLeftMsg(int playerID) { myLog->signalLogPlayerLeftMsg(playerID); }
void GuiWrapper::SignalNetClientConnect(int actionID) { myW->signalNetClientConnect(actionID); }
void GuiWrapper::SignalNetClientGameInfo(int actionID) { myW->signalNetClientGameInfo(actionID); }
diff --git a/src/gui/qt/guiwrapper.h b/src/gui/qt/guiwrapper.h
index 997697de..d4f889a9 100644
--- a/src/gui/qt/guiwrapper.h
+++ b/src/gui/qt/guiwrapper.h
@@ -87,6 +87,7 @@ public:
void logPlayerWinsMsg(int playerID, int pot);
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
+ void logPlayerLeftMsg(int playerID);
void SignalNetClientConnect(int actionID);
void SignalNetClientGameInfo(int actionID);
diff --git a/src/gui/qt/mainwindow/log/log.cpp b/src/gui/qt/mainwindow/log/log.cpp
index 7036e80d..70ceaf04 100644
--- a/src/gui/qt/mainwindow/log/log.cpp
+++ b/src/gui/qt/mainwindow/log/log.cpp
@@ -36,6 +36,8 @@ Log::Log(mainWindowImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), m
connect(this, SIGNAL(signalLogPlayerWinsMsg(int, int)), this, SLOT(logPlayerWinsMsg(int, int)));
connect(this, SIGNAL(signalLogDealBoardCardsMsg(int, int, int, int, int, int)), this, SLOT(logDealBoardCardsMsg(int, int, int, int, int, int)));
connect(this, SIGNAL(signalLogFlipHoleCardsMsg(std::string, int, int, int, std::string)), this, SLOT(logFlipHoleCardsMsg(std::string, int, int, int, std::string)));
+ connect(this, SIGNAL(signalLogPlayerLeftMsg(int)), this, SLOT(logPlayerLeftMsg(int)));
+
logFileStreamString = "";
lastGameID = 0;
@@ -440,6 +442,24 @@ void Log::logFlipHoleCardsMsg(string playerName, int card1, int card2, int cards
}
+void Log::logPlayerLeftMsg(int playerID) {
+
+ HandInterface *currentHand = myW->getSession().getCurrentGame()->getCurrentHand();
+
+ myW->textBrowser_Log->append( ""+QString::fromUtf8(currentHand->getPlayerArray()[playerID]->getMyName().c_str())+" has left the game!");
+
+ if(myConfig->readConfigInt("LogOnOff")) {
+
+ logFileStreamString += ""+QString::fromUtf8(currentHand->getPlayerArray()[playerID]->getMyName().c_str())+" has left the game!
\n";
+
+ if(myConfig->readConfigInt("LogInterval") == 0) {
+ writeLogFileStream(logFileStreamString);
+ logFileStreamString = "";
+ }
+ }
+}
+
+
QStringList Log::translateCardCode(int cardCode) {
int value = cardCode%13;
diff --git a/src/gui/qt/mainwindow/log/log.h b/src/gui/qt/mainwindow/log/log.h
index 8d7f4a68..afc32859 100644
--- a/src/gui/qt/mainwindow/log/log.h
+++ b/src/gui/qt/mainwindow/log/log.h
@@ -46,6 +46,8 @@ public slots:
void logPlayerWinsMsg(int playerID, int pot);
void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
void logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
+ void logPlayerLeftMsg(int playerID);
+
public:
QStringList translateCardsValueCode(int cardsValueCode);
@@ -59,6 +61,7 @@ signals:
void signalLogPlayerWinsMsg(int playerID, int pot);
void signalLogDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1);
void signalLogFlipHoleCardsMsg(std::string playerName, int card1, int card2, int cardsValueInt = -1, std::string showHas = "shows");
+ void signalLogPlayerLeftMsg(int playerID);
private:
diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp
index 2bb0b14a..749bcda6 100755
--- a/src/gui/qt/mainwindow/mainwindowimpl.cpp
+++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp
@@ -2510,9 +2510,7 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
if (event->key() == Qt::Key_F11) { switchRightToolBox(); }
if (event->key() == Qt::Key_D) { setLabelArray[0]->startTimeOutAnimation(myConfig->readConfigInt("NetTimeOutPlayerAction")); } //f
if (event->key() == Qt::Key_E) { setLabelArray[0]->stopTimeOutAnimation(); } //f
- if (event->key() == Qt::Key_S) { if(myConfig->readConfigInt("PlaySoundEffects")) mySDLPlayer->playSound("call"); } //s
- if (event->key() == Qt::Key_A) { if(myConfig->readConfigInt("PlaySoundEffects")) mySDLPlayer->playSound("raise"); } //s
- if (event->key() == Qt::Key_X) { if(myConfig->readConfigInt("PlaySoundEffects")) mySDLPlayer->playSound(""); } //s
+ if (event->key() == Qt::Key_S) { mySession->getGui()->logPlayerLeftMsg(2); } //s
// if (event->key() == Qt::Key_W) { qApp->quit(); } //s
if (event->key() == 16777249) {
pushButton_break->click();