aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-10-25 00:34:41 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-11-15 19:07:06 +0200
commit17174f8328c44ae84479e8365c122ad8502bd7da (patch)
treebfb1f77086477a7c35201153bb68d64a0b24e6dd /src/qt/bitcoingui.cpp
parentd67883d01e507dd22d1281f4a4860e79d6a46a47 (diff)
downloadbitcoin-17174f8328c44ae84479e8365c122ad8502bd7da.tar.xz
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.cpp11
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);
}
}