diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-10-25 00:34:41 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-11-15 19:07:06 +0200 |
commit | 17174f8328c44ae84479e8365c122ad8502bd7da (patch) | |
tree | bfb1f77086477a7c35201153bb68d64a0b24e6dd /src/qt/bitcoingui.cpp | |
parent | d67883d01e507dd22d1281f4a4860e79d6a46a47 (diff) |
gui: Replace "Hide tray icon" option with positive "Show tray icon" one
This change makes easier both (1) using this option, and (2) reasoning
about the code.
Diffstat (limited to 'src/qt/bitcoingui.cpp')
-rw-r--r-- | src/qt/bitcoingui.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 23370e6ad3..f902c989ea 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -615,10 +615,10 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel, interfaces::BlockAndH OptionsModel* optionsModel = _clientModel->getOptionsModel(); if (optionsModel && trayIcon) { // be aware of the tray icon disable state change reported by the OptionsModel object. - connect(optionsModel, &OptionsModel::hideTrayIconChanged, this, &BitcoinGUI::setTrayIconVisible); + connect(optionsModel, &OptionsModel::showTrayIconChanged, this, &BitcoinGUI::setTrayIconVisible); // initialize the disable state of the tray icon with the current value in the model. - setTrayIconVisible(optionsModel->getHideTrayIcon()); + setTrayIconVisible(optionsModel->getShowTrayIcon()); } } else { // Disable possibility to show main window via action @@ -1387,11 +1387,10 @@ void BitcoinGUI::showProgress(const QString &title, int nProgress) } } -void BitcoinGUI::setTrayIconVisible(bool fHideTrayIcon) +void BitcoinGUI::setTrayIconVisible(bool show_tray_con) { - if (trayIcon) - { - trayIcon->setVisible(!fHideTrayIcon); + if (trayIcon) { + trayIcon->setVisible(show_tray_con); } } |