diff --git a/src/gui/qt/gametable/log/guilog.cpp b/src/gui/qt/gametable/log/guilog.cpp index 2fba454f..39bc3419 100644 --- a/src/gui/qt/gametable/log/guilog.cpp +++ b/src/gui/qt/gametable/log/guilog.cpp @@ -43,6 +43,7 @@ guiLog::guiLog(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir( connect(this, SIGNAL(signalLogDealBoardCardsMsg(int, int, int, int, int, int)), this, SLOT(logDealBoardCardsMsg(int, int, int, int, int, int))); connect(this, SIGNAL(signalLogFlipHoleCardsMsg(QString, int, int, int, QString)), this, SLOT(logFlipHoleCardsMsg(QString, int, int, int, QString))); connect(this, SIGNAL(signalLogPlayerLeftMsg(QString, int)), this, SLOT(logPlayerLeftMsg(QString, int))); + connect(this, SIGNAL(signalLogPlayerJoinedMsg(QString)), this, SLOT(logPlayerJoinedMsg(QString))); connect(this, SIGNAL(signalLogNewGameAdminMsg(QString)), this, SLOT(logNewGameAdminMsg(QString))); connect(this, SIGNAL(signalLogPlayerWinGame(QString, int)), this, SLOT(logPlayerWinGame(QString, int))); connect(this, SIGNAL(signalFlushLogAtGame(int)), this, SLOT(flushLogAtGame(int))); @@ -684,6 +685,12 @@ void guiLog::logNewGameAdminMsg(QString playerName) } } +void guiLog::logPlayerJoinedMsg(QString playerName) +{ + myW->textBrowser_Log->append("getChatLogTextColor()+";\">"+playerName+" has joined the game!"); +} + + void guiLog::logPlayerWinGame(QString playerName, int gameID) { diff --git a/src/gui/qt/gametable/log/guilog.h b/src/gui/qt/gametable/log/guilog.h index 8284a9dc..656fbb9d 100644 --- a/src/gui/qt/gametable/log/guilog.h +++ b/src/gui/qt/gametable/log/guilog.h @@ -50,6 +50,7 @@ public slots: void logDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1); void logFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows"); void logPlayerLeftMsg(QString playerName, int wasKicked); + void logPlayerJoinedMsg(QString playerName); void logNewGameAdminMsg(QString playerName); void logPlayerWinGame(QString playerName, int gameID); void flushLogAtGame(int gameID); @@ -70,6 +71,7 @@ signals: void signalLogDealBoardCardsMsg(int roundID, int card1, int card2, int card3, int card4 = -1, int card5 = -1); void signalLogFlipHoleCardsMsg(QString playerName, int card1, int card2, int cardsValueInt = -1, QString showHas = "shows"); void signalLogPlayerLeftMsg(QString playerName, int wasKicked); + void signalLogPlayerJoinedMsg(QString playerName); void signalLogNewGameAdminMsg(QString playerName); void signalLogPlayerWinGame(QString playerName, int gameID); void signalFlushLogAtGame(int gameID); diff --git a/src/gui/qt/guiwrapper.cpp b/src/gui/qt/guiwrapper.cpp index 39fa7139..afd66c7d 100644 --- a/src/gui/qt/guiwrapper.cpp +++ b/src/gui/qt/guiwrapper.cpp @@ -336,7 +336,11 @@ void GuiWrapper::SignalNetClientSelfJoined(unsigned playerId, const string &play } void GuiWrapper::SignalNetClientPlayerJoined(unsigned playerId, const string &playerName, bool isGameAdmin) { - myStartWindow->signalNetClientPlayerJoined(playerId, QString::fromUtf8(playerName.c_str()), isGameAdmin); + myStartWindow->signalNetClientPlayerJoined(playerId, QString::fromUtf8(playerName.c_str()), isGameAdmin); + if (!playerName.empty() && playerName[0] != '#' && myW->isVisible()) { + QString tmpName(QString::fromUtf8(playerName.c_str())); + myGuiLog->signalLogPlayerJoinedMsg(tmpName); + } } void GuiWrapper::SignalNetClientPlayerChanged(unsigned playerId, const string &newPlayerName) {