mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Added 'auto connect' checkbox to connect dialog. When the main window becomes active for the first time and auto connect is set to true, it will call connectToServer at that point.
This commit is contained in:
parent
6f319c8b63
commit
b381298981
6 changed files with 66 additions and 3 deletions
|
|
@ -48,6 +48,8 @@ SettingsCache::SettingsCache()
|
|||
priceTagSource = settings->value("deckeditor/pricetagsource", 0).toInt();
|
||||
|
||||
ignoreUnregisteredUsers = settings->value("chat/ignore_unregistered", false).toBool();
|
||||
|
||||
attemptAutoConnect = settings->value("server/auto_connect", 0).toInt() == 0 ? false : true;
|
||||
}
|
||||
|
||||
void SettingsCache::setLang(const QString &_lang)
|
||||
|
|
@ -267,6 +269,12 @@ void SettingsCache::setMainWindowGeometry(const QByteArray &_mainWindowGeometry)
|
|||
settings->setValue("interface/main_window_geometry", mainWindowGeometry);
|
||||
}
|
||||
|
||||
void SettingsCache::setAutoConnect(const bool &_autoConnect)
|
||||
{
|
||||
attemptAutoConnect = _autoConnect;
|
||||
settings->value("server/auto_connect", attemptAutoConnect ? 1 : 0);
|
||||
}
|
||||
|
||||
void SettingsCache::copyPath(const QString &src, const QString &dst)
|
||||
{
|
||||
// test source && return if inexistent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue