void IntroWidget::onChangeLang() { cSetLang(_langChangeTo); Local::writeSettings(); cSetRestarting(true); cSetRestartingToSettings(false); App::quit(); }
void LanguageBox::onSave() { for (int32 i = 0, l = _langs.size(); i < l; ++i) { if (_langs[i]->checked()) { cSetLang(_langs[i]->val()); Local::writeSettings(); cSetRestarting(true); cSetRestartingToSettings(true); App::quit(); } } }
void UpdateBtn::onClick() { #ifndef TDESKTOP_DISABLE_AUTOUPDATE checkReadyUpdate(); if (Sandbox::updatingState() == Application::UpdatingReady) { cSetRestartingUpdate(true); } else #endif { cSetRestarting(true); cSetRestartingToSettings(false); } App::quit(); }
void ConnectionBox::onSave() { if (_httpProxyRadio.checked() || _tcpProxyRadio.checked()) { ProxyData p; p.host = _hostInput.getLastText().trimmed(); p.user = _userInput.getLastText().trimmed(); p.password = _passwordInput.getLastText().trimmed(); p.port = _portInput.getLastText().toInt(); if (p.host.isEmpty()) { _hostInput.setFocus(); return; } else if (!p.port) { _portInput.setFocus(); return; } if (_httpProxyRadio.checked()) { Global::SetConnectionType(dbictHttpProxy); } else { Global::SetConnectionType(dbictTcpProxy); } Global::SetConnectionProxy(p); } else { Global::SetConnectionType(dbictAuto); Global::SetConnectionProxy(ProxyData()); #ifndef TDESKTOP_DISABLE_NETWORK_PROXY QNetworkProxyFactory::setUseSystemConfiguration(false); QNetworkProxyFactory::setUseSystemConfiguration(true); #endif } if (cPlatform() == dbipWindows && Global::TryIPv6() != _tryIPv6.checked()) { Global::SetTryIPv6(_tryIPv6.checked()); Local::writeSettings(); Global::RefConnectionTypeChanged().notify(); cSetRestarting(true); cSetRestartingToSettings(true); App::quit(); } else { Global::SetTryIPv6(_tryIPv6.checked()); Local::writeSettings(); Global::RefConnectionTypeChanged().notify(); MTP::restart(); reinitImageLinkManager(); reinitWebLoadManager(); onClose(); } }
void ConnectionBox::onSave() { if (_httpProxyRadio.checked() || _tcpProxyRadio.checked()) { ConnectionProxy p; p.host = _hostInput.text().trimmed(); p.user = _userInput.text().trimmed(); p.password = _passwordInput.text().trimmed(); p.port = _portInput.text().toInt(); if (p.host.isEmpty()) { _hostInput.setFocus(); return; } else if (!p.port) { _portInput.setFocus(); return; } if (_httpProxyRadio.checked()) { cSetConnectionType(dbictHttpProxy); } else { cSetConnectionType(dbictTcpProxy); } cSetConnectionProxy(p); } else { cSetConnectionType(dbictAuto); cSetConnectionProxy(ConnectionProxy()); QNetworkProxyFactory::setUseSystemConfiguration(false); QNetworkProxyFactory::setUseSystemConfiguration(true); } if (cPlatform() == dbipWindows && cTryIPv6() != _tryIPv6.checked()) { cSetTryIPv6(_tryIPv6.checked()); Local::writeSettings(); cSetRestarting(true); cSetRestartingToSettings(true); App::quit(); } else { cSetTryIPv6(_tryIPv6.checked()); Local::writeSettings(); MTP::restart(); reinitImageLinkManager(); emit closed(); } }