From 43d34bb825834870fd48154e537ee3f9f519c526 Mon Sep 17 00:00:00 2001 From: Zach H Date: Mon, 9 Feb 2015 15:35:16 -0500 Subject: [PATCH 1/4] spectator preferences --- cockatrice/src/dlg_creategame.cpp | 6 +++--- cockatrice/src/gamesmodel.cpp | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/cockatrice/src/dlg_creategame.cpp b/cockatrice/src/dlg_creategame.cpp index 8dea2676..b4680f7c 100644 --- a/cockatrice/src/dlg_creategame.cpp +++ b/cockatrice/src/dlg_creategame.cpp @@ -72,12 +72,12 @@ void DlgCreateGame::sharedCtor() QGroupBox *joinRestrictionsGroupBox = new QGroupBox(tr("Joining restrictions")); joinRestrictionsGroupBox->setLayout(joinRestrictionsLayout); - spectatorsAllowedCheckBox = new QCheckBox(tr("&Spectators allowed")); + spectatorsAllowedCheckBox = new QCheckBox(tr("&Spectators can watch")); spectatorsAllowedCheckBox->setChecked(true); connect(spectatorsAllowedCheckBox, SIGNAL(stateChanged(int)), this, SLOT(spectatorsAllowedChanged(int))); - spectatorsNeedPasswordCheckBox = new QCheckBox(tr("Spectators &need a password to join")); + spectatorsNeedPasswordCheckBox = new QCheckBox(tr("Spectators &need a password to watch")); spectatorsCanTalkCheckBox = new QCheckBox(tr("Spectators can &chat")); - spectatorsSeeEverythingCheckBox = new QCheckBox(tr("Spectators see &everything")); + spectatorsSeeEverythingCheckBox = new QCheckBox(tr("Spectators can see hands")); QVBoxLayout *spectatorsLayout = new QVBoxLayout; spectatorsLayout->addWidget(spectatorsAllowedCheckBox); spectatorsLayout->addWidget(spectatorsNeedPasswordCheckBox); diff --git a/cockatrice/src/gamesmodel.cpp b/cockatrice/src/gamesmodel.cpp index 49b8886e..f4f79d2b 100644 --- a/cockatrice/src/gamesmodel.cpp +++ b/cockatrice/src/gamesmodel.cpp @@ -176,10 +176,20 @@ QVariant GamesModel::data(const QModelIndex &index, int role) const if (g.spectators_allowed()) { QString result; result.append(QString::number(g.spectators_count())); - if (g.spectators_can_chat()) - result.append(", ").append(tr("chat")); - if (g.spectators_omniscient()) - result.append(", ").append(tr("see everything")); + + if (g.spectators_can_chat() && g.spectators_omniscient()) + { + result.append(" (").append(tr("can chat")).append(" & ").append((tr("can see hands")).append(")")); + } + else if (g.spectators_can_chat()) + { + result.append(" (").append(tr("can chat")).append(")"); + } + else if (g.spectators_omniscient()) + { + result.append(" (").append(tr("can see hands")).append(")"); + } + return result; } return QVariant(tr("not allowed")); From ce2541af1e456b4c092ce2632f2e0a20ad04aa33 Mon Sep 17 00:00:00 2001 From: Zach Date: Mon, 9 Feb 2015 15:52:04 -0500 Subject: [PATCH 2/4] Allow for shortcuts on hand viewing Based on feedback, allow for shortcut for specs to view hands --- cockatrice/src/dlg_creategame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockatrice/src/dlg_creategame.cpp b/cockatrice/src/dlg_creategame.cpp index b4680f7c..72b26ee9 100644 --- a/cockatrice/src/dlg_creategame.cpp +++ b/cockatrice/src/dlg_creategame.cpp @@ -77,7 +77,7 @@ void DlgCreateGame::sharedCtor() connect(spectatorsAllowedCheckBox, SIGNAL(stateChanged(int)), this, SLOT(spectatorsAllowedChanged(int))); spectatorsNeedPasswordCheckBox = new QCheckBox(tr("Spectators &need a password to watch")); spectatorsCanTalkCheckBox = new QCheckBox(tr("Spectators can &chat")); - spectatorsSeeEverythingCheckBox = new QCheckBox(tr("Spectators can see hands")); + spectatorsSeeEverythingCheckBox = new QCheckBox(tr("Spectators can see &hands")); QVBoxLayout *spectatorsLayout = new QVBoxLayout; spectatorsLayout->addWidget(spectatorsAllowedCheckBox); spectatorsLayout->addWidget(spectatorsNeedPasswordCheckBox); From 7a1fb45ebc7802740ff2ae45af2c0fe6bfdca0de Mon Sep 17 00:00:00 2001 From: Zach H Date: Mon, 9 Feb 2015 16:04:39 -0500 Subject: [PATCH 3/4] feedback change --- cockatrice/src/gamesmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockatrice/src/gamesmodel.cpp b/cockatrice/src/gamesmodel.cpp index f4f79d2b..4c1e38ce 100644 --- a/cockatrice/src/gamesmodel.cpp +++ b/cockatrice/src/gamesmodel.cpp @@ -179,7 +179,7 @@ QVariant GamesModel::data(const QModelIndex &index, int role) const if (g.spectators_can_chat() && g.spectators_omniscient()) { - result.append(" (").append(tr("can chat")).append(" & ").append((tr("can see hands")).append(")")); + result.append(" (").append(tr("can chat")).append(" & ").append((tr("see hands")).append(")")); } else if (g.spectators_can_chat()) { From f0338118afecde2e6ff4b71ab9c4307b7c45401e Mon Sep 17 00:00:00 2001 From: Zach H Date: Mon, 9 Feb 2015 16:07:23 -0500 Subject: [PATCH 4/4] minor fix --- cockatrice/src/gamesmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockatrice/src/gamesmodel.cpp b/cockatrice/src/gamesmodel.cpp index 4c1e38ce..7f207ff3 100644 --- a/cockatrice/src/gamesmodel.cpp +++ b/cockatrice/src/gamesmodel.cpp @@ -179,7 +179,7 @@ QVariant GamesModel::data(const QModelIndex &index, int role) const if (g.spectators_can_chat() && g.spectators_omniscient()) { - result.append(" (").append(tr("can chat")).append(" & ").append((tr("see hands")).append(")")); + result.append(" (").append(tr("can chat")).append(" & ").append(tr("see hands")).append(")"); } else if (g.spectators_can_chat()) {