[vlc-commits] commit: Fix advanced panel height saving. Fixes #3858 (Francois Cartegnie )
git at videolan.org
git at videolan.org
Mon Jul 26 19:35:39 CEST 2010
vlc/vlc-1.1 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Jul 24 18:02:14 2010 +0200| [50278f4d9cbd41d04f166c09319f827859ee3f5a] | committer: Rémi Duraffort
Fix advanced panel height saving. Fixes #3858
(cherry picked from commit 374372612fbea4edbe44aefedcb04a85971b8464)
Signed-off-by: Rémi Duraffort <ivoire at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=50278f4d9cbd41d04f166c09319f827859ee3f5a
---
modules/gui/qt4/dialogs/open.cpp | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp
index bb45cfa..a0a23b6 100644
--- a/modules/gui/qt4/dialogs/open.cpp
+++ b/modules/gui/qt4/dialogs/open.cpp
@@ -168,7 +168,10 @@ OpenDialog::OpenDialog( QWidget *parent,
/* Hide the advancedPanel */
if( !var_InheritBool( p_intf, "qt-adv-options" ) )
+ {
ui.advancedFrame->hide();
+ ui.advancedFrame->setEnabled( false );
+ }
else
ui.advancedCheckBox->setChecked( true );
@@ -183,7 +186,9 @@ OpenDialog::OpenDialog( QWidget *parent,
OpenDialog::~OpenDialog()
{
- getSettings()->setValue( "opendialog-size", size() );
+ getSettings()->setValue( "opendialog-size", size() -
+ ( ui.advancedFrame->isEnabled() ?
+ QSize(0, ui.advancedFrame->height()) : QSize(0, 0) ) );
}
/* Used by VLM dialog and inputSlave selection */
@@ -246,6 +251,7 @@ void OpenDialog::toggleAdvancedPanel()
if( ui.advancedFrame->isVisible() )
{
ui.advancedFrame->hide();
+ ui.advancedFrame->setEnabled( false );
if( size().isValid() )
resize( size().width(), size().height()
- ui.advancedFrame->height() );
@@ -253,6 +259,7 @@ void OpenDialog::toggleAdvancedPanel()
else
{
ui.advancedFrame->show();
+ ui.advancedFrame->setEnabled( true );
if( size().isValid() )
resize( size().width(), size().height()
+ ui.advancedFrame->height() );
More information about the vlc-commits
mailing list