[atlantik-cvs] CVS: kdegames/atlantik/client atlantik.cpp,1.121.6.11,1.121.6.12

[email protected]
Newsgroups gmane.comp.kde.devel.atlantik
Message-ID <[email protected]>
Update of /home/kde/kdegames/atlantik/client
In directory office:/tmp/cvs-serv15356

Modified Files:
      Tag: KDE_3_1_BRANCH
	atlantik.cpp 
Log Message:
backport: fix disconnect problem where sometimes the select game widget appears after starting a game

Index: atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v
retrieving revision 1.121.6.11
retrieving revision 1.121.6.12
diff -u -d -r1.121.6.11 -r1.121.6.12
--- atlantik.cpp	9 Jun 2003 19:12:22 -0000	1.121.6.11
+++ atlantik.cpp	17 Jun 2003 18:15:23 -0000	1.121.6.12
@@ -223,13 +223,13 @@
 	if (m_selectGame)
 	{
 		disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), m_selectGame, SLOT(slotGameListClear()));
-		connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
 
 		delete m_selectGame;
 		m_selectGame = 0;
 	}
 	initNetworkObject();
 
+	connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
 	connect(m_selectServer, SIGNAL(serverConnect(const QString, int)), m_atlantikNetwork, SLOT(serverConnect(const QString, int)));
 }
 
@@ -253,18 +253,17 @@
 	{
 		delete m_selectServer;
 		m_selectServer = 0;
-
-		disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
 	}
 	if (m_selectConfiguration)
 	{
 		delete m_selectConfiguration;
 		m_selectConfiguration = 0;
-
-		disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
 	}
 
+	// Game list clear has a different meaning now
+	disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
 	connect(m_atlantikNetwork, SIGNAL(gameListClear()), m_selectGame, SLOT(slotGameListClear()));
+
 	connect(m_atlantikNetwork, SIGNAL(gameListAdd(QString, QString, QString, QString, QString, bool)), m_selectGame, SLOT(slotGameListAdd(QString, QString, QString, QString, QString, bool)));
 	connect(m_atlantikNetwork, SIGNAL(gameListEdit(QString, QString, QString, QString, QString, bool)), m_selectGame, SLOT(slotGameListEdit(QString, QString, QString, QString, QString, bool)));
 	connect(m_atlantikNetwork, SIGNAL(gameListDel(QString)), m_selectGame, SLOT(slotGameListDel(QString)));
@@ -280,7 +279,6 @@
 	if (m_selectGame)
 	{
 		disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), m_selectGame, SLOT(slotGameListClear()));
-		connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
 
 		delete m_selectGame;
 		m_selectGame = 0;
@@ -293,6 +291,7 @@
 	m_mainLayout->addMultiCellWidget(m_selectConfiguration, 0, 2, 1, 1);
 	m_selectConfiguration->show();
 
+	connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
 	connect(m_atlantikNetwork, SIGNAL(gameOption(QString, QString, QString, QString, QString)), m_selectConfiguration, SLOT(gameOption(QString, QString, QString, QString, QString)));
 	connect(m_selectConfiguration, SIGNAL(startGame()), m_atlantikNetwork, SLOT(startGame()));
 	connect(m_selectConfiguration, SIGNAL(leaveGame()), m_atlantikNetwork, SLOT(leaveGame()));
@@ -319,7 +318,6 @@
 	if (m_selectGame)
 	{
 		disconnect(m_atlantikNetwork, SIGNAL(gameListClear()), m_selectGame, SLOT(slotGameListClear()));
-		connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
 
 		delete m_selectGame;
 		m_selectGame = 0;
@@ -341,6 +339,8 @@
 	for (QPtrListIterator<PortfolioView> it(m_portfolioViews); *it; ++it)
 		if ((portfolioView = dynamic_cast<PortfolioView*>(*it)))
 			portfolioView->buildPortfolio();
+
+	connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
 }
 
 void Atlantik::freezeBoard()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.