[vlc-commits] Qt: fix equalizer initialization

Jean-Baptiste Kempf git at videolan.org
Thu Dec 13 00:12:34 CET 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Dec 12 22:43:21 2012 +0100| [859847f1be7c67b0a87232482c3ec1e23fe709a5] | committer: Jean-Baptiste Kempf

Qt: fix equalizer initialization

Close #5956

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

 modules/gui/qt4/components/extended_panels.cpp |   20 ++++++++------------
 modules/gui/qt4/ui/equalizer.ui                |    6 +++---
 2 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 6407f76..9bb5a88 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -992,24 +992,20 @@ void Equalizer::updateUIFromCore()
     if( p_aout )
     {
         psz_af = var_GetNonEmptyString( p_aout, "audio-filter" );
-        psz_pres = var_GetString( p_aout, "equalizer-preset" );
-        if( var_GetBool( p_aout, "equalizer-2pass" ) )
-            ui.eq2PassCheck->setChecked( true );
-        f_preamp = var_GetFloat( p_aout, "equalizer-preamp" );
-        psz_bands = var_GetNonEmptyString( p_aout, "equalizer-bands" );
-        i_preset = presetsComboBox->findData( QVariant( psz_pres ) );
         vlc_object_release( p_aout );
     }
     else
     {
         psz_af = config_GetPsz( p_intf, "audio-filter" );
-        psz_pres = config_GetPsz( p_intf, "equalizer-preset" );
-        if( config_GetInt( p_intf, "equalizer-2pass" ) )
-            ui.eq2PassCheck->setChecked( true );
-        f_preamp = config_GetFloat( p_intf, "equalizer-preamp" );
-        psz_bands = config_GetPsz( p_intf, "equalizer-bands" );
-        i_preset = presetsComboBox->findData( QVariant( psz_pres ) );
     }
+
+    psz_pres = var_InheritString( p_aout, "equalizer-preset" );
+    if( var_InheritBool( p_aout, "equalizer-2pass" ) )
+        ui.eq2PassCheck->setChecked( true );
+    f_preamp = var_InheritFloat( p_aout, "equalizer-preamp" );
+    psz_bands = var_InheritString( p_aout, "equalizer-bands" );
+    i_preset = presetsComboBox->findData( QVariant( psz_pres ) );
+
     if( psz_af && strstr( psz_af, "equalizer" ) != NULL )
         ui.enableCheck->setChecked( true );
     enable( ui.enableCheck->isChecked() );
diff --git a/modules/gui/qt4/ui/equalizer.ui b/modules/gui/qt4/ui/equalizer.ui
index 98914d7..c75da80 100644
--- a/modules/gui/qt4/ui/equalizer.ui
+++ b/modules/gui/qt4/ui/equalizer.ui
@@ -79,12 +79,12 @@
      <property name="maximum">
       <number>400</number>
      </property>
+     <property name="value">
+      <number>320</number>
+     </property>
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
-     <property name="invertedAppearance">
-      <bool>false</bool>
-     </property>
     </widget>
    </item>
    <item row="1" column="2" rowspan="2">



More information about the vlc-commits mailing list