2012-06-10 16:50:54 +00:00
|
|
|
/*
|
|
|
|
|
* synergy -- mouse and keyboard sharing utility
|
2024-07-22 16:48:02 +00:00
|
|
|
* Copyright (C) 2012 Symless Ltd.
|
2012-06-10 16:50:54 +00:00
|
|
|
* Copyright (C) 2008 Volker Lanz (vl@fidra.de)
|
2018-06-07 15:22:49 +00:00
|
|
|
*
|
2012-06-10 16:50:54 +00:00
|
|
|
* This package is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
2015-05-03 02:33:52 +00:00
|
|
|
* found in the file LICENSE that should have accompanied this file.
|
2018-06-07 15:22:49 +00:00
|
|
|
*
|
2012-06-10 16:50:54 +00:00
|
|
|
* This package is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
2024-07-22 16:48:02 +00:00
|
|
|
|
2012-06-10 16:50:54 +00:00
|
|
|
#include "SettingsDialog.h"
|
2015-02-12 16:49:18 +00:00
|
|
|
|
2022-09-13 15:31:45 +00:00
|
|
|
#include "UpgradeDialog.h"
|
2024-08-09 08:08:29 +00:00
|
|
|
#include "gui/core/CoreProcess.h"
|
2024-08-11 21:34:48 +00:00
|
|
|
#include "gui/license/license_config.h"
|
2024-08-12 15:39:18 +00:00
|
|
|
#include "gui/messages.h"
|
2024-08-07 14:05:18 +00:00
|
|
|
#include "gui/tls/TlsCertificate.h"
|
|
|
|
|
#include "gui/tls/TlsUtility.h"
|
2024-08-09 08:08:29 +00:00
|
|
|
#include "gui/validators/ScreenNameValidator.h"
|
|
|
|
|
#include "gui/validators/ValidationError.h"
|
2012-06-10 16:50:54 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
#include <QDir>
|
|
|
|
|
#include <QFileDialog>
|
|
|
|
|
#include <QMessageBox>
|
2012-06-10 16:50:54 +00:00
|
|
|
#include <QtCore>
|
|
|
|
|
#include <QtGui>
|
|
|
|
|
|
2024-07-26 22:53:52 +00:00
|
|
|
using namespace synergy::license;
|
2024-08-07 14:05:18 +00:00
|
|
|
using namespace synergy::gui;
|
2024-07-26 22:53:52 +00:00
|
|
|
|
|
|
|
|
const char *const kProProductName = "Synergy 1 Pro";
|
|
|
|
|
|
|
|
|
|
SettingsDialog::SettingsDialog(
|
2024-08-09 08:08:29 +00:00
|
|
|
QWidget *parent, IAppConfig &appConfig, const IServerConfig &serverConfig,
|
2024-08-08 17:41:59 +00:00
|
|
|
const License &license, const CoreProcess &coreProcess)
|
2024-07-02 19:07:06 +00:00
|
|
|
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
2024-07-16 13:36:44 +00:00
|
|
|
Ui::SettingsDialogBase(),
|
2024-08-08 17:41:59 +00:00
|
|
|
m_appConfig(appConfig),
|
|
|
|
|
m_serverConfig(serverConfig),
|
2024-07-26 22:53:52 +00:00
|
|
|
m_license(license),
|
2024-08-08 17:41:59 +00:00
|
|
|
m_coreProcess(coreProcess),
|
|
|
|
|
m_tlsUtility(appConfig, license) {
|
2024-07-26 22:53:52 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
setupUi(this);
|
|
|
|
|
|
2024-08-01 00:13:01 +00:00
|
|
|
// force the first tab, since qt creator sets the active tab as the last one
|
|
|
|
|
// the developer was looking at, and it's easy to accidentally save that.
|
|
|
|
|
m_pTabWidget->setCurrentIndex(0);
|
|
|
|
|
|
2024-08-08 10:38:34 +00:00
|
|
|
loadFromConfig();
|
2024-08-08 17:41:59 +00:00
|
|
|
m_wasOriginallySystemScope = m_appConfig.isActiveScopeSystem();
|
|
|
|
|
updateControls();
|
2024-08-08 10:38:34 +00:00
|
|
|
|
2024-08-08 10:39:43 +00:00
|
|
|
m_pScreenNameError = new validators::ValidationError(this);
|
|
|
|
|
m_pLineEditScreenName->setValidator(new validators::ScreenNameValidator(
|
2024-08-08 17:41:59 +00:00
|
|
|
m_pLineEditScreenName, m_pScreenNameError, &serverConfig.screens()));
|
2024-08-12 15:39:18 +00:00
|
|
|
|
|
|
|
|
connect(
|
|
|
|
|
this, &SettingsDialog::shown, this,
|
|
|
|
|
[this] {
|
|
|
|
|
if (!m_appConfig.isActiveScopeWritable()) {
|
|
|
|
|
showReadOnlyMessage();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
Qt::QueuedConnection);
|
2024-08-08 17:41:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Auto-connect slots
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
void SettingsDialog::on_m_pCheckBoxLogToFile_stateChanged(int i) {
|
|
|
|
|
bool checked = i == 2;
|
|
|
|
|
|
|
|
|
|
m_pLabelLogPath->setEnabled(checked);
|
|
|
|
|
m_pLineEditLogFilename->setEnabled(checked);
|
|
|
|
|
m_pButtonBrowseLog->setEnabled(checked);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsDialog::on_m_pButtonBrowseLog_clicked() {
|
|
|
|
|
QString fileName = QFileDialog::getSaveFileName(
|
|
|
|
|
this, tr("Save log file to..."), m_pLineEditLogFilename->text(),
|
|
|
|
|
"Logs (*.log *.txt)");
|
|
|
|
|
|
|
|
|
|
if (!fileName.isEmpty()) {
|
|
|
|
|
m_pLineEditLogFilename->setText(fileName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-09 08:08:29 +00:00
|
|
|
void SettingsDialog::on_m_pCheckBoxEnableTls_clicked(bool) {
|
2024-08-08 17:41:59 +00:00
|
|
|
updateTlsControlsEnabled();
|
|
|
|
|
|
2024-08-11 21:34:48 +00:00
|
|
|
if (license::isActivationEnabled() && !m_tlsUtility.isAvailable()) {
|
2024-08-09 08:08:29 +00:00
|
|
|
m_pCheckBoxEnableTls->setChecked(false);
|
2024-08-10 00:48:27 +00:00
|
|
|
updateTlsControlsEnabled();
|
2024-08-09 08:08:29 +00:00
|
|
|
|
2024-08-08 17:41:59 +00:00
|
|
|
auto edition = m_license.productEdition();
|
|
|
|
|
if (edition == Edition::kBasic) {
|
|
|
|
|
UpgradeDialog upgradeDialog(this);
|
|
|
|
|
upgradeDialog.showDialog(
|
|
|
|
|
QString("Upgrade to %1 to enable TLS encryption.")
|
|
|
|
|
.arg(kProProductName));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsDialog::on_m_pRadioSystemScope_toggled(bool checked) {
|
|
|
|
|
// We only need to test the System scoped Radio as they are connected
|
|
|
|
|
m_appConfig.setLoadFromSystemScope(checked);
|
|
|
|
|
loadFromConfig();
|
|
|
|
|
updateControls();
|
2024-08-12 15:39:18 +00:00
|
|
|
|
|
|
|
|
if (isVisible() && !m_appConfig.isActiveScopeWritable()) {
|
|
|
|
|
showReadOnlyMessage();
|
|
|
|
|
}
|
2024-08-08 10:38:34 +00:00
|
|
|
}
|
|
|
|
|
|
2024-08-09 08:08:29 +00:00
|
|
|
void SettingsDialog::on_m_pPushButtonTlsCertPath_clicked() {
|
2024-08-08 17:41:59 +00:00
|
|
|
QString fileName = QFileDialog::getSaveFileName(
|
|
|
|
|
this, tr("Select a TLS certificate to use..."),
|
2024-08-09 08:08:29 +00:00
|
|
|
m_pLineEditTlsCertPath->text(), "Cert (*.pem)", nullptr,
|
2024-08-08 17:41:59 +00:00
|
|
|
QFileDialog::DontConfirmOverwrite);
|
|
|
|
|
|
|
|
|
|
if (!fileName.isEmpty()) {
|
2024-08-09 08:08:29 +00:00
|
|
|
m_pLineEditTlsCertPath->setText(fileName);
|
2024-08-08 17:41:59 +00:00
|
|
|
|
|
|
|
|
if (QFile(fileName).exists()) {
|
|
|
|
|
updateKeyLengthOnFile(fileName);
|
|
|
|
|
} else {
|
|
|
|
|
qDebug("no tls certificate file at: %s", qUtf8Printable(fileName));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
updateTlsRegenerateButton();
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-09 08:08:29 +00:00
|
|
|
void SettingsDialog::on_m_pComboBoxTlsKeyLength_currentIndexChanged(int) {
|
2024-08-08 17:41:59 +00:00
|
|
|
updateTlsRegenerateButton();
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-09 08:08:29 +00:00
|
|
|
void SettingsDialog::on_m_pPushButtonTlsRegenCert_clicked() {
|
2024-08-08 17:41:59 +00:00
|
|
|
if (m_tlsUtility.generateCertificate()) {
|
|
|
|
|
QMessageBox::information(
|
|
|
|
|
this, tr("TLS Certificate Regenerated"),
|
|
|
|
|
tr("TLS certificate regenerated successfully."));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsDialog::on_m_pCheckBoxServiceEnabled_toggled(bool) {
|
|
|
|
|
updateControls();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// End of auto-connect slots
|
|
|
|
|
//
|
|
|
|
|
|
2024-08-12 15:39:18 +00:00
|
|
|
void SettingsDialog::showEvent(QShowEvent *event) {
|
|
|
|
|
QDialog::showEvent(event);
|
|
|
|
|
emit shown();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsDialog::showReadOnlyMessage() {
|
|
|
|
|
const auto activeScopeFilename = m_appConfig.scopes().activeFilePath();
|
|
|
|
|
messages::showReadOnlySettings(this, activeScopeFilename);
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void SettingsDialog::accept() {
|
2024-08-01 00:13:01 +00:00
|
|
|
if (!m_pLineEditScreenName->hasAcceptableInput()) {
|
|
|
|
|
QMessageBox::warning(
|
|
|
|
|
this, tr("Invalid screen name"), m_pScreenNameError->message());
|
2024-07-22 16:48:02 +00:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-08 17:41:59 +00:00
|
|
|
m_appConfig.setLoadFromSystemScope(m_pRadioSystemScope->isChecked());
|
|
|
|
|
m_appConfig.setScreenName(m_pLineEditScreenName->text());
|
|
|
|
|
m_appConfig.setPort(m_pSpinBoxPort->value());
|
|
|
|
|
m_appConfig.setNetworkInterface(m_pLineEditInterface->text());
|
|
|
|
|
m_appConfig.setLogLevel(m_pComboLogLevel->currentIndex());
|
|
|
|
|
m_appConfig.setLogToFile(m_pCheckBoxLogToFile->isChecked());
|
|
|
|
|
m_appConfig.setLogFilename(m_pLineEditLogFilename->text());
|
|
|
|
|
m_appConfig.setElevateMode(
|
2024-07-02 19:07:06 +00:00
|
|
|
static_cast<ElevateMode>(m_pComboElevate->currentIndex()));
|
2024-08-08 17:41:59 +00:00
|
|
|
m_appConfig.setAutoHide(m_pCheckBoxAutoHide->isChecked());
|
|
|
|
|
m_appConfig.setPreventSleep(m_pCheckBoxPreventSleep->isChecked());
|
2024-08-09 08:08:29 +00:00
|
|
|
m_appConfig.setTlsCertPath(m_pLineEditTlsCertPath->text());
|
|
|
|
|
m_appConfig.setTlsKeyLength(m_pComboBoxTlsKeyLength->currentText().toInt());
|
|
|
|
|
m_appConfig.setTlsEnabled(m_pCheckBoxEnableTls->isChecked());
|
2024-08-08 17:41:59 +00:00
|
|
|
m_appConfig.setLanguageSync(m_pCheckBoxLanguageSync->isChecked());
|
|
|
|
|
m_appConfig.setInvertScrollDirection(m_pCheckBoxScrollDirection->isChecked());
|
|
|
|
|
m_appConfig.setEnableService(m_pCheckBoxServiceEnabled->isChecked());
|
|
|
|
|
m_appConfig.setCloseToTray(m_pCheckBoxCloseToTray->isChecked());
|
|
|
|
|
m_appConfig.setInvertConnection(m_pInvertConnection->isChecked());
|
2024-07-02 19:07:06 +00:00
|
|
|
|
|
|
|
|
QDialog::accept();
|
2020-02-28 11:34:28 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void SettingsDialog::reject() {
|
2024-08-03 00:17:29 +00:00
|
|
|
// restore original system scope value on reject.
|
2024-08-08 17:41:59 +00:00
|
|
|
if (m_appConfig.isActiveScopeSystem() != m_wasOriginallySystemScope) {
|
|
|
|
|
m_appConfig.setLoadFromSystemScope(m_wasOriginallySystemScope);
|
2024-07-02 19:07:06 +00:00
|
|
|
}
|
2021-02-01 19:21:46 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
QDialog::reject();
|
2020-02-28 11:34:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsDialog::loadFromConfig() {
|
|
|
|
|
|
2024-08-08 17:41:59 +00:00
|
|
|
m_pLineEditScreenName->setText(m_appConfig.screenName());
|
|
|
|
|
m_pSpinBoxPort->setValue(m_appConfig.port());
|
|
|
|
|
m_pLineEditInterface->setText(m_appConfig.networkInterface());
|
|
|
|
|
m_pComboLogLevel->setCurrentIndex(m_appConfig.logLevel());
|
|
|
|
|
m_pCheckBoxLogToFile->setChecked(m_appConfig.logToFile());
|
|
|
|
|
m_pLineEditLogFilename->setText(m_appConfig.logFilename());
|
|
|
|
|
m_pCheckBoxAutoHide->setChecked(m_appConfig.autoHide());
|
|
|
|
|
m_pCheckBoxPreventSleep->setChecked(m_appConfig.preventSleep());
|
2024-07-22 16:48:02 +00:00
|
|
|
m_pCheckBoxLanguageSync->setChecked(m_appConfig.languageSync());
|
|
|
|
|
m_pCheckBoxScrollDirection->setChecked(m_appConfig.invertScrollDirection());
|
2024-08-03 00:17:29 +00:00
|
|
|
m_pCheckBoxServiceEnabled->setChecked(m_appConfig.enableService());
|
2024-07-23 19:17:40 +00:00
|
|
|
m_pCheckBoxCloseToTray->setChecked(m_appConfig.closeToTray());
|
2024-08-08 17:41:59 +00:00
|
|
|
m_pComboElevate->setCurrentIndex(static_cast<int>(m_appConfig.elevateMode()));
|
2024-07-02 19:07:06 +00:00
|
|
|
|
2024-08-03 00:17:29 +00:00
|
|
|
if (m_appConfig.isActiveScopeSystem()) {
|
2024-07-02 19:07:06 +00:00
|
|
|
m_pRadioSystemScope->setChecked(true);
|
|
|
|
|
} else {
|
|
|
|
|
m_pRadioUserScope->setChecked(true);
|
|
|
|
|
}
|
2020-02-27 00:41:27 +00:00
|
|
|
|
2024-07-26 22:53:52 +00:00
|
|
|
m_pInvertConnection->setChecked(m_appConfig.invertConnection());
|
|
|
|
|
m_pInvertConnection->setEnabled(
|
|
|
|
|
m_license.productEdition() == Edition::kBusiness);
|
|
|
|
|
|
2024-07-22 16:48:02 +00:00
|
|
|
updateTlsControls();
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-22 16:48:02 +00:00
|
|
|
void SettingsDialog::updateTlsControls() {
|
2024-08-09 08:08:29 +00:00
|
|
|
|
2024-08-08 17:41:59 +00:00
|
|
|
if (QFile(m_appConfig.tlsCertPath()).exists()) {
|
|
|
|
|
updateKeyLengthOnFile(m_appConfig.tlsCertPath());
|
2024-07-02 19:07:06 +00:00
|
|
|
} else {
|
2024-08-08 17:41:59 +00:00
|
|
|
const auto keyLengthText = QString::number(m_appConfig.tlsKeyLength());
|
2024-08-09 08:08:29 +00:00
|
|
|
m_pComboBoxTlsKeyLength->setCurrentIndex(
|
|
|
|
|
m_pComboBoxTlsKeyLength->findText(keyLengthText));
|
2024-07-02 19:07:06 +00:00
|
|
|
}
|
|
|
|
|
|
2024-08-09 08:08:29 +00:00
|
|
|
const auto tlsEnabled = m_tlsUtility.isAvailableAndEnabled();
|
|
|
|
|
const auto writable = m_appConfig.isActiveScopeWritable();
|
|
|
|
|
|
2024-08-12 15:39:18 +00:00
|
|
|
m_pCheckBoxEnableTls->setEnabled(writable);
|
2024-08-09 08:08:29 +00:00
|
|
|
m_pCheckBoxEnableTls->setChecked(writable && tlsEnabled);
|
|
|
|
|
m_pLineEditTlsCertPath->setText(m_appConfig.tlsCertPath());
|
2024-07-02 19:07:06 +00:00
|
|
|
|
2024-07-22 16:48:02 +00:00
|
|
|
updateTlsControlsEnabled();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsDialog::updateTlsControlsEnabled() {
|
2024-08-08 17:41:59 +00:00
|
|
|
const auto writable = m_appConfig.isActiveScopeWritable();
|
|
|
|
|
const auto clientMode = m_appConfig.clientGroupChecked();
|
2024-08-09 08:08:29 +00:00
|
|
|
const auto tlsChecked = m_pCheckBoxEnableTls->isChecked();
|
|
|
|
|
|
|
|
|
|
auto enabled = writable && tlsChecked && !clientMode;
|
|
|
|
|
m_pLabelTlsKeyLength->setEnabled(enabled);
|
|
|
|
|
m_pComboBoxTlsKeyLength->setEnabled(enabled);
|
|
|
|
|
m_pLabelTlsCert->setEnabled(enabled);
|
|
|
|
|
m_pLineEditTlsCertPath->setEnabled(enabled);
|
|
|
|
|
m_pPushButtonTlsCertPath->setEnabled(enabled);
|
|
|
|
|
m_pPushButtonTlsRegenCert->setEnabled(enabled);
|
2022-06-01 12:36:44 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
bool SettingsDialog::isClientMode() const {
|
2024-08-09 08:08:29 +00:00
|
|
|
return m_coreProcess.mode() == synergy::gui::CoreProcess::Mode::Client;
|
2020-07-28 12:00:20 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-22 16:48:02 +00:00
|
|
|
void SettingsDialog::updateTlsRegenerateButton() {
|
2024-08-08 17:41:59 +00:00
|
|
|
const auto writable = m_appConfig.isActiveScopeWritable();
|
2024-08-09 08:08:29 +00:00
|
|
|
const auto keyLength = m_pComboBoxTlsKeyLength->currentText().toInt();
|
|
|
|
|
const auto path = m_pLineEditTlsCertPath->text();
|
2024-08-08 17:41:59 +00:00
|
|
|
const auto keyChanged = m_appConfig.tlsKeyLength() != keyLength;
|
|
|
|
|
const auto pathChanged = m_appConfig.tlsCertPath() != path;
|
2024-08-09 08:08:29 +00:00
|
|
|
const auto tlsEnabled = m_pCheckBoxEnableTls->isChecked();
|
2024-08-08 10:39:43 +00:00
|
|
|
|
2024-08-09 08:08:29 +00:00
|
|
|
m_pPushButtonTlsRegenCert->setEnabled(
|
2024-08-08 17:41:59 +00:00
|
|
|
writable && tlsEnabled && (keyChanged || pathChanged));
|
2020-07-28 12:00:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SettingsDialog::updateKeyLengthOnFile(const QString &path) {
|
2024-07-26 22:53:52 +00:00
|
|
|
TlsCertificate ssl;
|
2024-08-07 14:05:18 +00:00
|
|
|
if (!QFile(path).exists()) {
|
|
|
|
|
qFatal("tls certificate file not found: %s", qUtf8Printable(path));
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
auto length = ssl.getCertKeyLength(path);
|
2024-08-09 08:08:29 +00:00
|
|
|
auto index = m_pComboBoxTlsKeyLength->findText(QString::number(length));
|
|
|
|
|
m_pComboBoxTlsKeyLength->setCurrentIndex(index);
|
2024-08-08 17:41:59 +00:00
|
|
|
m_appConfig.setTlsKeyLength(length);
|
2020-07-27 16:21:46 +00:00
|
|
|
}
|
2021-02-01 19:21:46 +00:00
|
|
|
|
2024-08-08 17:41:59 +00:00
|
|
|
void SettingsDialog::updateControls() {
|
|
|
|
|
|
|
|
|
|
#if defined(Q_OS_WIN)
|
|
|
|
|
const auto serviceAvailable = true;
|
|
|
|
|
#else
|
|
|
|
|
// service not supported on unix yet, so always disable.
|
|
|
|
|
const auto serviceAvailable = false;
|
|
|
|
|
m_pGroupService->setTitle("Service (Windows only)");
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
const bool writable = m_appConfig.isActiveScopeWritable();
|
|
|
|
|
const bool serviceChecked = m_pCheckBoxServiceEnabled->isChecked();
|
|
|
|
|
const bool logToFile = m_pCheckBoxLogToFile->isChecked();
|
2024-07-22 16:48:02 +00:00
|
|
|
|
|
|
|
|
m_pLineEditScreenName->setEnabled(writable);
|
|
|
|
|
m_pSpinBoxPort->setEnabled(writable);
|
|
|
|
|
m_pLineEditInterface->setEnabled(writable);
|
|
|
|
|
m_pComboLogLevel->setEnabled(writable);
|
|
|
|
|
m_pCheckBoxLogToFile->setEnabled(writable);
|
|
|
|
|
m_pCheckBoxAutoHide->setEnabled(writable);
|
|
|
|
|
m_pCheckBoxPreventSleep->setEnabled(writable);
|
2024-08-09 08:08:29 +00:00
|
|
|
m_pLineEditTlsCertPath->setEnabled(writable);
|
|
|
|
|
m_pComboBoxTlsKeyLength->setEnabled(writable);
|
2024-07-23 19:17:40 +00:00
|
|
|
m_pCheckBoxCloseToTray->setEnabled(writable);
|
2024-07-22 16:48:02 +00:00
|
|
|
|
2024-08-08 17:41:59 +00:00
|
|
|
m_pCheckBoxServiceEnabled->setEnabled(writable && serviceAvailable);
|
|
|
|
|
m_pLabelElevate->setEnabled(writable && serviceChecked && serviceAvailable);
|
|
|
|
|
m_pComboElevate->setEnabled(writable && serviceChecked && serviceAvailable);
|
|
|
|
|
|
2024-07-22 16:48:02 +00:00
|
|
|
m_pCheckBoxLanguageSync->setEnabled(writable && isClientMode());
|
|
|
|
|
m_pCheckBoxScrollDirection->setEnabled(writable && isClientMode());
|
|
|
|
|
|
2024-08-08 17:41:59 +00:00
|
|
|
m_pLabelLogPath->setEnabled(writable && logToFile);
|
|
|
|
|
m_pLineEditLogFilename->setEnabled(writable && logToFile);
|
|
|
|
|
m_pButtonBrowseLog->setEnabled(writable && logToFile);
|
2024-07-22 16:48:02 +00:00
|
|
|
|
|
|
|
|
updateTlsControlsEnabled();
|
2024-08-08 17:41:59 +00:00
|
|
|
updateTlsRegenerateButton();
|
2024-07-22 16:48:02 +00:00
|
|
|
updateTlsControls();
|
2021-02-04 17:10:27 +00:00
|
|
|
}
|