[vlc-commits] Qt: remove the MAEMO hack, unneeded in Fremantle, now

Konstantin Pavlov git at videolan.org
Fri Oct 14 14:31:46 CEST 2011


vlc | branch: master | Konstantin Pavlov <thresh at videolan.org> | Fri Oct 14 14:24:57 2011 +0200| [316088db30691353005056ca78bf8f6990e854af] | committer: Jean-Baptiste Kempf

Qt: remove the MAEMO hack, unneeded in Fremantle, now

But deactivate the systray on those systems
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

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

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 7937a8d..ae570bc 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -81,9 +81,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     videoWidget          = NULL;
     playlistWidget       = NULL;
     stackCentralOldWidget= NULL;
-#ifndef HAVE_MAEMO
     sysTray              = NULL;
-#endif
     fullscreenControls   = NULL;
     cryptedLabel         = NULL;
     controls             = NULL;
@@ -444,7 +442,6 @@ void MainInterface::createMainWidget( QSettings *settings )
 
 inline void MainInterface::initSystray()
 {
-#ifndef HAVE_MAEMO
     bool b_systrayAvailable = QSystemTrayIcon::isSystemTrayAvailable();
     bool b_systrayWanted = var_InheritBool( p_intf, "qt-system-tray" );
 
@@ -461,7 +458,6 @@ inline void MainInterface::initSystray()
 
     if( b_systrayAvailable && b_systrayWanted )
         createSystray();
-#endif
 }
 
 inline void MainInterface::createStatusBar()
@@ -990,7 +986,6 @@ void MainInterface::showBuffering( float f_cache )
 /*****************************************************************************
  * 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.
@@ -1157,7 +1152,6 @@ void MainInterface::updateSystrayTooltipStatus( int i_status )
     }
     QVLCMenu::updateSystrayMenu( this, p_intf );
 }
-#endif
 
 void MainInterface::changeEvent(QEvent *event)
 {
@@ -1323,13 +1317,11 @@ void MainInterface::emitBoss()
 void MainInterface::setBoss()
 {
     THEMIM->pause();
-#ifndef HAVE_MAEMO
     if( sysTray )
     {
         hide();
     }
     else
-#endif
     {
         showMinimized();
     }
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 1415bf3..fe1fe68 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -80,10 +80,8 @@ public:
     int  controlVideo( int i_query, va_list args );
 
     /* Getters */
-#ifndef HAVE_MAEMO
     QSystemTrayIcon *getSysTray() { return sysTray; }
     QMenu *getSysTrayMenu() { return systrayMenu; }
-#endif
     int getControlsVisibilityStatus();
     bool isPlDocked() { return ( b_plDocked != false ); }
     bool isInterfaceFullScreen() { return b_interfaceFullScreen; }
@@ -125,10 +123,8 @@ private:
 
     /* */
     QSettings           *settings;
-#ifndef HAVE_MAEMO
     QSystemTrayIcon     *sysTray;
     QMenu               *systrayMenu;
-#endif
 
     QString              input_name;
     QVBoxLayout         *mainLayout;
@@ -183,11 +179,9 @@ public slots:
     void dockPlaylist( bool b_docked = true );
     void toggleMinimalView( bool );
     void togglePlaylist();
-#ifndef HAVE_MAEMO
     void toggleUpdateSystrayMenu();
     void showUpdateSystrayMenu();
     void hideUpdateSystrayMenu();
-#endif
     void toggleAdvancedButtons();
     void toggleInterfaceFullScreen();
     void toggleFSC();
@@ -218,11 +212,9 @@ 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 205bcab..77e7988 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -1083,7 +1083,6 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
 #undef POPUP_BOILERPLATE
 #undef BAR_DADD
 
-#ifndef HAVE_MAEMO
 /************************************************************************
  * Systray Menu                                                         *
  ************************************************************************/
@@ -1129,7 +1128,6 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
     /* Set the menu */
     mi->getSysTray()->setContextMenu( sysMenu );
 }
-#endif
 
 
 #undef PUSH_VAR
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 96ce80d..430291d 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -197,8 +197,13 @@ vlc_module_begin ()
     add_bool( "qt-minimal-view", false, QT_MINIMAL_MODE_TEXT,
               QT_MINIMAL_MODE_TEXT, false );
 
-    add_bool( "qt-system-tray", true, SYSTRAY_TEXT,
-          SYSTRAY_LONGTEXT, false)
+    add_bool( "qt-system-tray",
+#ifdef HAVE_MAEMO
+            false,
+#else
+            true,
+#endif
+            SYSTRAY_TEXT, SYSTRAY_LONGTEXT, false)
     add_bool( "qt-notification", true, NOTIFICATION_TEXT,
               NOTIFICATION_LONGTEXT, false )
     add_bool( "qt-start-minimized", false, MINIMIZED_TEXT,



More information about the vlc-commits mailing list