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:
Antony Woods 2014-08-27 21:25:11 +01:00
parent 6f319c8b63
commit b381298981
6 changed files with 66 additions and 3 deletions

View file

@ -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