SYNERGY-1298 Fix endless notifications during connection (#7113)

* SYNERGY-1298 Fix endless notification during connection

* SYNERGY-1298 Fix code smell

* Update ChangeLog
This commit is contained in:
SerhiiGadzhilov 2021-10-26 13:50:42 +03:00 committed by GitHub
parent d92f01f5ac
commit a6a8e7375b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 8 deletions

View file

@ -2,7 +2,7 @@ v1.14.2-snapshot
=========== ===========
Bug fixes: Bug fixes:
- #7070 Fix radio button shifted focus on macOS - #7070 Fix radio button shifted focus on macOS
- #7038 | #7104 | #7111 | #7112 Fix client and server different keyboard layout errors - #7038 | #7104 | #7111 | #7112 | #7113 Fix client and server different keyboard layout errors
- #7078 Fix clipboard re-enables automatically - #7078 Fix clipboard re-enables automatically
- #7077 Fix Ubuntu, CentOS and Debian build after SYNERGY-1161 - #7077 Fix Ubuntu, CentOS and Debian build after SYNERGY-1161
- #7080 Add trace if the system can't open file with trusted fingerprints - #7080 Add trace if the system can't open file with trusted fingerprints

View file

@ -163,6 +163,7 @@ ServerProxy::parseHandshakeMessage(const UInt8* code)
// handshake is complete // handshake is complete
m_parser = &ServerProxy::parseMessage; m_parser = &ServerProxy::parseMessage;
checkMissedLanguages();
m_client->handshakeComplete(); m_client->handshakeComplete();
} }
@ -961,13 +962,6 @@ ServerProxy::setServerLanguages()
String serverLanguages; String serverLanguages;
ProtocolUtil::readf(m_stream, kMsgDLanguageSynchronisation + 4, &serverLanguages); ProtocolUtil::readf(m_stream, kMsgDLanguageSynchronisation + 4, &serverLanguages);
m_languageManager.setRemoteLanguages(serverLanguages); m_languageManager.setRemoteLanguages(serverLanguages);
auto missedLanguages = m_languageManager.getMissedLanguages();
if (!missedLanguages.empty()) {
AppUtil::instance().showNotification("Language synchronization error",
"You need to install these languages on this computer to enable support for multiple languages: "
+ missedLanguages);
}
} }
void void
@ -993,3 +987,14 @@ ServerProxy::setActiveServerLanguage(const String& language)
LOG((CLOG_DEBUG1 "Active server langauge is empty!")); LOG((CLOG_DEBUG1 "Active server langauge is empty!"));
} }
} }
void
ServerProxy::checkMissedLanguages() const
{
auto missedLanguages = m_languageManager.getMissedLanguages();
if (!missedLanguages.empty()) {
AppUtil::instance().showNotification("Language synchronization error",
"You need to install these languages on this computer to enable support for multiple languages: "
+ missedLanguages);
}
}

View file

@ -116,6 +116,7 @@ private:
void secureInputNotification(); void secureInputNotification();
void setServerLanguages(); void setServerLanguages();
void setActiveServerLanguage(const String& language); void setActiveServerLanguage(const String& language);
void checkMissedLanguages() const;
private: private:
typedef EResult (ServerProxy::*MessageParser)(const UInt8*); typedef EResult (ServerProxy::*MessageParser)(const UInt8*);