Merge pull request #2386 from Diapolo/Mac_GUI
Bitcoin-Qt: ensure createTrayIconMenu() is always called on Mac
This commit is contained in:
commit
9d8d85920a
1 changed files with 5 additions and 2 deletions
|
@ -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,
|
// 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
|
// while the client has not yet fully loaded
|
||||||
if(trayIcon)
|
createTrayIconMenu();
|
||||||
createTrayIconMenu();
|
|
||||||
|
|
||||||
// Keep up to date with client
|
// Keep up to date with client
|
||||||
setNumConnections(clientModel->getNumConnections());
|
setNumConnections(clientModel->getNumConnections());
|
||||||
|
@ -375,6 +374,10 @@ void BitcoinGUI::createTrayIconMenu()
|
||||||
{
|
{
|
||||||
QMenu *trayIconMenu;
|
QMenu *trayIconMenu;
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
|
// return if trayIcon is unset (only on non-Mac OSes)
|
||||||
|
if (!trayIcon)
|
||||||
|
return;
|
||||||
|
|
||||||
trayIconMenu = new QMenu(this);
|
trayIconMenu = new QMenu(this);
|
||||||
trayIcon->setContextMenu(trayIconMenu);
|
trayIcon->setContextMenu(trayIconMenu);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue