From 50dde5dde1315f132b66ff417086bea3cfb3984c Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Tue, 2 Feb 2016 22:04:49 +0100 Subject: [PATCH 01/11] Some updated translations from transfix --- cockatrice/translations/cockatrice_de.ts | 52 +++++++++++------------ cockatrice/translations/cockatrice_pl.ts | 54 ++++++++++++------------ oracle/translations/oracle_pl.ts | 4 +- 3 files changed, 55 insertions(+), 55 deletions(-) diff --git a/cockatrice/translations/cockatrice_de.ts b/cockatrice/translations/cockatrice_de.ts index 36a30b4d..f0428f85 100644 --- a/cockatrice/translations/cockatrice_de.ts +++ b/cockatrice/translations/cockatrice_de.ts @@ -1501,34 +1501,34 @@ Möchten Sie Ihren Speicherort der Datenbank aktualisieren? Error - + Fehler Cockatrice was not built with SSL support, so cannot download updates! Please visit the download page and update manually. - + Ihre Version von Cockatrice hat keine SSL-Unterstützung, dadurch ist das Herunterladen von Aktualisierungen nicht möglich! Bitte besuchen Sie die Downloadseite und aktualisieren Sie manuell. Your version of Cockatrice is out of date, but there are no packages available for your operating system. You may have to use a developer build or build from source yourself. Please visit the download page. - + Ihre Cockatrice Version ist nicht mehr aktuell, jedoch sind keine Installationspakete für Ihr Betriebssystem erhältlich. Sie müssen eventuell einen Entwicklungsbuild verwenden, oder den Quellcode für einen eigenen Build verwenden. Bitte besuchen Sie die Downloadseite. Cockatrice Update - + Cockatrice Aktualisierung Your version of Cockatrice is up to date. - + Ihre Version von Cockatrice ist aktuell. Update Error - + Aktualisierungsfehler @@ -1795,18 +1795,18 @@ Möchten Sie Ihren Speicherort der Datenbank aktualisieren? Primary download URL: - + Primäre URL zum Herunterladen: Fallback download URL: - + Ersatz-URL zum Herunterladen: Reset - + Zurücksetzen @@ -1995,7 +1995,7 @@ Login läuft. Cockatrice Webpage - + Cockatrice Webseite @@ -2334,7 +2334,7 @@ Lokale Version ist %1, Serverversion ist %2. &Update Cockatrice - + Cockatrice akt&ualisieren @@ -2702,24 +2702,24 @@ Sie müssen den Aktivierungstoken aus der Aktivierungsemail verwenden Heads (1) - + Kopf (1) Tails (2) - + Zahl (2) %1 flipped a coin. It landed as %2. female - + %1 warf eine Münze. Es fiel %2. %1 flipped a coin. It landed as %2. male - + %1 warf eine Münze. Es fiel %2. @@ -4727,21 +4727,21 @@ Lesen Sie mehr über das Ändern der Editionsreihenfolge oder die Deaktivierung &View - + Ansicht Visible - + Sichtbar Floating - + Schwebend @@ -4887,25 +4887,25 @@ Bitte geben Sie einen Namen ein: Card Info - + Karteninformationen Player List - + Spielerliste Messages - + Nachrichten Replay Timeline - + Zeitleiste der Aufzeichnung @@ -4970,7 +4970,7 @@ Bitte geben Sie einen Namen ein: &View - + Ansicht @@ -4978,7 +4978,7 @@ Bitte geben Sie einen Namen ein: Visible - + Sichtbar @@ -4986,12 +4986,12 @@ Bitte geben Sie einen Namen ein: Floating - + Schwebend Reset layout - + Darstellung zurücksetzen diff --git a/cockatrice/translations/cockatrice_pl.ts b/cockatrice/translations/cockatrice_pl.ts index a96eb26b..d525ed52 100644 --- a/cockatrice/translations/cockatrice_pl.ts +++ b/cockatrice/translations/cockatrice_pl.ts @@ -22,12 +22,12 @@ Theme settings - + Ustawienia motywu użytkownika Current theme: - + Bieżący motyw: @@ -257,7 +257,7 @@ Informacja ta zachowywana jest dla moderatorów i nie jest widoczna dla zbanowan Color(s): - + Kolor(y): @@ -305,7 +305,7 @@ Informacja ta zachowywana jest dla moderatorów i nie jest widoczna dla zbanowan Color(s): - + Kolor(y): @@ -710,12 +710,12 @@ Informacja ta zachowywana jest dla moderatorów i nie jest widoczna dla zbanowan Previous Host - + Poprzedni Host New Host - + Nowy Host @@ -725,7 +725,7 @@ Informacja ta zachowywana jest dla moderatorów i nie jest widoczna dla zbanowan Enter host name - + Wprowadź nazwę Hosta @@ -765,7 +765,7 @@ Informacja ta zachowywana jest dla moderatorów i nie jest widoczna dla zbanowan The player name can't be empty. - + Nazwa użytkownika nie może być pusta @@ -971,17 +971,17 @@ To remove your current avatar, confirm without choosing a new image. Browse... - + Przeglądaj... Change avatar - + Zmień awatar Open Image - + Otwórz plik obrazu @@ -999,27 +999,27 @@ To remove your current avatar, confirm without choosing a new image. Old password: - + Bieżące hasło: New password: - + Nowe hasło: Confirm new password: - + Potwierdź nowe hasło: Change password - + Zmień hasło Error - + Błąd @@ -1277,7 +1277,7 @@ Upewnij się, że 'Dodatek zawierający tokeny' jest włączony w okni Password (again): - + Hasło (ponownie): @@ -1287,7 +1287,7 @@ Upewnij się, że 'Dodatek zawierający tokeny' jest włączony w okni Email (again): - + Email (ponownie): @@ -1334,7 +1334,7 @@ Upewnij się, że 'Dodatek zawierający tokeny' jest włączony w okni The player name can't be empty. - + Nazwa użytkownika nie może być pusta @@ -1484,7 +1484,7 @@ Would you like to change your database location setting? Shortcuts - + Skróty @@ -1492,7 +1492,7 @@ Would you like to change your database location setting? Error - + Błąd @@ -5027,7 +5027,7 @@ Wprowadź nazwę: Error - + Błąd @@ -5333,7 +5333,7 @@ The more information you put in, the more specific your results will be. Error - + Błąd @@ -5602,12 +5602,12 @@ Please refrain from engaging in this activity or further actions may be taken ag Change password - + Zmień hasło Change avatar - + Zmień awatar @@ -5677,7 +5677,7 @@ Please refrain from engaging in this activity or further actions may be taken ag Error - + Błąd @@ -5818,7 +5818,7 @@ Please refrain from engaging in this activity or further actions may be taken ag Error - + Błąd diff --git a/oracle/translations/oracle_pl.ts b/oracle/translations/oracle_pl.ts index 3c60bac9..f7745b72 100644 --- a/oracle/translations/oracle_pl.ts +++ b/oracle/translations/oracle_pl.ts @@ -122,7 +122,7 @@ You will need to specify a URL or a filename that will be used as a source. Error - + Błąd Downloading (0MB) @@ -257,7 +257,7 @@ You will need to specify a URL or a filename that will be used as a source. Error - + Błąd The file could not be saved to %1 From 154da4452d9a81dee358d743c62d4bef82101ca7 Mon Sep 17 00:00:00 2001 From: Ira Aspen Date: Fri, 5 Feb 2016 19:29:19 +0000 Subject: [PATCH 02/11] Made create game box prevent only buddies can join being selected for unregistered users. --- 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 611a9fef..ff8258cb 100644 --- a/cockatrice/src/dlg_creategame.cpp +++ b/cockatrice/src/dlg_creategame.cpp @@ -116,9 +116,9 @@ DlgCreateGame::DlgCreateGame(TabRoom *_room, const QMap &_gameType rememberGameSettings->setChecked(settingsCache->getRememberGameSettings()); descriptionEdit->setText(settingsCache->getGameDescription()); maxPlayersEdit->setValue(settingsCache->getMaxPlayers()); - onlyBuddiesCheckBox->setChecked(settingsCache->getOnlyBuddies()); if (room && room->getUserInfo()->user_level() & ServerInfo_User::IsRegistered) { + onlyBuddiesCheckBox->setChecked(settingsCache->getOnlyBuddies()); onlyRegisteredCheckBox->setChecked(settingsCache->getOnlyRegistered()); } else { onlyBuddiesCheckBox->setEnabled(false); From 9846fb1d8e92d345e7f948177694a833289e7554 Mon Sep 17 00:00:00 2001 From: Ira Aspen Date: Fri, 5 Feb 2016 19:32:27 +0000 Subject: [PATCH 03/11] Made reseting the create game dialogue box only select 'Only regeistered users' if player is a registered user. --- 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 ff8258cb..1db2cdd6 100644 --- a/cockatrice/src/dlg_creategame.cpp +++ b/cockatrice/src/dlg_creategame.cpp @@ -193,7 +193,7 @@ void DlgCreateGame::actReset() passwordEdit->setText(""); onlyBuddiesCheckBox->setChecked(false); - onlyRegisteredCheckBox->setChecked(true); + onlyRegisteredCheckBox->setChecked(room && room->getUserInfo()->user_level() & ServerInfo_User::IsRegistered); spectatorsAllowedCheckBox->setChecked(true); spectatorsNeedPasswordCheckBox->setChecked(false); From 802ccd7f1422d3170b444540f5135df58b2cd664 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 6 Feb 2016 19:29:57 +0100 Subject: [PATCH 04/11] shortcut tabs adjustments - typo fix - improved description of some shortcuts --- cockatrice/src/sequenceEdit/ui_shortcutstab.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cockatrice/src/sequenceEdit/ui_shortcutstab.h b/cockatrice/src/sequenceEdit/ui_shortcutstab.h index d642a9fc..ec0c10d6 100644 --- a/cockatrice/src/sequenceEdit/ui_shortcutstab.h +++ b/cockatrice/src/sequenceEdit/ui_shortcutstab.h @@ -1473,10 +1473,10 @@ public: groupBox_2->setTitle(QApplication::translate("shortcutsTab", "Deck Editor", 0)); lbl_TabDeckEditor_aAnalyzeDeck->setText(QApplication::translate("shortcutsTab", "Analyze deck", 0)); lbl_TabDeckEditor_aLoadDeckFromClipboard->setText(QApplication::translate("shortcutsTab", "Load deck (clipboard)", 0)); - lbl_TabDeckEditor_aClearFilterAll->setText(QApplication::translate("shortcutsTab", "Clerar all filters", 0)); + lbl_TabDeckEditor_aClearFilterAll->setText(QApplication::translate("shortcutsTab", "Clear all filters", 0)); lbl_TabDeckEditor_aNewDeck->setText(QApplication::translate("shortcutsTab", "New deck", 0)); - lbl_TabDeckEditor_aClearFilterOne->setText(QApplication::translate("shortcutsTab", "Clear one filter", 0)); - lbl_TabDeckEditor_aOpenCustomFolder->setText(QApplication::translate("shortcutsTab", "Open custom folder", 0)); + lbl_TabDeckEditor_aClearFilterOne->setText(QApplication::translate("shortcutsTab", "Clear selected filter", 0)); + lbl_TabDeckEditor_aOpenCustomFolder->setText(QApplication::translate("shortcutsTab", "Open custom pic folder", 0)); lbl_TabDeckEditor_aClose->setText(QApplication::translate("shortcutsTab", "Close", 0)); lbl_TabDeckEditor_aPrintDeck->setText(QApplication::translate("shortcutsTab", "Print deck", 0)); lbl_TabDeckEditor_aEditSets->setText(QApplication::translate("shortcutsTab", "Edit sets", 0)); From 058b913455b33d11960beaaa0a363847e40dcb95 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 7 Feb 2016 21:58:51 +0100 Subject: [PATCH 05/11] Game: save and restore dock sizes --- cockatrice/src/settings/layoutssettings.cpp | 77 +++++++++++++++++++++ cockatrice/src/settings/layoutssettings.h | 18 +++++ cockatrice/src/tab_game.cpp | 62 +++++++++++++++-- cockatrice/src/tab_game.h | 1 + 4 files changed, 151 insertions(+), 7 deletions(-) diff --git a/cockatrice/src/settings/layoutssettings.cpp b/cockatrice/src/settings/layoutssettings.cpp index a7d2c749..de301b7b 100644 --- a/cockatrice/src/settings/layoutssettings.cpp +++ b/cockatrice/src/settings/layoutssettings.cpp @@ -78,6 +78,39 @@ const QByteArray LayoutsSettings::getGamePlayAreaGeometry() return getValue("layouts/gameplayarea_geometry").toByteArray(); } +const QSize LayoutsSettings::getGameCardInfoSize() +{ + QVariant previous = getValue("layouts/gameplayarea_CardInfoSize"); + return previous == QVariant() ? QSize(250,360) : previous.toSize(); +} + +void LayoutsSettings::setGameCardInfoSize(const QSize &value) +{ + setValue(value,"layouts/gameplayarea_CardInfoSize"); +} + +const QSize LayoutsSettings::getGameMessageLayoutSize() +{ + QVariant previous = getValue("layouts/gameplayarea_MessageLayoutSize"); + return previous == QVariant() ? QSize(250,250) : previous.toSize(); +} + +void LayoutsSettings::setGameMessageLayoutSize(const QSize &value) +{ + setValue(value,"layouts/gameplayarea_MessageLayoutSize"); +} + +const QSize LayoutsSettings::getGamePlayerListSize() +{ + QVariant previous = getValue("layouts/gameplayarea_PlayerListSize"); + return previous == QVariant() ? QSize(250,50) : previous.toSize(); +} + +void LayoutsSettings::setGamePlayerListSize(const QSize &value) +{ + setValue(value,"layouts/gameplayarea_PlayerListSize"); +} + void LayoutsSettings::setReplayPlayAreaGeometry(const QByteArray &value) { setValue(value,"layouts/replayplayarea_geometry"); @@ -97,3 +130,47 @@ const QByteArray LayoutsSettings::getReplayPlayAreaGeometry() { return getValue("layouts/replayplayarea_geometry").toByteArray(); } + +const QSize LayoutsSettings::getReplayCardInfoSize() +{ + QVariant previous = getValue("layouts/replayplayarea_CardInfoSize"); + return previous == QVariant() ? QSize(250,360) : previous.toSize(); +} + +void LayoutsSettings::setReplayCardInfoSize(const QSize &value) +{ + setValue(value,"layouts/replayplayarea_CardInfoSize"); +} + +const QSize LayoutsSettings::getReplayMessageLayoutSize() +{ + QVariant previous = getValue("layouts/replayplayarea_MessageLayoutSize"); + return previous == QVariant() ? QSize(250,200) : previous.toSize(); +} + +void LayoutsSettings::setReplayMessageLayoutSize(const QSize &value) +{ + setValue(value,"layouts/replayplayarea_MessageLayoutSize"); +} + +const QSize LayoutsSettings::getReplayPlayerListSize() +{ + QVariant previous = getValue("layouts/replayplayarea_PlayerListSize"); + return previous == QVariant() ? QSize(250,50) : previous.toSize(); +} + +void LayoutsSettings::setReplayPlayerListSize(const QSize &value) +{ + setValue(value,"layouts/replayplayarea_PlayerListSize"); +} + +const QSize LayoutsSettings::getReplayReplaySize() +{ + QVariant previous = getValue("layouts/replayplayarea_ReplaySize"); + return previous == QVariant() ? QSize(900,100) : previous.toSize(); +} + +void LayoutsSettings::setReplayReplaySize(const QSize &value) +{ + setValue(value,"layouts/replayplayarea_ReplaySize"); +} \ No newline at end of file diff --git a/cockatrice/src/settings/layoutssettings.h b/cockatrice/src/settings/layoutssettings.h index b6282c90..d67ec1aa 100644 --- a/cockatrice/src/settings/layoutssettings.h +++ b/cockatrice/src/settings/layoutssettings.h @@ -15,20 +15,38 @@ public: void setDeckEditorCardSize(const QSize &value); void setDeckEditorDeckSize(const QSize &value); void setDeckEditorFilterSize(const QSize &value); + void setGamePlayAreaGeometry(const QByteArray &value); void setGamePlayAreaState(const QByteArray &value); + void setGameCardInfoSize(const QSize &value); + void setGameMessageLayoutSize(const QSize &value); + void setGamePlayerListSize(const QSize &value); + void setReplayPlayAreaGeometry(const QByteArray &value); void setReplayPlayAreaState(const QByteArray &value); + void setReplayCardInfoSize(const QSize &value); + void setReplayMessageLayoutSize(const QSize &value); + void setReplayPlayerListSize(const QSize &value); + void setReplayReplaySize(const QSize &value); const QByteArray getDeckEditorLayoutState(); const QByteArray getDeckEditorGeometry(); const QSize getDeckEditorCardSize(); const QSize getDeckEditorDeckSize(); const QSize getDeckEditorFilterSize(); + const QByteArray getGamePlayAreaLayoutState(); const QByteArray getGamePlayAreaGeometry(); + const QSize getGameCardInfoSize(); + const QSize getGameMessageLayoutSize(); + const QSize getGamePlayerListSize(); + const QByteArray getReplayPlayAreaLayoutState(); const QByteArray getReplayPlayAreaGeometry(); + const QSize getReplayCardInfoSize(); + const QSize getReplayMessageLayoutSize(); + const QSize getReplayPlayerListSize(); + const QSize getReplayReplaySize(); signals: public slots: diff --git a/cockatrice/src/tab_game.cpp b/cockatrice/src/tab_game.cpp index 0f8d8050..3b56d126 100644 --- a/cockatrice/src/tab_game.cpp +++ b/cockatrice/src/tab_game.cpp @@ -362,6 +362,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay) refreshShortcuts(); messageLog->logReplayStarted(gameInfo.game_id()); + this->installEventFilter(this); QTimer::singleShot(0, this, SLOT(loadLayout())); } @@ -410,6 +411,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList &_client for (int i = gameInfo.game_types_size() - 1; i >= 0; i--) gameTypes.append(roomGameTypes.find(gameInfo.game_types(i)).value()); + this->installEventFilter(this); QTimer::singleShot(0, this, SLOT(loadLayout())); } @@ -426,14 +428,7 @@ void TabGame::emitUserEvent() { TabGame::~TabGame() { if(replay) - { - settingsCache->layouts().setReplayPlayAreaState(saveState()); - settingsCache->layouts().setReplayPlayAreaGeometry(saveGeometry()); delete replay; - } else { - settingsCache->layouts().setGamePlayAreaState(saveState()); - settingsCache->layouts().setGamePlayAreaGeometry(saveGeometry()); - } QMapIterator i(players); while (i.hasNext()) @@ -1335,9 +1330,25 @@ void TabGame::loadLayout() { restoreGeometry(settingsCache->layouts().getReplayPlayAreaGeometry()); restoreState(settingsCache->layouts().getReplayPlayAreaLayoutState()); + + cardInfoDock->setMinimumSize(settingsCache->layouts().getReplayCardInfoSize()); + cardInfoDock->setMaximumSize(settingsCache->layouts().getReplayCardInfoSize()); + messageLayoutDock->setMinimumSize(settingsCache->layouts().getReplayMessageLayoutSize()); + messageLayoutDock->setMaximumSize(settingsCache->layouts().getReplayMessageLayoutSize()); + playerListDock->setMinimumSize(settingsCache->layouts().getReplayPlayerListSize()); + playerListDock->setMaximumSize(settingsCache->layouts().getReplayPlayerListSize()); + replayDock->setMinimumSize(settingsCache->layouts().getReplayReplaySize()); + replayDock->setMaximumSize(settingsCache->layouts().getReplayReplaySize()); } else { restoreGeometry(settingsCache->layouts().getGamePlayAreaGeometry()); restoreState(settingsCache->layouts().getGamePlayAreaLayoutState()); + + cardInfoDock->setMinimumSize(settingsCache->layouts().getGameCardInfoSize()); + cardInfoDock->setMaximumSize(settingsCache->layouts().getGameCardInfoSize()); + messageLayoutDock->setMinimumSize(settingsCache->layouts().getGameMessageLayoutSize()); + messageLayoutDock->setMaximumSize(settingsCache->layouts().getGameMessageLayoutSize()); + playerListDock->setMinimumSize(settingsCache->layouts().getGamePlayerListSize()); + playerListDock->setMaximumSize(settingsCache->layouts().getGamePlayerListSize()); } aCardInfoDockVisible->setChecked(cardInfoDock->isVisible()); @@ -1358,6 +1369,26 @@ void TabGame::loadLayout() aReplayDockFloating->setEnabled(aReplayDockVisible->isChecked()); aReplayDockFloating->setChecked(replayDock->isFloating()); } + + QTimer::singleShot(100, this, SLOT(freeDocksSize())); +} + +void TabGame::freeDocksSize() +{ + cardInfoDock->setMinimumSize(100, 100); + cardInfoDock->setMaximumSize(5000, 5000); + + messageLayoutDock->setMinimumSize(100, 100); + messageLayoutDock->setMaximumSize(5000, 5000); + + playerListDock->setMinimumSize(100,100); + playerListDock->setMaximumSize(5000,5000); + + if(replayDock) + { + replayDock->setMinimumSize(100,100); + replayDock->setMaximumSize(5000,5000); + } } void TabGame::actResetLayout() @@ -1595,6 +1626,23 @@ bool TabGame::eventFilter(QObject * o, QEvent * e) } } + if( o == this && e->type() == QEvent::Hide){ + if(replay) + { + settingsCache->layouts().setReplayPlayAreaState(saveState()); + settingsCache->layouts().setReplayPlayAreaGeometry(saveGeometry()); + settingsCache->layouts().setReplayCardInfoSize(cardInfoDock->size()); + settingsCache->layouts().setReplayMessageLayoutSize(messageLayoutDock->size()); + settingsCache->layouts().setReplayPlayerListSize(playerListDock->size()); + settingsCache->layouts().setReplayReplaySize(replayDock->size()); + } else { + settingsCache->layouts().setGamePlayAreaState(saveState()); + settingsCache->layouts().setGamePlayAreaGeometry(saveGeometry()); + settingsCache->layouts().setGameCardInfoSize(cardInfoDock->size()); + settingsCache->layouts().setGameMessageLayoutSize(messageLayoutDock->size()); + settingsCache->layouts().setGamePlayerListSize(playerListDock->size()); + } + } return false; } diff --git a/cockatrice/src/tab_game.h b/cockatrice/src/tab_game.h index bed00b04..52644583 100644 --- a/cockatrice/src/tab_game.h +++ b/cockatrice/src/tab_game.h @@ -223,6 +223,7 @@ private slots: void loadLayout(); void actCompleterChanged(); void actResetLayout(); + void freeDocksSize(); bool eventFilter(QObject *o, QEvent *e); void dockVisibleTriggered(); From 8f819dfa6642f76e8df08ec11ccb26e7020b769a Mon Sep 17 00:00:00 2001 From: woogerboy21 Date: Wed, 10 Feb 2016 10:53:18 -0500 Subject: [PATCH 06/11] Update replay maintenance script Update the replay maintenance script to allow for rolling replay maintenance along with cleanup of the two associated db tables (replay access and games). This updated script will now allow players to see the past X days (8 by default) of replays rather than loosing all replays from the point in the the script gets run. --- servatrice/scripts/linux/maint_replays | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/servatrice/scripts/linux/maint_replays b/servatrice/scripts/linux/maint_replays index bee3d0b0..c0f7fb43 100644 --- a/servatrice/scripts/linux/maint_replays +++ b/servatrice/scripts/linux/maint_replays @@ -1,8 +1,9 @@ #!/bin/bash -# SCHEDULE WITH CRONTAB BASED ON TIME PERIOD REPLAYS SHOULD BE SAVED UNTIL (EX: SCHEDULE ONCE A WEEK TO KEEP A WEEKS WORTH OF REPLAYS IN THE DB) - +# SCHEDULE WITH CRONTAB DAILY DBNAME="servatrice" #set this to the database name used TABLEPREFIX="cockatrice" #set this to the prefix used for the table names in the database (do not inclue the _) SQLCONFFILE="./mysql.cnf" #set this to the path that contains the mysql.cnf file -mysql --defaults-file=$SQLCONFFILE -h localhost -e 'truncate table ""$DBNAME"".""$TABLEPREFIX""_replays;truncate table ""$DBNAME"".""$TABLEPREFIX""_replays_access' +mysql --defaults-file=$SQLCONFFILE -h localhost -e 'delete from servatrice.cockatrice_games where time_finished < DATE_SUB(now(), INTERVAL 8 DAY)' +mysql --defaults-file=$SQLCONFFILE -h localhost -e 'delete from servatrice.cockatrice_replays where id_game NOT IN (select id from servatrice.cockatrice_games)' +mysql --defaults-file=$SQLCONFFILE -h localhost -e 'delete from servatrice.cockatrice_replays_access where id_game NOT IN (select id from servatrice.cockatrice_games)' From ae8296a50e5c003537b7862748dddb4b2f993e70 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Thu, 11 Feb 2016 18:29:50 +0100 Subject: [PATCH 07/11] Game tab: reset docks sizes on "reset layout" --- cockatrice/src/tab_game.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/cockatrice/src/tab_game.cpp b/cockatrice/src/tab_game.cpp index 3b56d126..8330e918 100644 --- a/cockatrice/src/tab_game.cpp +++ b/cockatrice/src/tab_game.cpp @@ -1420,7 +1420,25 @@ void TabGame::actResetLayout() addDockWidget(Qt::BottomDockWidgetArea, replayDock); aReplayDockVisible->setChecked(true); aReplayDockFloating->setChecked(false); + + cardInfoDock->setMinimumSize(250,360); + cardInfoDock->setMaximumSize(250,360); + messageLayoutDock->setMinimumSize(250,200); + messageLayoutDock->setMaximumSize(250,200); + playerListDock->setMinimumSize(250,50); + playerListDock->setMaximumSize(250,50); + replayDock->setMinimumSize(900,100); + replayDock->setMaximumSize(900,100); + } else { + cardInfoDock->setMinimumSize(250,360); + cardInfoDock->setMaximumSize(250,360); + messageLayoutDock->setMinimumSize(250,250); + messageLayoutDock->setMaximumSize(250,250); + playerListDock->setMinimumSize(250,50); + playerListDock->setMaximumSize(250,50); } + + QTimer::singleShot(100, this, SLOT(freeDocksSize())); } void TabGame::createPlayAreaWidget(bool bReplay) From a8c723326dcca545b57c2dde4804fe96da4e0c67 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Fri, 12 Feb 2016 14:49:37 +0100 Subject: [PATCH 08/11] Game tab: use short title for undocked wdgets fix #1777 --- cockatrice/src/tab_game.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cockatrice/src/tab_game.cpp b/cockatrice/src/tab_game.cpp index 8330e918..075f9880 100644 --- a/cockatrice/src/tab_game.cpp +++ b/cockatrice/src/tab_game.cpp @@ -440,13 +440,13 @@ TabGame::~TabGame() void TabGame::retranslateUi() { - QString tabText = getTabText() + " - "; + QString tabText = " | " + (replay ? tr("Replay") : tr("Game")) + " #" + QString::number(gameInfo.game_id()); - cardInfoDock->setWindowTitle((cardInfoDock->isWindow() ? tabText : QString()) + tr("Card Info")); - playerListDock->setWindowTitle((playerListDock->isWindow() ? tabText : QString()) + tr("Player List")); - messageLayoutDock->setWindowTitle((messageLayoutDock->isWindow() ? tabText : QString()) + tr("Messages")); + cardInfoDock->setWindowTitle(tr("Card Info") + (cardInfoDock->isWindow() ? tabText : QString())); + playerListDock->setWindowTitle(tr("Player List") + (playerListDock->isWindow() ? tabText : QString())); + messageLayoutDock->setWindowTitle(tr("Messages") + (messageLayoutDock->isWindow() ? tabText : QString())); if(replayDock) - replayDock->setWindowTitle((replayDock->isWindow() ? tabText : QString()) + tr("Replay Timeline")); + replayDock->setWindowTitle(tr("Replay Timeline") + (replayDock->isWindow() ? tabText : QString())); if (phasesMenu) { for (int i = 0; i < phaseActions.size(); ++i) @@ -1165,7 +1165,7 @@ QString TabGame::getTabText() const QString tabText; if (replay) - tabText.append(tr("REPLAY ")); + tabText.append(tr("Replay") + " "); if (!gameTypeInfo.isEmpty()) tabText.append(gameTypeInfo + " "); if (!gameDesc.isEmpty()) { From 195ab9a150b09b65658dec922ee3f86e2f47eb0d Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Wed, 17 Feb 2016 09:12:40 +0100 Subject: [PATCH 09/11] Try to build windowsxp compatible packages --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bbb7b84..bcd4416a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,8 @@ endif() # Define proper compilation flags IF(MSVC) # Visual Studio: + # Support from Windows XP + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS,5.01") # Maximum optimization set(CMAKE_CXX_FLAGS_RELEASE "/Ox /MD") # Generate complete debugging information From 2418b8017d87b646a6c646b35e1c5d9ff42063eb Mon Sep 17 00:00:00 2001 From: tooomm Date: Thu, 18 Feb 2016 18:32:17 +0100 Subject: [PATCH 10/11] moved usermanual part to wiki --- TODO.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/TODO.md b/TODO.md index c7530e17..1efc5a12 100644 --- a/TODO.md +++ b/TODO.md @@ -10,13 +10,6 @@ Note that "improve" and "write" always also means: "document and comment" ##Scripts * Write example init script for servatrice. -##Improve usermanual: -* Improve Layout, Text, Screenshots; nearly everything is still quick n dirty copy and paste. -* Add missing TODOs -* Translate the Documentation -* Rename the picture filenames to something more meaningful. -* Create an index, lists of tables/figures/... - ##Create developer documentation: * Create developer manual * Add comments to code From e3064727c37507edc9ba14c69acea8c1ecc6df18 Mon Sep 17 00:00:00 2001 From: tooomm Date: Thu, 18 Feb 2016 16:49:20 +0100 Subject: [PATCH 11/11] add template for issues https://github.com/blog/2111-issue-and-pull-request-templates move to .github folder + prompt for date --- CONTRIBUTING.md => .github/CONTRIBUTING.md | 0 .github/ISSUE_TEMPLATE.md | 11 +++++++++++ 2 files changed, 11 insertions(+) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%) create mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..394aae05 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,11 @@ +OS: +*Override this line with the exact operating system you are running! (e.g. "Win 7 SP1", "OS X 10.8.5", "Ubuntu 15.10" ...)* + +Cockatrice version: +*Put your Cockatrice version number & build date here! You find them inside the app: `Help` --> `About Cockatrice` (e.g. "2d53ce9 (2016-02-18)")* + +___ +
+ + +*Explain your Issue/Request/Suggestion in detail here!*