[vlc-devel] [PATCH 2/3] Qt: Make the systray menu work much nicer on Mac

Juho Vähä-Herttua juhovh at iki.fi
Thu Jul 29 22:22:30 CEST 2010


---
 modules/gui/qt4/main_interface.cpp |    4 ++++
 modules/gui/qt4/menus.cpp          |    4 +++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index a8dff3b..588f7b5 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -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" ),
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index c59400d..ad40922 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -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);
-- 
1.6.5.7




More information about the vlc-devel mailing list