Commit 15f19b6e authored by Juho Vähä-Herttua's avatar Juho Vähä-Herttua Committed by Jean-Baptiste Kempf

Qt: Make the systray menu work much nicer on Mac

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 0b86dfab
...@@ -971,7 +971,11 @@ void MainInterface::handleSystrayClick( ...@@ -971,7 +971,11 @@ void MainInterface::handleSystrayClick(
{ {
case QSystemTrayIcon::Trigger: case QSystemTrayIcon::Trigger:
case QSystemTrayIcon::DoubleClick: case QSystemTrayIcon::DoubleClick:
#ifdef Q_WS_MAC:
QVLCMenu::updateSystrayMenu( this, p_intf );
#else
toggleUpdateSystrayMenu(); toggleUpdateSystrayMenu();
#endif
break; break;
case QSystemTrayIcon::MiddleClick: case QSystemTrayIcon::MiddleClick:
sysTray->showMessage( qtr( "VLC media player" ), sysTray->showMessage( qtr( "VLC media player" ),
......
...@@ -1077,6 +1077,7 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi, ...@@ -1077,6 +1077,7 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
QMenu *sysMenu = mi->getSysTrayMenu(); QMenu *sysMenu = mi->getSysTrayMenu();
sysMenu->clear(); sysMenu->clear();
#ifndef Q_WS_MAC
/* Hide / Show VLC and cone */ /* Hide / Show VLC and cone */
if( mi->isVisible() || b_force_visible ) if( mi->isVisible() || b_force_visible )
{ {
...@@ -1090,8 +1091,9 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi, ...@@ -1090,8 +1091,9 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
qtr( "Show VLC media player" ), mi, qtr( "Show VLC media player" ), mi,
SLOT( toggleUpdateSystrayMenu() ) ); SLOT( toggleUpdateSystrayMenu() ) );
} }
sysMenu->addSeparator(); sysMenu->addSeparator();
#endif
PopupPlayEntries( sysMenu, p_intf, p_input ); PopupPlayEntries( sysMenu, p_intf, p_input );
PopupMenuPlaylistControlEntries( sysMenu, p_intf); PopupMenuPlaylistControlEntries( sysMenu, p_intf);
PopupMenuControlEntries( sysMenu, p_intf); PopupMenuControlEntries( sysMenu, p_intf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment