do not conect trayIconActivated on mac (#1184)
This commit is contained in:
parent
80444ea8e4
commit
3ebcb78e12
@ -580,14 +580,16 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
|
|||||||
// do so only if trayIcon is already set
|
// do so only if trayIcon is already set
|
||||||
trayIconMenu = new QMenu(this);
|
trayIconMenu = new QMenu(this);
|
||||||
trayIcon->setContextMenu(trayIconMenu);
|
trayIcon->setContextMenu(trayIconMenu);
|
||||||
|
|
||||||
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
|
||||||
this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason)));
|
|
||||||
|
|
||||||
createIconMenu(trayIconMenu);
|
createIconMenu(trayIconMenu);
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
// Note: On Mac, the dock icon is also used to provide same functionality.
|
// Show main window on tray icon click
|
||||||
|
// Note: ignore this on Mac - this is not the way tray should work there
|
||||||
|
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
|
||||||
|
this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason)));
|
||||||
|
#else
|
||||||
|
// Note: On Mac, the dock icon is also used to provide menu functionality
|
||||||
|
// similar to one for tray icon
|
||||||
MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance();
|
MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance();
|
||||||
dockIconHandler->setMainWindow((QMainWindow *)this);
|
dockIconHandler->setMainWindow((QMainWindow *)this);
|
||||||
dockIconMenu = dockIconHandler->dockMenu();
|
dockIconMenu = dockIconHandler->dockMenu();
|
||||||
|
Loading…
Reference in New Issue
Block a user