aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-03-19 23:33:36 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-03-30 10:14:45 +0100
commit5968cf5db2a62689a341c02550eeebbf0dabd5ef (patch)
tree12c427a290e42f4e041c2b2e6947636fa4cae67e /src/qt
parentea83336f4eceecbc046e465509b792dd203327bc (diff)
downloadbitcoin-5968cf5db2a62689a341c02550eeebbf0dabd5ef.tar.xz
Bitcoin-Qt: ensure createTrayIconMenu() is always called on Mac
- this should prevent GUI issues on Mac that were observed before (disappearing GUI - see #1522) - the patch ensures, that createTrayIconMenu() is always called on Mac to process and use our MacDockIconHandler
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoingui.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index eff8e667f6..a48581c6ab 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -326,8 +326,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
// Create system tray menu (or setup the dock menu) that late to prevent users from calling actions,
// while the client has not yet fully loaded
- if(trayIcon)
- createTrayIconMenu();
+ createTrayIconMenu();
// Keep up to date with client
setNumConnections(clientModel->getNumConnections());
@@ -375,6 +374,10 @@ void BitcoinGUI::createTrayIconMenu()
{
QMenu *trayIconMenu;
#ifndef Q_OS_MAC
+ // return if trayIcon is unset (only on non-Mac OSes)
+ if (!trayIcon)
+ return;
+
trayIconMenu = new QMenu(this);
trayIcon->setContextMenu(trayIconMenu);