mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-08-01 16:37:44 -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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user