Commit 9af41291 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - SysTrayIcon: change the previous commit after some remarks on IRC and...

Qt4 - SysTrayIcon: change the previous commit after some remarks on IRC and fix the toggle/Show-Hide - bug.

parent 26773c45
......@@ -22,13 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <QMenu>
#include <QMenuBar>
#include <QAction>
#include <QActionGroup>
#include <QSignalMapper>
#include <QSystemTrayIcon>
#ifndef WIN32
# include <signal.h>
#endif
......@@ -40,6 +33,13 @@
#include "dialogs_provider.hpp"
#include "input_manager.hpp"
#include <QMenu>
#include <QMenuBar>
#include <QAction>
#include <QActionGroup>
#include <QSignalMapper>
#include <QSystemTrayIcon>
enum
{
ITEM_NORMAL,
......@@ -597,24 +597,20 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi, intf_thread_t *p_intf,
POPUP_BOILERPLATE;
QMenu *sysMenu = mi->getSysTrayMenu();
sysMenu->clear();
DP_SADD( sysMenu, qtr("&About VLC media player" ), "", "",
aboutDialog(), "" );
sysMenu->addSeparator();
POPUP_PLAY_ENTRIES( sysMenu );
sysMenu->addSeparator();
DP_SADD( sysMenu, qtr("&Open" ), "", "", openFileDialog(), "" );
sysMenu->addSeparator();
if( !mi->isVisible() || b_force_visible )
if( mi->isVisible() || b_force_visible )
{
sysMenu->addAction( qtr("Hide Interface"), mi,
sysMenu->addAction( qtr("Hide VLC media player"), mi,
SLOT( toggleUpdateSystrayMenu() ) );
}
else
{
sysMenu->addAction( qtr("Show Interface"), mi,
sysMenu->addAction( qtr("Show VLC media player"), mi,
SLOT( toggleUpdateSystrayMenu() ) );
}
sysMenu->addSeparator();
POPUP_PLAY_ENTRIES( sysMenu );
sysMenu->addSeparator();
DP_SADD( sysMenu, qtr("&Open Media" ), "", "", openFileDialog(), "" );
DP_SADD( sysMenu, qtr("&Quit") , "", "", quit(), "" );
mi->getSysTray()->setContextMenu( sysMenu );
......
......@@ -26,12 +26,12 @@
#include "qt4.hpp"
#include <QObject>
#include <vector>
#include <QSystemTrayIcon>
using namespace std;
class QMenu;
class QMenuBar;
class QSystemTrayIcon;
class MenuItemData : public QObject
{
......
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