diff -r 4f44fc06ca45 -r 1019b8fa8638 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Thu Dec 13 21:31:47 2007 +0000 +++ b/QTfrontend/hwform.cpp Thu Dec 13 21:49:52 2007 +0000 @@ -31,6 +31,7 @@ #include #include #include +#include #include "hwform.h" #include "game.h" @@ -405,15 +406,22 @@ ui.pageNetGame->pNetTeamsWidget, SLOT(changeTeamColor(const HWTeam&))); hwnet->Connect(hostName, port, nick); - config->SaveOptions(); } void HWForm::NetConnect() { HWHostPortDialog * hpd = new HWHostPortDialog(this); + hpd->leHost->setText(*netHost); + hpd->sbPort->setValue(netPort); - hpd->exec(); -// FIXME: _NetConnect(ui.pageNet->editIP->text(), 46631, ui.pageNet->editNetNick->text()); + if (hpd->exec() == QDialog::Accepted) + { + config->SaveOptions(); + delete netHost; + netHost = new QString(hpd->leHost->text()); + netPort = hpd->sbPort->value(); + _NetConnect(*netHost, netPort, ui.pageOptions->editNetNick->text()); + } } void HWForm::NetStartServer()