]> git.sesse.net Git - vlc/commitdiff
Qt: don't resize the mainWindow when toolbar changes
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 30 Mar 2010 14:28:10 +0000 (16:28 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 30 Mar 2010 14:32:32 +0000 (16:32 +0200)
This introduced way too many bugs.
Close #3297 and "activate-subs hide the video" bug and a few more.
This is way suboptimal, but no fix works in a reliable fashion so far.

modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.hpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp

index f001e4d3e6ebe6e7000fb6d1c1d5ea428dceaa6c..6c87d5e7185e86901bb067554ab542e4e876c1eb 100644 (file)
@@ -465,8 +465,6 @@ QFrame *AbstractController::discFrame()
             sectionNext() );
     CONNECT( menuButton, clicked(), THEMIM->getIM(),
             sectionMenu() );
-    connect( THEMIM->getIM(), SIGNAL( titleChanged( bool ) ),
-             this, SIGNAL( sizeChanged() ) );
 
     return discFrame;
 }
@@ -481,8 +479,6 @@ QFrame *AbstractController::telexFrame()
     telexLayout->setSpacing( 0 ); telexLayout->setMargin( 0 );
     CONNECT( THEMIM->getIM(), teletextPossible( bool ),
              telexFrame, setVisible( bool ) );
-    connect( THEMIM->getIM(), SIGNAL( teletextPossible( bool ) ),
-             this, SIGNAL( sizeChanged() ) );
 
     /* On/Off button */
     QToolButton *telexOn = new QToolButton;
index c9e097993797caa3f52fd28e666cbd3e36f89010..f987226a497c9f917f5c16c1f853fc2a28acc074 100644 (file)
@@ -171,7 +171,6 @@ signals:
     void inputPlaying( bool ); /// This might be usefull in the IM ?
     void inputIsRecordable( bool ); /// same ?
     void inputIsTrickPlayable( bool ); /// same ?
-    void sizeChanged();
 };
 
 /* Advanced Button Bar */
@@ -203,7 +202,7 @@ public:
 protected:
     friend class MainInterface;
 
-    bool                 b_advancedVisible;
+    bool b_advancedVisible;
 
 protected slots:
     void toggleAdvanced();
index 99e1409e1f7ed549550385b87c0f0de4b8e0ebb7..7ff26ef8e3138dcb4c9428aa3da3f5fa332f522d 100644 (file)
@@ -339,11 +339,6 @@ void MainInterface::recreateToolbars()
     delete inputC;
 
     controls = new ControlsWidget( p_intf, false, this ); /* FIXME */
-    CONNECT( controls, advancedControlsToggled( bool ),
-             this, adaptGeometry() );
-    CONNECT( controls, sizeChanged(),
-             this, adaptGeometry() );
-
     inputC = new InputControlsWidget( p_intf, this );
 
     mainLayout->insertWidget( 2, inputC );
@@ -379,10 +374,6 @@ void MainInterface::createMainWidget( QSettings *settings )
     /* Create the CONTROLS Widget */
     controls = new ControlsWidget( p_intf,
                    settings->value( "adv-controls", false ).toBool(), this );
-    CONNECT( controls, advancedControlsToggled( bool ),
-             this, adaptGeometry() );
-    CONNECT( controls, sizeChanged(),
-             this, adaptGeometry() );
     inputC = new InputControlsWidget( p_intf, this );
 
     mainLayout->insertWidget( 2, inputC );
@@ -480,19 +471,6 @@ inline void MainInterface::createStatusBar()
  * Handling of sizing of the components
  **********************************************************************/
 
-/* This function is called:
-   - Advanced buttons toggled
-   - Toolbar geom changed
- */
-void MainInterface::adaptGeometry()
-{
-  resize( sizeHint() );
-
-#ifdef DEBUG_INTF
-    debug();
-#endif
-}
-
 void MainInterface::debug()
 {
 #ifdef DEBUG_INTF
index a637c4387c99089ed929d045f041c7ff134af983..016c53b45ef48970d2212133b1da980342ef2d5b 100644 (file)
@@ -193,7 +193,6 @@ private slots:
     void debug();
     void destroyPopupMenu();
     void recreateToolbars();
-    void adaptGeometry();
     void setName( const QString& );
     void setVLCWindowsTitle( const QString& title = "" );
 #if 0