# HG changeset patch # User sheepluva # Date 1363856910 -3600 # Node ID 688062f1db59942108d59a0a31c6d6eae449acc1 # Parent 388d2bf73ff9cdb5964f0f3339fdc2be25ee69ee fix/hack so that (own) messages sent in frontend are also visible in the game chat diff -r 388d2bf73ff9 -r 688062f1db59 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Thu Mar 21 09:27:35 2013 +0100 +++ b/QTfrontend/hwform.cpp Thu Mar 21 10:08:30 2013 +0100 @@ -1259,7 +1259,7 @@ connect(hwnet, SIGNAL(roomMaster(bool)), ui.pageNetGame->chatWidget, SLOT(adminAccess(bool)), Qt::QueuedConnection); connect(ui.pageNetGame->chatWidget, SIGNAL(chatLine(const QString&)), - hwnet, SLOT(chatLineToNet(const QString&))); + hwnet, SLOT(chatLineToNetWithEcho(const QString&))); connect(ui.pageNetGame->BtnGo, SIGNAL(clicked()), hwnet, SLOT(ToggleReady())); connect(hwnet, SIGNAL(setMyReadyStatus(bool)), ui.pageNetGame, SLOT(setReadyStatus(bool)), Qt::QueuedConnection); diff -r 388d2bf73ff9 -r 688062f1db59 QTfrontend/net/newnetclient.cpp --- a/QTfrontend/net/newnetclient.cpp Thu Mar 21 09:27:35 2013 +0100 +++ b/QTfrontend/net/newnetclient.cpp Thu Mar 21 10:08:30 2013 +0100 @@ -850,6 +850,15 @@ ); } +void HWNewNet::chatLineToNetWithEcho(const QString& str) +{ + if(str != "") + { + emit chatStringFromNet(HWProto::formatChatMsg(mynick, str)); + chatLineToNet(str); + } +} + void HWNewNet::chatLineToNet(const QString& str) { if(str != "") diff -r 388d2bf73ff9 -r 688062f1db59 QTfrontend/net/newnetclient.h --- a/QTfrontend/net/newnetclient.h Thu Mar 21 09:27:35 2013 +0100 +++ b/QTfrontend/net/newnetclient.h Thu Mar 21 10:08:30 2013 +0100 @@ -143,6 +143,7 @@ public slots: void ToggleReady(); void chatLineToNet(const QString& str); + void chatLineToNetWithEcho(const QString&); void chatLineToLobby(const QString& str); void SendTeamMessage(const QString& str); void SendNet(const QByteArray & buf);