[vlc-devel] commit: Qt4: remove unsuppotted system tray on Maemo ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Oct 31 16:17:26 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 31 17:11:20 2009 +0200| [dcd0b1379fdb4db2d8ff24c52f27fd4a6938a5a7] | committer: Rémi Denis-Courmont 

Qt4: remove unsuppotted system tray on Maemo

QSystremTray class does not exist at all.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dcd0b1379fdb4db2d8ff24c52f27fd4a6938a5a7
---

 modules/gui/qt4/main_interface.cpp |   11 ++++++++++-
 modules/gui/qt4/main_interface.hpp |    9 ++++++++-
 modules/gui/qt4/menus.cpp          |    2 ++
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 9271895..986d9ae 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -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
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 00483ab..c3df6fe 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -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 * );
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 1e9a740..3503e29 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -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




More information about the vlc-devel mailing list