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