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

Qt4: remove unsuppotted system tray on Maemo

QSystremTray class does not exist at all.
parent 90aa71ca
...@@ -82,7 +82,9 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -82,7 +82,9 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
bgWidget = NULL; bgWidget = NULL;
videoWidget = NULL; videoWidget = NULL;
playlistWidget = NULL; playlistWidget = NULL;
#ifndef HAVE_MAEMO
sysTray = NULL; sysTray = NULL;
#endif
videoIsActive = false; videoIsActive = false;
playlistVisible = false; playlistVisible = false;
input_name = ""; input_name = "";
...@@ -185,11 +187,13 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -185,11 +187,13 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
CONNECT( THEMIM->getIM(), nameChanged( const QString& ), CONNECT( THEMIM->getIM(), nameChanged( const QString& ),
this, setName( const QString& ) ); this, setName( const QString& ) );
/* and systray */ /* and systray */
#ifndef HAVE_MAEMO
if( sysTray ) if( sysTray )
{ {
CONNECT( THEMIM->getIM(), nameChanged( const QString& ), CONNECT( THEMIM->getIM(), nameChanged( const QString& ),
this, updateSystrayTooltipName( const QString& ) ); this, updateSystrayTooltipName( const QString& ) );
} }
#endif
/* and title of the Main Interface*/ /* and title of the Main Interface*/
if( config_GetInt( p_intf, "qt-name-in-title" ) ) if( config_GetInt( p_intf, "qt-name-in-title" ) )
{ {
...@@ -201,11 +205,13 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -201,11 +205,13 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
* CONNECTS on PLAY_STATUS * CONNECTS on PLAY_STATUS
**/ **/
/* Status on the systray */ /* Status on the systray */
#ifndef HAVE_MAEMO
if( sysTray ) if( sysTray )
{ {
CONNECT( THEMIM->getIM(), statusChanged( int ), CONNECT( THEMIM->getIM(), statusChanged( int ),
this, updateSystrayTooltipStatus( int ) ); this, updateSystrayTooltipStatus( int ) );
} }
#endif
/* END CONNECTS ON IM */ /* END CONNECTS ON IM */
...@@ -562,6 +568,7 @@ void MainInterface::createTaskBarButtons() ...@@ -562,6 +568,7 @@ void MainInterface::createTaskBarButtons()
inline void MainInterface::initSystray() inline void MainInterface::initSystray()
{ {
#ifndef HAVE_MAEMO
bool b_systrayAvailable = QSystemTrayIcon::isSystemTrayAvailable(); bool b_systrayAvailable = QSystemTrayIcon::isSystemTrayAvailable();
bool b_systrayWanted = config_GetInt( p_intf, "qt-system-tray" ); bool b_systrayWanted = config_GetInt( p_intf, "qt-system-tray" );
...@@ -578,6 +585,7 @@ inline void MainInterface::initSystray() ...@@ -578,6 +585,7 @@ inline void MainInterface::initSystray()
if( b_systrayAvailable && b_systrayWanted ) if( b_systrayAvailable && b_systrayWanted )
createSystray(); createSystray();
#endif
} }
inline void MainInterface::askForPrivacy() inline void MainInterface::askForPrivacy()
...@@ -1080,7 +1088,7 @@ void MainInterface::showCryptedLabel( bool b_show ) ...@@ -1080,7 +1088,7 @@ void MainInterface::showCryptedLabel( bool b_show )
/***************************************************************************** /*****************************************************************************
* Systray Icon and Systray Menu * Systray Icon and Systray Menu
*****************************************************************************/ *****************************************************************************/
#ifndef HAVE_MAEMO
/** /**
* Create a SystemTray icon and a menu that would go with it. * Create a SystemTray icon and a menu that would go with it.
* Connects to a click handler on the icon. * Connects to a click handler on the icon.
...@@ -1223,6 +1231,7 @@ void MainInterface::updateSystrayTooltipStatus( int i_status ) ...@@ -1223,6 +1231,7 @@ void MainInterface::updateSystrayTooltipStatus( int i_status )
} }
QVLCMenu::updateSystrayMenu( this, p_intf ); QVLCMenu::updateSystrayMenu( this, p_intf );
} }
#endif
/************************************************************************ /************************************************************************
* D&D Events * D&D Events
......
...@@ -83,8 +83,10 @@ public: ...@@ -83,8 +83,10 @@ public:
int controlVideo( int i_query, va_list args ); int controlVideo( int i_query, va_list args );
/* Getters */ /* Getters */
#ifndef HAVE_MAEMO
QSystemTrayIcon *getSysTray() { return sysTray; } QSystemTrayIcon *getSysTray() { return sysTray; }
QMenu *getSysTrayMenu() { return systrayMenu; } QMenu *getSysTrayMenu() { return systrayMenu; }
#endif
int getControlsVisibilityStatus(); int getControlsVisibilityStatus();
/* Sizehint() */ /* Sizehint() */
...@@ -116,8 +118,10 @@ private: ...@@ -116,8 +118,10 @@ private:
bool isDocked() { return ( i_pl_dock != PL_UNDOCKED ); } bool isDocked() { return ( i_pl_dock != PL_UNDOCKED ); }
QSettings *settings; QSettings *settings;
#ifndef HAVE_MAEMO
QSystemTrayIcon *sysTray; QSystemTrayIcon *sysTray;
QMenu *systrayMenu; QMenu *systrayMenu;
#endif
QString input_name; QString input_name;
QGridLayout *mainLayout; QGridLayout *mainLayout;
ControlsWidget *controls; ControlsWidget *controls;
...@@ -161,7 +165,9 @@ public slots: ...@@ -161,7 +165,9 @@ public slots:
void dockPlaylist( pl_dock_e i_pos = PL_BOTTOM ); void dockPlaylist( pl_dock_e i_pos = PL_BOTTOM );
void toggleMinimalView( bool ); void toggleMinimalView( bool );
void togglePlaylist(); void togglePlaylist();
#ifndef HAVE_MAEMO
void toggleUpdateSystrayMenu(); void toggleUpdateSystrayMenu();
#endif
void toggleAdvanced(); void toggleAdvanced();
void toggleFullScreen(); void toggleFullScreen();
void toggleFSC(); void toggleFSC();
...@@ -183,10 +189,11 @@ private slots: ...@@ -183,10 +189,11 @@ private slots:
#if 0 #if 0
void visual(); void visual();
#endif #endif
#ifndef HAVE_MAEMO
void handleSystrayClick( QSystemTrayIcon::ActivationReason ); void handleSystrayClick( QSystemTrayIcon::ActivationReason );
void updateSystrayTooltipName( const QString& ); void updateSystrayTooltipName( const QString& );
void updateSystrayTooltipStatus( int ); void updateSystrayTooltipStatus( int );
#endif
void showCryptedLabel( bool ); void showCryptedLabel( bool );
void handleKeyPress( QKeyEvent * ); void handleKeyPress( QKeyEvent * );
......
...@@ -1000,6 +1000,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -1000,6 +1000,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
#undef ACT_ADDMENU #undef ACT_ADDMENU
#undef ACT_ADDCHECK #undef ACT_ADDCHECK
#ifndef HAVE_MAEMO
/************************************************************************ /************************************************************************
* Systray Menu * * Systray Menu *
************************************************************************/ ************************************************************************/
...@@ -1042,6 +1043,7 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi, ...@@ -1042,6 +1043,7 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
/* Set the menu */ /* Set the menu */
mi->getSysTray()->setContextMenu( sysMenu ); mi->getSysTray()->setContextMenu( sysMenu );
} }
#endif
#undef CREATE_POPUP #undef CREATE_POPUP
#undef POPUP_BOILERPLATE #undef POPUP_BOILERPLATE
......
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