Skip to content

Commit

Permalink
Merge pull request #2386 from Diapolo/Mac_GUI
Browse files Browse the repository at this point in the history
Bitcoin-Qt: ensure createTrayIconMenu() is always called on Mac
  • Loading branch information
laanwj committed Mar 31, 2013
2 parents a7cbb34 + 5968cf5 commit 9d8d859
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/qt/bitcoingui.cpp
Expand Up @@ -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());
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 9d8d859

Please sign in to comment.