From 06f7c1d8998a2453ac02babf66b0b4d02e8d50ca Mon Sep 17 00:00:00 2001 From: Serhii Hadzhilov Date: Tue, 28 Sep 2021 11:39:53 +0300 Subject: [PATCH 1/2] SYNERGY-1218 Wrong window title after open preferences --- src/gui/src/MainWindow.cpp | 22 ++++++++++++---------- src/gui/src/MainWindow.h | 1 + 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index b847703f0..3fafbfe6a 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -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(); diff --git a/src/gui/src/MainWindow.h b/src/gui/src/MainWindow.h index cf1205b5d..70cf18e7d 100644 --- a/src/gui/src/MainWindow.h +++ b/src/gui/src/MainWindow.h @@ -252,6 +252,7 @@ public slots: ClientConnection m_clientConnection; void updateAutoConfigWidgets(); + void updateWindowTitle(); private slots: void on_m_pButtonApply_clicked(); From 7736993547d1452820b4e35b7ef328295ed9b947 Mon Sep 17 00:00:00 2001 From: Serhii Hadzhilov Date: Tue, 28 Sep 2021 11:41:44 +0300 Subject: [PATCH 2/2] Update ChangeLog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 651ecdfc6..72e95199a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ Bug fixes: - #7091 Fix CMakeFileList for unittests - #7092 Synergy is running after quit on Linux - #7096 The system duplicates hotkeys in setup +- #7097 The title "Enterprise" disappeares after clicking on "Preferences" Enhancements: - #7068 Add Synergy restart when settings changed