Work on error messages.

This commit is contained in:
lotodore
2007-08-21 20:46:55 +00:00
parent 257d91fb66
commit 636a49c1ef
2 changed files with 16 additions and 2 deletions
+16 -1
View File
@@ -2567,9 +2567,23 @@ void mainWindowImpl::networkError(int errorID, int osErrorID) {
myChangeHumanPlayerNameDialog->exec(); }
break;
case ERR_NET_INVALID_PLAYER_NAME:
{ myChangeHumanPlayerNameDialog->label_Message->setText(tr("The player name is either too short or too long. Please choose another one."));
{ myChangeHumanPlayerNameDialog->label_Message->setText(tr("The player name is too short, too long or reserved. Please choose another one."));
myChangeHumanPlayerNameDialog->exec(); }
break;
case ERR_NET_INVALID_GAME_NAME:
{ myChangeHumanPlayerNameDialog->label_Message->setText(tr("The game name is either too short or too long. Please choose another one."));
myChangeHumanPlayerNameDialog->exec(); }
break;
case ERR_NET_UNKNOWN_GAME:
{ QMessageBox::warning(this, tr("Network Error"),
tr("The game could not be found."),
QMessageBox::Close); }
break;
case ERR_NET_INVALID_CHAT_TEXT:
{ QMessageBox::warning(this, tr("Network Error"),
tr("The chat text is invalid."),
QMessageBox::Close); }
break;
case ERR_NET_UNKNOWN_PLAYER_ID:
{ QMessageBox::warning(this, tr("Network Error"),
tr("The server referred to an unknown player. Aborting."),
@@ -2590,6 +2604,7 @@ void mainWindowImpl::networkError(int errorID, int osErrorID) {
QMessageBox::Close); }
}
// close dialogs
myGameLobbyDialog->reject();
myConnectToServerDialog->reject();
myStartNetworkGameDialog->reject();
}