# HG changeset patch # User displacer # Date 1169150344 0 # Node ID 5b37d6a39829d770c326570dad759fc352475b65 # Parent c91b983de18f5a24f02a6618827e26b253d3de89 disable widgets if we are slave network client diff -r c91b983de18f -r 5b37d6a39829 QTfrontend/gamecfgwidget.cpp --- a/QTfrontend/gamecfgwidget.cpp Wed Jan 17 21:32:52 2007 +0000 +++ b/QTfrontend/gamecfgwidget.cpp Thu Jan 18 19:59:04 2007 +0000 @@ -24,7 +24,7 @@ #include #include "gamecfgwidget.h" -GameCFGWidget::GameCFGWidget(QWidget* parent) : +GameCFGWidget::GameCFGWidget(QWidget* parent, bool externalControl) : QWidget(parent), mainLayout(this) { mainLayout.setMargin(0); @@ -71,7 +71,7 @@ connect(SB_InitHealth, SIGNAL(valueChanged(int)), this, SLOT(onInitHealthChanged(int))); connect(SB_TurnTime, SIGNAL(valueChanged(int)), this, SLOT(onTurnTimeChanged(int))); connect(CB_mode_Forts, SIGNAL(toggled(bool)), this, SLOT(onFortsModeChanged(bool))); - + connect(pMapContainer, SIGNAL(seedChanged(const QString &)), this, SLOT(onSeedChanged(const QString &))); connect(pMapContainer, SIGNAL(themeChanged(const QString &)), this, SLOT(onThemeChanged(const QString &))); connect(pMapContainer, SIGNAL(mapChanged(const QString &)), this, SLOT(onMapChanged(const QString &))); diff -r c91b983de18f -r 5b37d6a39829 QTfrontend/gamecfgwidget.h --- a/QTfrontend/gamecfgwidget.h Wed Jan 17 21:32:52 2007 +0000 +++ b/QTfrontend/gamecfgwidget.h Thu Jan 18 19:59:04 2007 +0000 @@ -34,7 +34,7 @@ Q_OBJECT public: - GameCFGWidget(QWidget* parent); + GameCFGWidget(QWidget* parent, bool externalControl=false); quint32 getGameFlags() const; QString getCurrentSeed() const; QString getCurrentMap() const; diff -r c91b983de18f -r 5b37d6a39829 QTfrontend/netserver.cpp --- a/QTfrontend/netserver.cpp Wed Jan 17 21:32:52 2007 +0000 +++ b/QTfrontend/netserver.cpp Thu Jan 18 19:59:04 2007 +0000 @@ -205,6 +205,7 @@ RawSendNet(QString("CONNECTED")); if(m_hwserver->isChiefClient(this)) RawSendNet(QString("CONFIGASKED")); else { + RawSendNet(QString("SLAVE")); // send config QMap conf=m_hwserver->getGameCfg(); for(QMap::iterator it=conf.begin(); it!=conf.end(); ++it) { diff -r c91b983de18f -r 5b37d6a39829 QTfrontend/newnetclient.cpp --- a/QTfrontend/newnetclient.cpp Wed Jan 17 21:32:52 2007 +0000 +++ b/QTfrontend/newnetclient.cpp Thu Jan 18 19:59:04 2007 +0000 @@ -173,6 +173,10 @@ return; } + if(lst[0]=="SLAVE") { + m_pGameCFGWidget->setEnabled(false); + } + if (lst[0] == "CONFIGASKED") { isChief=true; ConfigAsked();