mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 13:33:55 -07:00
Don't hardcode brackets, fetch from cocaktrice.github.io, store as settings.
Took 3 minutes Took 38 seconds Took 7 minutes
This commit is contained in:
parent
f9f5489871
commit
d2a63ca758
24 changed files with 664 additions and 206 deletions
|
|
@ -37,6 +37,7 @@
|
|||
#include "version_string.h"
|
||||
#include "widgets/dialogs/dlg_connect.h"
|
||||
#include "widgets/server/handle_public_servers.h"
|
||||
#include "widgets/tabs/api/commander_spellbook/handle_commander_brackets.h"
|
||||
#include "widgets/utility/get_text_with_max.h"
|
||||
|
||||
#include <QAction>
|
||||
|
|
@ -640,6 +641,7 @@ void MainWindow::alertForcedOracleRun(const QString &version, bool isUpdate)
|
|||
|
||||
actCheckCardUpdates();
|
||||
actCheckServerUpdates();
|
||||
actCheckCommanderBracketDefinitionUpdates();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
|
@ -984,6 +986,16 @@ void MainWindow::checkClientUpdatesFinished(bool needToUpdate, bool /* isCompati
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::actCheckCommanderBracketDefinitionUpdates()
|
||||
{
|
||||
auto *handler = new HandleCommanderBrackets(this);
|
||||
|
||||
connect(handler, &HandleCommanderBrackets::sigBracketDefinitionsDownloaded, this,
|
||||
[]() { qDebug() << "Bracket definitions loaded"; });
|
||||
|
||||
handler->downloadBracketDefinitions();
|
||||
}
|
||||
|
||||
void MainWindow::refreshShortcuts()
|
||||
{
|
||||
ShortcutsSettings &shortcuts = SettingsCache::instance().shortcuts();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue