diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2018-12-19 02:08:07 +0200 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2018-12-19 20:43:07 +0200 |
commit | c8d9d9093b7050cd24cdb9eb1d1e05c16bedd9fd (patch) | |
tree | 5f7af6b3bb0f9679e9182dbf089041d6555e7595 | |
parent | f080c65a09a8f3b223c9b5d8e3562320bf258fcd (diff) | |
download | bitcoin-c8d9d9093b7050cd24cdb9eb1d1e05c16bedd9fd.tar.xz |
Fix broken notificator on GNOME
That bug was introduced in #14228.
-rw-r--r-- | src/qt/bitcoingui.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index d7056ddd89..9e1e61bdb6 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -130,6 +130,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty if (QSystemTrayIcon::isSystemTrayAvailable()) { createTrayIcon(networkStyle); } + notificator = new Notificator(QApplication::applicationName(), trayIcon, this); // Create status bar statusBar(); @@ -537,8 +538,7 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel) unitDisplayControl->setOptionsModel(_clientModel->getOptionsModel()); OptionsModel* optionsModel = _clientModel->getOptionsModel(); - if(optionsModel) - { + if (optionsModel && trayIcon) { // be aware of the tray icon disable state change reported by the OptionsModel object. connect(optionsModel, &OptionsModel::hideTrayIconChanged, this, &BitcoinGUI::setTrayIconVisible); @@ -643,14 +643,10 @@ void BitcoinGUI::createTrayIcon(const NetworkStyle *networkStyle) assert(QSystemTrayIcon::isSystemTrayAvailable()); #ifndef Q_OS_MAC - trayIcon = new QSystemTrayIcon(this); + trayIcon = new QSystemTrayIcon(networkStyle->getTrayAndWindowIcon(), this); QString toolTip = tr("%1 client").arg(tr(PACKAGE_NAME)) + " " + networkStyle->getTitleAddText(); trayIcon->setToolTip(toolTip); - trayIcon->setIcon(networkStyle->getTrayAndWindowIcon()); - trayIcon->hide(); #endif - - notificator = new Notificator(QApplication::applicationName(), trayIcon, this); } void BitcoinGUI::createTrayIconMenu() |