vlc | branch: master | Thomas Guillem <[email protected]> | Thu Aug 31 13:22:15 2017 +0200| [2adbdef3dff50986bd1dca2986212b9d2eb45e00] | committer: Thomas Guillem
qt: enable audio filters with their name/shortcut The name of the main module is needed for module_find(). > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2adbdef3dff50986bd1dca2986212b9d2eb45e00 --- modules/gui/qt/components/extended_panels.cpp | 15 +++++++++------ modules/gui/qt/components/extended_panels.hpp | 4 +++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/modules/gui/qt/components/extended_panels.cpp b/modules/gui/qt/components/extended_panels.cpp index 9938a39421..2486a28ba2 100644 --- a/modules/gui/qt/components/extended_panels.cpp +++ b/modules/gui/qt/components/extended_panels.cpp @@ -899,9 +899,12 @@ void FilterSliderData::writeToConfig() } AudioFilterControlWidget::AudioFilterControlWidget -( intf_thread_t *_p_intf, QWidget *parent, const char *_name ) : - QWidget( parent ), p_intf( _p_intf ), name( _name ), i_smallfont(0) -{} +( intf_thread_t *_p_intf, QWidget *parent, const char *_shortcut, + const char *_name = NULL ) : + QWidget( parent ), p_intf( _p_intf ), shortcut( _shortcut ), + name( _name ? _name : _shortcut ), i_smallfont(0) +{ +} void AudioFilterControlWidget::connectConfigChanged( FilterSliderData *slider ) { @@ -944,7 +947,7 @@ void AudioFilterControlWidget::build() char *psz_af = var_InheritString( THEPL, "audio-filter" ); - if( psz_af && filterIsPresent( qfu(psz_af), name ) ) + if( psz_af && filterIsPresent( qfu(psz_af), shortcut ) ) slidersBox->setChecked( true ); else slidersBox->setChecked( false ); @@ -962,10 +965,10 @@ void AudioFilterControlWidget::enable( bool b_enable ) return; } - QString result = ChangeFiltersString( p_intf, "audio-filter", qtu(name), + QString result = ChangeFiltersString( p_intf, "audio-filter", qtu(shortcut), b_enable ); emit configChanged( qfu("audio-filter"), result ); - playlist_EnableAudioFilter( THEPL, qtu(name), b_enable ); + playlist_EnableAudioFilter( THEPL, qtu(shortcut), b_enable ); } /********************************************************************** diff --git a/modules/gui/qt/components/extended_panels.hpp b/modules/gui/qt/components/extended_panels.hpp index e44dc29dd6..31ec67ec13 100644 --- a/modules/gui/qt/components/extended_panels.hpp +++ b/modules/gui/qt/components/extended_panels.hpp @@ -132,7 +132,8 @@ class AudioFilterControlWidget : public QWidget Q_OBJECT public: - AudioFilterControlWidget( intf_thread_t *, QWidget *, const char *name ); + AudioFilterControlWidget( intf_thread_t *, QWidget *, const char *shortcut, + const char *name /* = NULL */ ); protected: virtual void build(); @@ -141,6 +142,7 @@ protected: QVector<FilterSliderData *> sliderDatas; QGroupBox *slidersBox; intf_thread_t *p_intf; + QString shortcut; // filter's module shorcut name QString name; // filter's module name int i_smallfont; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
