From 31c6e9925811673c1f53f8e037dbcaa48b31c31c Mon Sep 17 00:00:00 2001 From: Serhii Hadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com> Date: Wed, 1 Jun 2022 15:36:44 +0300 Subject: [PATCH] SYNERGY1-963 Remove TLS unused options from the GUI on Synergy Client (#7182) * SYNERGY1-963 Remove TLS unused options from the GUI on Synergy Client * SYNERGY1-983 Update ChangeLog.txt --- ChangeLog | 8 +++++++- cmake/Version.cmake | 2 +- src/gui/src/MainWindow.cpp | 2 ++ src/gui/src/SettingsDialog.cpp | 31 ++++++++++++++++++++++--------- src/gui/src/SettingsDialog.h | 3 +++ 5 files changed, 35 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2f271d09..256c62815 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -v1.14.4-snapshot +v1.14.5-snapshot +=========== +Bug fixes: +- #7182 Remove unused TLS options from the GUI on Synergy Client +=========== + +v1.14.4-rc =========== Enhancements: - #7143 Add ability to stop synergy on the login screen diff --git a/cmake/Version.cmake b/cmake/Version.cmake index fb3c56f4b..950da25d4 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -6,7 +6,7 @@ cmake_minimum_required (VERSION 3.4) set (SYNERGY_VERSION_MAJOR 1) set (SYNERGY_VERSION_MINOR 14) -set (SYNERGY_VERSION_PATCH 4) +set (SYNERGY_VERSION_PATCH 5) set (SYNERGY_VERSION_BUILD 1) set (SYNERGY_VERSION_STAGE "snapshot") diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 3541d844b..c3ed522cd 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -1479,6 +1479,7 @@ void MainWindow::updateScreenName() void MainWindow::enableServer(bool enable) { + m_AppConfig->setServerGroupChecked(enable); m_pRadioGroupServer->setChecked(enable); if (enable) @@ -1498,6 +1499,7 @@ void MainWindow::enableServer(bool enable) void MainWindow::enableClient(bool enable) { + m_AppConfig->setClientGroupChecked(enable); m_pRadioGroupClient->setChecked(enable); if (enable) diff --git a/src/gui/src/SettingsDialog.cpp b/src/gui/src/SettingsDialog.cpp index 55932d046..bb27499e5 100644 --- a/src/gui/src/SettingsDialog.cpp +++ b/src/gui/src/SettingsDialog.cpp @@ -155,13 +155,7 @@ void SettingsDialog::loadFromConfig() { m_pCheckBoxLanguageSync->setChecked(m_appConfig.getLanguageSync()); m_pCheckBoxScrollDirection->setChecked(m_appConfig.getInvertScrollDirection()); - //If the tls file exists test its key length - if (QFile(appConfig().getTLSCertPath()).exists()) { - updateKeyLengthOnFile(appConfig().getTLSCertPath()); - } else { - m_pComboBoxKeyLength->setCurrentIndex(m_pComboBoxKeyLength->findText(appConfig().getTLSKeyLength())); - } - + setupSeurity(); if (m_appConfig.isSystemScoped()) { m_pRadioSystemScope->setChecked(true); @@ -187,8 +181,6 @@ void SettingsDialog::loadFromConfig() { allowAutoConfig(); #endif - m_pCheckBoxEnableCrypto->setChecked(m_appConfig.getCryptoEnabled()); - #if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG) m_pCheckBoxAutoConfig->setChecked(appConfig().autoConfig()); #else @@ -198,6 +190,27 @@ void SettingsDialog::loadFromConfig() { } +void SettingsDialog::setupSeurity() +{ + //If the tls file exists test its key length + if (QFile(appConfig().getTLSCertPath()).exists()) { + updateKeyLengthOnFile(appConfig().getTLSCertPath()); + } else { + m_pComboBoxKeyLength->setCurrentIndex(m_pComboBoxKeyLength->findText(appConfig().getTLSKeyLength())); + } + + m_pCheckBoxEnableCrypto->setChecked(m_appConfig.getCryptoEnabled()); + + if (appConfig().getClientGroupChecked()) { + m_pLabelKeyLength->hide(); + m_pComboBoxKeyLength->hide(); + m_pLabelCertificate->hide(); + m_pLineEditCertificatePath->hide(); + m_pPushButtonBrowseCert->hide(); + m_pPushButtonRegenCert->hide(); + } +} + void SettingsDialog::allowAutoConfig() { m_pLabelInstallBonjour->hide(); diff --git a/src/gui/src/SettingsDialog.h b/src/gui/src/SettingsDialog.h index 298a9c146..1c666a6f9 100644 --- a/src/gui/src/SettingsDialog.h +++ b/src/gui/src/SettingsDialog.h @@ -64,6 +64,9 @@ class SettingsDialog : public QDialog, public Ui::SettingsDialogBase /// @brief Enables\disables all controls. void enableControls(bool enabled); + /// @brief This method setups security section in setting + void setupSeurity(); + private: MainWindow* m_pMainWindow; AppConfig& m_appConfig;