void TomahawkTrayIcon::onActivated( QSystemTrayIcon::ActivationReason reason ) { #ifdef Q_OS_MAC return; #endif switch( reason ) { case QSystemTrayIcon::Trigger: { TomahawkWindow* mainwindow = APP->mainWindow(); if (mainwindow->isActiveWindow()) { mainwindow->hide(); } else { TomahawkUtils::bringToFront(); } } break; case QSystemTrayIcon::MiddleClick: { AudioEngine::instance()->playPause(); } break; default: break; } }
void TomahawkTrayIcon::onActivated( QSystemTrayIcon::ActivationReason reason ) { #ifdef Q_WS_MAC return; #endif switch( reason ) { case QSystemTrayIcon::Trigger: { TomahawkWindow* mainwindow = APP->mainWindow(); if ( mainwindow->isVisible() ) { mainwindow->hide(); } else { mainwindow->show(); } } break; default: break; } }