UI: Update tray menu on password unlock changed.

This commit is contained in:
Nodir Temirkhodjaev 2021-04-10 15:46:10 +03:00
parent 0583b8de84
commit 67ac435655
3 changed files with 6 additions and 5 deletions

View File

@ -304,7 +304,8 @@ void FortManager::setupTrayIcon()
connect(m_trayIcon, &QSystemTrayIcon::messageClicked, this, &FortManager::onTrayMessageClicked);
connect(this, &FortManager::optWindowChanged, this, &FortManager::updateTrayMenuFlags);
connect(settings(), &FortSettings::passwordUnlocked, this, &FortManager::updateTrayMenuFlags);
connect(settings(), &FortSettings::passwordUnlockChanged, this,
&FortManager::updateTrayMenuFlags);
connect(confManager(), &ConfManager::confSaved, this, &FortManager::updateTrayMenu);
connect(confManager(), &ConfManager::alertedAppAdded, this, [&] { updateTrayIcon(true); });

View File

@ -236,10 +236,10 @@ void FortSettings::setPasswordChecked(bool checked, int unlockType)
return;
m_passwordChecked = checked;
m_passwordUnlockType = unlockType;
if (m_passwordUnlockType != 0) {
emit passwordUnlocked();
if (m_passwordUnlockType != unlockType) {
m_passwordUnlockType = unlockType;
emit passwordUnlockChanged();
}
emit iniChanged();

View File

@ -232,7 +232,7 @@ public:
signals:
void iniChanged();
void errorMessageChanged();
void passwordUnlocked();
void passwordUnlockChanged();
public slots:
void setupGlobal();