[vlc-commits] Qt: save the activation state of audio filters

Ludovic Fauvet git at videolan.org
Wed Jul 10 16:51:50 CEST 2013


vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Wed Jul 10 16:01:55 2013 +0200| [d9c9be81204991562b563d0a7b57e9616fedebd8] | committer: Ludovic Fauvet

Qt: save the activation state of audio filters

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

 modules/gui/qt4/components/extended_panels.cpp |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 57c35e4..103ac7b 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -58,6 +58,7 @@
 #include <vlc_charset.h> /* us_strtod */
 
 static char *ChangeFiltersString( struct intf_thread_t *p_intf, const char *psz_filter_type, const char *psz_name, bool b_add );
+static void ChangeAFiltersString( struct intf_thread_t *p_intf, const char *psz_name, bool b_add );
 static void ChangeVFiltersString( struct intf_thread_t *p_intf, const char *psz_name, bool b_add );
 
 #if 0
@@ -353,6 +354,26 @@ static char *ChangeFiltersString( struct intf_thread_t *p_intf, const char *psz_
     return psz_string;
 }
 
+static void ChangeAFiltersString( struct intf_thread_t *p_intf, const char *psz_name, bool b_add )
+{
+    char *psz_string;
+
+    module_t *p_obj = module_find( psz_name );
+    if( !p_obj )
+    {
+        msg_Err( p_intf, "Unable to find filter module \"%s\".", psz_name );
+        return;
+    }
+
+    psz_string = ChangeFiltersString( p_intf, "audio-filter", psz_name, b_add );
+    if( !psz_string )
+        return;
+
+    config_PutPsz( p_intf, "audio-filter", psz_string );
+
+    free( psz_string );
+}
+
 static void ChangeVFiltersString( struct intf_thread_t *p_intf, const char *psz_name, bool b_add )
 {
     char *psz_string;
@@ -1086,6 +1107,7 @@ AudioFilterControlWidget::~AudioFilterControlWidget()
 
 void AudioFilterControlWidget::enable( bool b_enable ) const
 {
+    ChangeAFiltersString( p_intf, qtu(name), b_enable );
     playlist_EnableAudioFilter( THEPL, qtu(name), b_enable );
 }
 



More information about the vlc-commits mailing list