[vlc-commits] commit: Qt: Make the systray menu work much nicer on Mac ( Juho Vähä-Herttua )
git at videolan.org
git at videolan.org
Thu Jul 29 22:33:50 CEST 2010
vlc | branch: master | Juho Vähä-Herttua <juhovh at iki.fi> | Thu Jul 29 23:22:30 2010 +0300| [15f19b6e25d599e5f69107d6590cd96a99630738] | committer: Jean-Baptiste Kempf
Qt: Make the systray menu work much nicer on Mac
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=15f19b6e25d599e5f69107d6590cd96a99630738
---
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);
More information about the vlc-commits
mailing list