SYNERGY-1307 Prevent notifications if language reading fails (#7115)
* SYNERGY-1307 Prevent notifications if language reading fails * Update ChangeLog * SYNERGY-1307 Fix code smell
This commit is contained in:
parent
4a30a9234b
commit
5c7db2788d
3 changed files with 10 additions and 2 deletions
|
|
@ -18,6 +18,7 @@ Bug fixes:
|
|||
- #7097 The title "Enterprise" disappeares after clicking on "Preferences"
|
||||
- #7108 Wrong characters on client for unicode
|
||||
- #7114 Fixed problem with reading languages on Linux system
|
||||
- #7115 Prevent notifications if language reading fails
|
||||
|
||||
Enhancements:
|
||||
- #7068 Add Synergy restart when settings changed
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
//
|
||||
// ServerProxy
|
||||
|
|
@ -967,7 +968,7 @@ ServerProxy::setServerLanguages()
|
|||
void
|
||||
ServerProxy::setActiveServerLanguage(const String& language)
|
||||
{
|
||||
if (!language.empty()) {
|
||||
if (!language.empty() && std::strlen(language.c_str()) > 0) {
|
||||
if(m_serverLanguage != language) {
|
||||
m_isUserNotifiedAboutLanguageSyncError = false;
|
||||
m_serverLanguage = language;
|
||||
|
|
|
|||
|
|
@ -89,7 +89,13 @@ String LanguageManager::getSerializedLocalLanguages() const
|
|||
|
||||
bool LanguageManager::isLanguageInstalled(const String& language) const
|
||||
{
|
||||
return (std::find(m_localLanguages.begin(), m_localLanguages.end(), language) != m_localLanguages.end());
|
||||
bool isInstalled = true;
|
||||
|
||||
if (!m_localLanguages.empty()) {
|
||||
isInstalled = (std::find(m_localLanguages.begin(), m_localLanguages.end(), language) != m_localLanguages.end());
|
||||
}
|
||||
|
||||
return isInstalled;
|
||||
}
|
||||
|
||||
} //namespace languages
|
||||
|
|
|
|||
Loading…
Reference in a new issue