[atlantik-cvs] CVS: kdegames/atlantik/client atlantik.cpp,1.136,1.137

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

Modified Files:
	atlantik.cpp 
Log Message:
better slot handling for showSelectGame

Index: atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- atlantik.cpp	20 Jan 2003 00:57:23 -0000	1.136
+++ atlantik.cpp	20 Jan 2003 02:22:19 -0000	1.137
@@ -27,7 +27,7 @@
 #include <kstdgameaction.h>
 #include <kstdaction.h>
 #include <ktoolbar.h>
- 
+
 #include <atlantic_core.h>
 #include <auction.h>
 #include <estate.h>
@@ -228,12 +228,14 @@
 	m_selectServer->show();
 	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())); // disconnect from selectGame implied by deletion above
 	connect(m_selectServer, SIGNAL(serverConnect(const QString, int)), m_atlantikNetwork, SLOT(serverConnect(const QString, int)));
 }
 
@@ -283,6 +285,9 @@
 {
 	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;
 	}
@@ -294,7 +299,6 @@
 	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()));
@@ -321,6 +325,9 @@
 {
 	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;
 	}
@@ -546,6 +553,7 @@
 	connect(m_atlantikNetwork, SIGNAL(connectionSuccess()), this, SLOT(slotNetworkConnected()));
 	connect(m_atlantikNetwork, SIGNAL(connectionFailed(int)), this, SLOT(slotNetworkError(int)));
 
+	connect(m_atlantikNetwork, SIGNAL(gameListClear()), this, SLOT(showSelectGame()));
 	connect(m_atlantikNetwork, SIGNAL(gameConfig()), this, SLOT(showSelectConfiguration()));
 	connect(m_atlantikNetwork, SIGNAL(gameInit()), this, SLOT(initBoard()));
 	connect(m_atlantikNetwork, SIGNAL(gameRun()), this, SLOT(showBoard()));
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.