]> git.sesse.net Git - vlc/commitdiff
Qt: Make the systray menu work much nicer on Mac
authorJuho Vähä-Herttua <juhovh@iki.fi>
Thu, 29 Jul 2010 20:22:30 +0000 (23:22 +0300)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 29 Jul 2010 20:34:19 +0000 (22:34 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/menus.cpp

index a8dff3b58ec42231b61c16c9f0c152575391da11..588f7b558cabdd2beb797e7692f5740176633b6d 100644 (file)
@@ -971,7 +971,11 @@ void MainInterface::handleSystrayClick(
     {
         case QSystemTrayIcon::Trigger:
         case QSystemTrayIcon::DoubleClick:
+#ifdef Q_WS_MAC:
+            QVLCMenu::updateSystrayMenu( this, p_intf );
+#else
             toggleUpdateSystrayMenu();
+#endif
             break;
         case QSystemTrayIcon::MiddleClick:
             sysTray->showMessage( qtr( "VLC media player" ),
index c59400dd6247f33aa456e25c0f9cd32609fe4791..ad4092243af1d087009bb1cf0d9f12d432c2ea8a 100644 (file)
@@ -1077,6 +1077,7 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
     QMenu *sysMenu = mi->getSysTrayMenu();
     sysMenu->clear();
 
+#ifndef Q_WS_MAC
     /* Hide / Show VLC and cone */
     if( mi->isVisible() || b_force_visible )
     {
@@ -1090,8 +1091,9 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
                             qtr( "Show VLC media player" ), mi,
                             SLOT( toggleUpdateSystrayMenu() ) );
     }
-
     sysMenu->addSeparator();
+#endif
+
     PopupPlayEntries( sysMenu, p_intf, p_input );
     PopupMenuPlaylistControlEntries( sysMenu, p_intf);
     PopupMenuControlEntries( sysMenu, p_intf);