QTfrontend/hwform.cpp
changeset 6180 0992fc5a4ad9
parent 6167 728cabee2c9f
child 6190 1db2486e45f4
equal deleted inserted replaced
6179:b529f88d37d0 6180:0992fc5a4ad9
   767     {
   767     {
   768         case ID_PAGE_INGAME:
   768         case ID_PAGE_INGAME:
   769             ShowErrorMessage(errmsg);
   769             ShowErrorMessage(errmsg);
   770             // no break
   770             // no break
   771         case ID_PAGE_NETGAME:
   771         case ID_PAGE_NETGAME:
   772             ui.pageNetGame->pChatWidget->addLine("Error",errmsg);
   772             ui.pageNetGame->displayError(errmsg);
   773             break;
   773             break;
   774         default:
   774         default:
   775         ui.pageRoomsList->chatWidget->addLine("Error",errmsg);
   775         ui.pageRoomsList->displayError(errmsg);
   776     }
   776     }
   777 }
   777 }
   778 
   778 
   779 void HWForm::NetWarning(const QString & wrnmsg)
   779 void HWForm::NetWarning(const QString & wrnmsg)
   780 {
   780 {
   781     if (ui.Pages->currentIndex() == ID_PAGE_NETGAME || ui.Pages->currentIndex() == ID_PAGE_INGAME)
   781     if (ui.Pages->currentIndex() == ID_PAGE_NETGAME || ui.Pages->currentIndex() == ID_PAGE_INGAME)
   782         ui.pageNetGame->pChatWidget->addLine("Warning",wrnmsg);
   782         ui.pageNetGame->displayWarning(wrnmsg);
   783     else
   783     else
   784         ui.pageRoomsList->chatWidget->addLine("Warning",wrnmsg);
   784         ui.pageRoomsList->displayWarning(wrnmsg);
   785 }
   785 }
   786 
   786 
   787 void HWForm::_NetConnect(const QString & hostName, quint16 port, QString nick)
   787 void HWForm::_NetConnect(const QString & hostName, quint16 port, QString nick)
   788 {
   788 {
   789     if(hwnet) {
   789     if(hwnet) {
  1255 {
  1255 {
  1256     if (ui.Pages->currentIndex() == ID_PAGE_NETGAME || ui.Pages->currentIndex() == ID_PAGE_INGAME)
  1256     if (ui.Pages->currentIndex() == ID_PAGE_NETGAME || ui.Pages->currentIndex() == ID_PAGE_INGAME)
  1257     {
  1257     {
  1258         GoBack();
  1258         GoBack();
  1259         if (!reason.isEmpty())
  1259         if (!reason.isEmpty())
  1260             ui.pageRoomsList->chatWidget->addLine("Notice",reason);
  1260             ui.pageRoomsList->displayNotice(reason);
  1261     }
  1261     }
  1262     else
  1262     else
  1263         qWarning("Left room while not in room");
  1263         qWarning("Left room while not in room");
  1264 }
  1264 }
  1265 
  1265