next steps startwindow-integration --> UNSTABLE

This commit is contained in:
doitux
2008-09-20 20:30:58 +00:00
parent a52de5f967
commit 7bc7ae43fe
2 changed files with 9 additions and 3 deletions
+2
View File
@@ -2935,6 +2935,7 @@ void gameTableImpl::closeGameTable() {
if (myServerGuiInterface.get() && myServerGuiInterface->getSession().isNetworkServerRunning()) { if (myServerGuiInterface.get() && myServerGuiInterface->getSession().isNetworkServerRunning()) {
qDebug() << "jo1";
QMessageBox msgBox(QMessageBox::Warning, tr("Closing PokerTH during network game"), QMessageBox msgBox(QMessageBox::Warning, tr("Closing PokerTH during network game"),
tr("You are the hosting server. Do you want to close PokerTH anyway?"), QMessageBox::Yes | QMessageBox::No, this); tr("You are the hosting server. Do you want to close PokerTH anyway?"), QMessageBox::Yes | QMessageBox::No, this);
@@ -2947,6 +2948,7 @@ void gameTableImpl::closeGameTable() {
} }
} }
else { else {
qDebug() << "jo2";
mySession->terminateNetworkClient(); mySession->terminateNetworkClient();
stopTimer(); stopTimer();
myStartWindow->show(); myStartWindow->show();
+7 -3
View File
@@ -339,9 +339,7 @@ void startWindowImpl::joinGameLobby() {
if (myConnectToServerDialog->result() == QDialog::Rejected ) { if (myConnectToServerDialog->result() == QDialog::Rejected ) {
mySession->terminateNetworkClient(); mySession->terminateNetworkClient();
} }
else else {
{
this->hide();
showLobbyDialog(); showLobbyDialog();
} }
} }
@@ -477,6 +475,8 @@ void startWindowImpl::showClientDialog()
{ {
if (myGuiInterface->getMyW()->isVisible()) if (myGuiInterface->getMyW()->isVisible())
myGuiInterface->getMyW()->hide(); myGuiInterface->getMyW()->hide();
if (!this->isVisible())
this->show();
if (!myStartNetworkGameDialog->isVisible()) if (!myStartNetworkGameDialog->isVisible())
showNetworkStartDialog(); showNetworkStartDialog();
} }
@@ -484,6 +484,8 @@ void startWindowImpl::showClientDialog()
{ {
if (myGuiInterface->getMyW()->isVisible()) if (myGuiInterface->getMyW()->isVisible())
myGuiInterface->getMyW()->hide(); myGuiInterface->getMyW()->hide();
if (!this->isVisible())
this->show();
if (!myGameLobbyDialog->isVisible()) if (!myGameLobbyDialog->isVisible())
showLobbyDialog(); showLobbyDialog();
} }
@@ -495,6 +497,7 @@ void startWindowImpl::showLobbyDialog()
if (myGameLobbyDialog->result() == QDialog::Accepted) if (myGameLobbyDialog->result() == QDialog::Accepted)
{ {
this->hide();
//some gui modifications //some gui modifications
myGuiInterface->getMyW()->networkGameModification(); myGuiInterface->getMyW()->networkGameModification();
} }
@@ -510,6 +513,7 @@ void startWindowImpl::showNetworkStartDialog()
if (myStartNetworkGameDialog->result() == QDialog::Accepted ) { if (myStartNetworkGameDialog->result() == QDialog::Accepted ) {
this->hide();
//some gui modifications //some gui modifications
myGuiInterface->getMyW()->networkGameModification(); myGuiInterface->getMyW()->networkGameModification();
} }