[vlc-commits] commit: Qt: correctly recreate the toolbar, taking care about the adv status (Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Wed Apr 7 15:34:17 CEST 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Apr  7 15:34:02 2010 +0200| [193eaee9d432437d710900844bd952fea3160b63] | committer: Jean-Baptiste Kempf 

Qt: correctly recreate the toolbar, taking care about the adv status

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

 modules/gui/qt4/main_interface.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 4d66b40..53941da 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -339,11 +339,13 @@ MainInterface::~MainInterface()
  *****************************/
 void MainInterface::recreateToolbars()
 {
+    bool b_adv = getControlsVisibilityStatus() & CONTROLS_ADVANCED;
+
     settings->beginGroup( "MainWindow" );
     delete controls;
     delete inputC;
 
-    controls = new ControlsWidget( p_intf, false, this );
+    controls = new ControlsWidget( p_intf, b_adv, this );
     inputC = new InputControlsWidget( p_intf, this );
 
     if( fullscreenControls )
@@ -768,6 +770,7 @@ void MainInterface::toggleAdvancedButtons()
 /* Get the visibility status of the controls (hidden or not, advanced or not) */
 int MainInterface::getControlsVisibilityStatus()
 {
+    if( !controls ) return 0;
     return( (controls->isVisible() ? CONTROLS_VISIBLE : CONTROLS_HIDDEN )
                 + CONTROLS_ADVANCED * controls->b_advancedVisible );
 }



More information about the vlc-commits mailing list