--- a/QTfrontend/ui/page/pageroomslist.cpp Sun Oct 21 01:28:33 2012 +0400
+++ b/QTfrontend/ui/page/pageroomslist.cpp Sat Nov 03 00:34:35 2012 +0400
@@ -101,7 +101,6 @@
BtnCreate = addButton(tr("Create"), pageLayout, 0, 2);
BtnJoin = addButton(tr("Join"), pageLayout, 1, 2);
- BtnRefresh = addButton(tr("Refresh"), pageLayout, 3, 2);
BtnClear = addButton(tr("Clear"), pageLayout, 4, 2);
// strech all but the buttons column
@@ -143,7 +142,6 @@
connect(BtnCreate, SIGNAL(clicked()), this, SLOT(onCreateClick()));
connect(BtnJoin, SIGNAL(clicked()), this, SLOT(onJoinClick()));
- connect(BtnRefresh, SIGNAL(clicked()), this, SLOT(onRefreshClick()));
connect(BtnClear, SIGNAL(clicked()), this, SLOT(onClearClick()));
connect(roomsList, SIGNAL(doubleClicked (const QModelIndex &)), this, SLOT(onJoinClick()));
connect(CBState, SIGNAL(currentIndexChanged (int)), this, SLOT(onFilterChanged()));
@@ -426,10 +424,14 @@
if (roomName->text().size())
emit askForCreateRoom(roomName->text());
else
- QMessageBox::critical(this,
- tr("Error"),
- tr("Please enter room name"),
- tr("OK"));
+ {
+ QMessageBox roomNameMsg(this);
+ roomNameMsg.setIcon(QMessageBox::Warning);
+ roomNameMsg.setWindowTitle(QMessageBox::tr("Room Name - Error"));
+ roomNameMsg.setText(QMessageBox::tr("Please enter room name"));
+ roomNameMsg.setWindowModality(Qt::WindowModal);
+ roomNameMsg.exec();
+ }
}
void PageRoomsList::onJoinClick()
@@ -438,10 +440,12 @@
if(mdl.size() != 1)
{
- QMessageBox::critical(this,
- tr("Error"),
- tr("Please select room from the list"),
- tr("OK"));
+ QMessageBox roomNameMsg(this);
+ roomNameMsg.setIcon(QMessageBox::Warning);
+ roomNameMsg.setWindowTitle(QMessageBox::tr("Room Name - Error"));
+ roomNameMsg.setText(QMessageBox::tr("Please select room from the list"));
+ roomNameMsg.setWindowModality(Qt::WindowModal);
+ roomNameMsg.exec();
return;
}
@@ -469,10 +473,15 @@
void PageRoomsList::onJoinConfirmation(const QString & room)
{
- if (QMessageBox::warning(this,
- tr("Warning"),
- tr("The game you are trying to join has started.\nDo you still want to join the room?"),
- QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)
+
+ QMessageBox reallyJoinMsg(this);
+ reallyJoinMsg.setIcon(QMessageBox::Question);
+ reallyJoinMsg.setWindowTitle(QMessageBox::tr("Room Name - Are you sure?"));
+ reallyJoinMsg.setText(QMessageBox::tr("The game you are trying to join has started.\nDo you still want to join the room?"));
+ reallyJoinMsg.setWindowModality(Qt::WindowModal);
+ reallyJoinMsg.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
+
+ if (reallyJoinMsg.exec() == QMessageBox::Ok)
{
emit askForJoinRoom(room);
}