From d1c517f3be0e4457f363f74a474a8a47bdd4a5cf Mon Sep 17 00:00:00 2001 From: Alexander von Renteln Date: Wed, 6 Feb 2008 00:37:48 +0000 Subject: [PATCH] mac builds will not have minimize to tray on left click (which should be a problem as mac users have command+h) because mac has only one activation reason for the tray icon (left click) --- src/qtui/mainwin.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index b7199dc1..2c20680c 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -253,11 +253,13 @@ void MainWin::setupSystray() { systrayMenu->addSeparator(); systrayMenu->addAction(ui.actionQuit); -// systray->setContextMenu(systrayMenu); + systray->setContextMenu(systrayMenu); systray->show(); + #ifndef Q_WS_MAC connect(systray, SIGNAL(activated( QSystemTrayIcon::ActivationReason )), this, SLOT(systrayActivated( QSystemTrayIcon::ActivationReason ))); + #endif } void MainWin::connectedToCore() { @@ -339,9 +341,6 @@ void MainWin::systrayActivated( QSystemTrayIcon::ActivationReason activationReas hide(); } } - else { - systrayMenu->popup(QCursor::pos()); - } } void MainWin::showNetworkDlg() { -- 2.20.1