Merge pull request #7097 from symless/SYNERGY-1218-Wrong-window-title-after-open-preferences

SYNERGY-1218 Wrong window title after open preferences
This commit is contained in:
Andrey Batyiev 2021-10-01 11:56:19 +03:00 committed by GitHub
commit 62365c754e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 10 deletions

View file

@ -12,6 +12,7 @@ Bug fixes:
- #7092 Synergy is running after quit on Linux
- #7095 Update account and upgrade links
- #7096 The system duplicates hotkeys in setup
- #7097 The title "Enterprise" disappeares after clicking on "Preferences"
Enhancements:
- #7068 Add Synergy restart when settings changed

View file

@ -184,12 +184,7 @@ MainWindow::MainWindow (AppConfig& appConfig,
connect (m_AppConfig, SIGNAL(zeroConfToggled()),
this, SLOT(zeroConfToggled()), Qt::QueuedConnection);
#ifdef SYNERGY_ENTERPRISE
setWindowTitle ("Synergy 1 Enterprise");
#else
setWindowTitle (m_LicenseManager->activeEditionName());
m_LicenseManager->refresh();
#endif
updateWindowTitle();
QString lastVersion = m_AppConfig->lastVersion();
QString currentVersion = m_VersionChecker.getVersion();
@ -620,9 +615,6 @@ void MainWindow::restartSynergy()
void MainWindow::proofreadInfo()
{
#ifndef SYNERGY_ENTERPRISE
setEdition(m_AppConfig->edition()); // Why is this here?
#endif
int oldState = m_SynergyState;
m_SynergyState = synergyDisconnected;
setSynergyState((qSynergyState)oldState);
@ -1174,7 +1166,7 @@ void MainWindow::changeEvent(QEvent* event)
{
retranslateUi(this);
retranslateMenuBar();
updateWindowTitle();
proofreadInfo();
break;
@ -1303,6 +1295,16 @@ void MainWindow::updateAutoConfigWidgets()
m_pComboServerList->hide();
}
void MainWindow::updateWindowTitle()
{
#ifdef SYNERGY_ENTERPRISE
setWindowTitle ("Synergy 1 Enterprise");
#else
setWindowTitle (m_LicenseManager->activeEditionName());
m_LicenseManager->refresh();
#endif
}
void MainWindow::on_m_pActionSettings_triggered()
{
auto result = SettingsDialog(this, appConfig()).exec();

View file

@ -252,6 +252,7 @@ public slots:
ClientConnection m_clientConnection;
void updateAutoConfigWidgets();
void updateWindowTitle();
private slots:
void on_m_pButtonApply_clicked();