]> git.sesse.net Git - vlc/commitdiff
Qt: remove the MAEMO hack, unneeded in Fremantle, now
authorKonstantin Pavlov <thresh@videolan.org>
Fri, 14 Oct 2011 12:24:57 +0000 (14:24 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 14 Oct 2011 12:31:11 +0000 (14:31 +0200)
But deactivate the systray on those systems
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/menus.cpp
modules/gui/qt4/qt4.cpp

index 7937a8d3a5fc1981d3fdcf1591e37820aea57148..ae570bca7f72c2a554b61bfa8d8d7fd71004dbc1 100644 (file)
@@ -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();
     }
index 1415bf3421cacf864c2bbb0dcf29a1cd0c1f6966..fe1fe682931871b854137d5de5a6ff92bc34dd81 100644 (file)
@@ -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 * );
index 205bcab11adaf7a5c20078663c1a99b1aef8ecb5..77e7988f000a7c621ea86fa3b109cf13ad81a7e8 100644 (file)
@@ -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
index 96ce80dfa570bbb802f24a738c1d4c6c8f2d3a4e..430291d03890a0f10372d489a6da4664c8bca219 100644 (file)
@@ -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,