From 961e494b74575ea569e8f761e6a7896fb1b38f19 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Tue, 30 Mar 2010 16:28:10 +0200 Subject: [PATCH] Qt: don't resize the mainWindow when toolbar changes 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 | 4 ---- modules/gui/qt4/components/controller.hpp | 3 +-- modules/gui/qt4/main_interface.cpp | 22 ---------------------- modules/gui/qt4/main_interface.hpp | 1 - 4 files changed, 1 insertion(+), 29 deletions(-) diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp index f001e4d3e6..6c87d5e718 100644 --- a/modules/gui/qt4/components/controller.cpp +++ b/modules/gui/qt4/components/controller.cpp @@ -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; diff --git a/modules/gui/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp index c9e0979937..f987226a49 100644 --- a/modules/gui/qt4/components/controller.hpp +++ b/modules/gui/qt4/components/controller.hpp @@ -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(); diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 99e1409e1f..7ff26ef8e3 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -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 diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp index a637c4387c..016c53b45e 100644 --- a/modules/gui/qt4/main_interface.hpp +++ b/modules/gui/qt4/main_interface.hpp @@ -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 -- 2.39.2