Synergy 907 client tray language switcher reverts to en (#7014)

* SYNERGY-907 Client tray language switcher reverts to EN
*Fix checkbox spelling

* SYNERGY-907 Client tray language switcher reverts to EN
*Update changelog

* SYNERGY-907 Client tray language switcher reverts to EN
*Temporary disable language sync logic

* SYNERGY-907 client tray language switcher reverts to en
*Update changelog

* Synergy 907 client tray language switcher reverts to en
*Fix sonar

* Synergy 907 client tray language switcher reverts to en
*Fix sonar

* Synergy 907 client tray language switcher reverts to en
*Fix chnagelog

Co-authored-by: Andrii Batyiev <andrii-external@symless.com>
This commit is contained in:
Andrey Batyiev 2021-05-24 16:06:16 +03:00 committed by GitHub
parent c000b886c2
commit 6080b6937d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 20 deletions

View file

@ -20,6 +20,7 @@ Bug fixes:
- #7010 Fix Ubuntu 16.04 pipeline in Azure
- #7011 Fix language synchronisation checkbox spelling
- #7013 Wrong connection pop up appears if the user connects using a domain name which is assigned to list of IP's
- #7014 Temporary disable language sync logic
Enhancements:
- #6954 Move language selection to advanced section

View file

@ -77,7 +77,6 @@ const char* AppConfig::m_SynergySettingsName[] = {
"serverHostname",
"tlsCertPath",
"tlsKeyLength",
"languageSync",
};
static const char* logLevelNames[] =
@ -240,7 +239,6 @@ void AppConfig::loadSettings()
m_UseInternalConfig = loadSetting(kUseInternalConfig, false).toBool();
m_ClientGroupChecked = loadSetting(kGroupClientCheck, false).toBool();
m_ServerHostname = loadSetting(kServerHostname).toString();
m_LanguageSync = loadSetting(kLanguageSync, false).toBool();
//only change the serial key if the settings being loaded contains a key
bool updateSerial = ConfigWriter::make()
@ -301,7 +299,6 @@ void AppConfig::saveSettings()
setSetting(kUseInternalConfig, m_UseInternalConfig);
setSetting(kGroupClientCheck, m_ClientGroupChecked);
setSetting(kServerHostname, m_ServerHostname);
setSetting(kLanguageSync, m_LanguageSync);
}
m_unsavedChanges = false;

View file

@ -202,7 +202,6 @@ protected:
kServerHostname,
kTLSCertPath,
kTLSKeyLength,
kLanguageSync
};
void setScreenName(const QString& s);
@ -245,7 +244,7 @@ protected:
int m_LastExpiringWarningTime;
bool m_ActivationHasRun;
bool m_MinimizeToTray;
bool m_LanguageSync = false;
bool m_LanguageSync = true;
bool m_ServerGroupChecked;
bool m_UseExternalConfig;

View file

@ -753,11 +753,6 @@ bool MainWindow::clientArgs(QStringList& args, QString& app)
args << "--log" << appConfig().logFilenameCmd();
}
if (appConfig().getLanguageSync())
{
args << "--sync-language";
}
#if !defined(SYNERGY_ENTERPRISE) && defined(SYNERGY_AUTOCONFIG)
// check auto config first, if it is disabled or no server detected,

View file

@ -52,7 +52,9 @@ SettingsDialog::SettingsDialog(QWidget* parent, AppConfig& config) :
buttonBox->button(QDialogButtonBox::Save)->setEnabled(false);
enableControls(appConfig().isWritable());
m_pCheckBoxLanguageSync->setVisible(m_pMainWindow->synergyType() == MainWindow::synergyClient);
//temporary disable language sync logic
m_pCheckBoxLanguageSync->setVisible(false);
const auto& serveConfig = m_pMainWindow->serverConfig();
m_pLineEditScreenName->setValidator(new validators::ScreenNameValidator(m_pLineEditScreenName, m_pLabelNameError, (&serveConfig.screens())));
@ -62,7 +64,6 @@ SettingsDialog::SettingsDialog(QWidget* parent, AppConfig& config) :
connect(m_pCheckBoxAutoConfig, SIGNAL(clicked()), this, SLOT(onChange()));
connect(m_pCheckBoxMinimizeToTray, SIGNAL(clicked()), this, SLOT(onChange()));
connect(m_pCheckBoxAutoHide, SIGNAL(clicked()), this, SLOT(onChange()));
connect(m_pCheckBoxLanguageSync, SIGNAL(clicked()), this, SLOT(onChange()));
connect(m_pLineEditInterface, SIGNAL(textEdited(QString)), this, SLOT(onChange()));
connect(m_pSpinBoxPort, SIGNAL(valueChanged(int)), this, SLOT(onChange()));
connect(m_pLineEditScreenName, SIGNAL(textEdited(QString)), this, SLOT(onChange()));
@ -83,7 +84,6 @@ void SettingsDialog::accept()
appConfig().setLanguage(m_pComboLanguage->itemData(m_pComboLanguage->currentIndex()).toString());
appConfig().setElevateMode(static_cast<ElevateMode>(m_pComboElevate->currentIndex()));
appConfig().setAutoHide(m_pCheckBoxAutoHide->isChecked());
appConfig().setLanguageSync(m_pCheckBoxLanguageSync->isChecked());
appConfig().setAutoConfig(m_pCheckBoxAutoConfig->isChecked());
appConfig().setMinimizeToTray(m_pCheckBoxMinimizeToTray->isChecked());
appConfig().setTLSCertPath(m_pLineEditCertificatePath->text());
@ -142,7 +142,6 @@ void SettingsDialog::loadFromConfig() {
m_pLineEditLogFilename->setText(appConfig().logFilename());
setIndexFromItemData(m_pComboLanguage, appConfig().language());
m_pCheckBoxAutoHide->setChecked(appConfig().getAutoHide());
m_pCheckBoxLanguageSync->setChecked(appConfig().getLanguageSync());
m_pCheckBoxMinimizeToTray->setChecked(appConfig().getMinimizeToTray());
m_pLineEditCertificatePath->setText(appConfig().getTLSCertPath());
m_pCheckBoxEnableCrypto->setChecked(m_appConfig.getCryptoEnabled());
@ -330,7 +329,6 @@ bool SettingsDialog::isModified()
|| appConfig().language() != m_pComboLanguage->itemData(m_pComboLanguage->currentIndex()).toString()
|| appConfig().elevateMode() != static_cast<ElevateMode>(m_pComboElevate->currentIndex())
|| appConfig().getAutoHide() != m_pCheckBoxAutoHide->isChecked()
|| appConfig().getLanguageSync() != m_pCheckBoxLanguageSync->isChecked()
|| appConfig().autoConfig() != m_pCheckBoxAutoConfig->isChecked()
|| appConfig().getMinimizeToTray() != m_pCheckBoxMinimizeToTray->isChecked()
|| appConfig().getTLSCertPath() != m_pLineEditCertificatePath->text()
@ -349,7 +347,6 @@ void SettingsDialog::enableControls(bool enable) {
m_pComboLanguage->setEnabled(enable);
m_pComboElevate->setEnabled(enable);
m_pCheckBoxAutoHide->setEnabled(enable);
m_pCheckBoxLanguageSync->setEnabled(enable);
m_pCheckBoxAutoConfig->setEnabled(enable);
m_pCheckBoxMinimizeToTray->setEnabled(enable);
m_pLineEditCertificatePath->setEnabled(enable);

View file

@ -101,9 +101,6 @@ ArgParser::parseClientArgs(lib::synergy::ClientArgs& args, int argc, const char*
++i;
continue;
}
else if (isArg(i, argc, argv, nullptr, "--sync-language")) {
argsBase().m_enableLangSync = true;
}
else if (isArg(i, argc, argv, nullptr, "--camp")) {
// ignore -- included for backwards compatibility
}

View file

@ -57,7 +57,7 @@ namespace lib {
String m_profileDirectory; /// @brief The profile DIR to use for the application
String m_pluginDirectory; /// @brief //TODO Plugins? Get set in ARCH but doesn't seem to get used
String m_tlsCertFile; /// @brief Contains the location of the TLS certificate file
bool m_enableLangSync = false; /// @brief Should keyboard input be in same language as on server
bool m_enableLangSync = true; /// @brief Should keyboard input be in same language as on server
#if SYSAPI_WIN32
bool m_debugServiceWait = false;

View file

@ -612,6 +612,8 @@ KeyMap::mapCharacterKey(Keystrokes& keys, KeyID id, SInt32 group,
if (i == m_keyIDMap.end()) {
// unknown key
LOG((CLOG_DEBUG1 "key %04x is not on keyboard", id));
return NULL;
}
const KeyGroupTable& keyGroupTable = i->second;
@ -763,6 +765,7 @@ KeyMap::keysForKeyItem(const KeyItem& keyItem, SInt32& group,
KeyModifierAltGr | KeyModifierNumLock | KeyModifierScrollLock;
// add keystrokes to adjust the group
if (App::instance().argsBase().m_enableLangSync &&
group != keyItem.m_group) {
group = keyItem.m_group;