Commit 9ef38092 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: don't trust toggle for systray, do what we say (fix #4248)

If the menu item says hide, really always hide.
parent 4a2819e1
......@@ -989,6 +989,23 @@ void MainInterface::toggleUpdateSystrayMenu()
QVLCMenu::updateSystrayMenu( this, p_intf );
}
void MainInterface::showUpdateSystrayMenu()
{
if( isHidden() )
show();
if( isMinimized() )
showNormal();
activateWindow();
QVLCMenu::updateSystrayMenu( this, p_intf );
}
void MainInterface::hideUpdateSystrayMenu()
{
hide();
QVLCMenu::updateSystrayMenu( this, p_intf );
}
void MainInterface::handleSystrayClick(
QSystemTrayIcon::ActivationReason reason )
{
......
......@@ -182,6 +182,8 @@ public slots:
void togglePlaylist();
#ifndef HAVE_MAEMO
void toggleUpdateSystrayMenu();
void showUpdateSystrayMenu();
void hideUpdateSystrayMenu();
#endif
void toggleAdvancedButtons();
void toggleInterfaceFullScreen();
......
......@@ -1086,13 +1086,13 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
{
sysMenu->addAction( QIcon( ":/logo/vlc16.png" ),
qtr( "Hide VLC media player in taskbar" ), mi,
SLOT( toggleUpdateSystrayMenu() ) );
SLOT( hideUpdateSystrayMenu() ) );
}
else
{
sysMenu->addAction( QIcon( ":/logo/vlc16.png" ),
qtr( "Show VLC media player" ), mi,
SLOT( toggleUpdateSystrayMenu() ) );
SLOT( showUpdateSystrayMenu() ) );
}
sysMenu->addSeparator();
#endif
......
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