- if( qs_filter.isEmpty() )
- {
- /* the psz_filter is already empty, so we just append it needed */
- if( b_normChecked ) qs_filter = "volnorm";
- }
- else /* Not Empty */
- {
- if( qs_filter.contains( "volnorm" ) )
- {
- /* The qs_filter not empty and contains "volnorm"
- that we have to remove */
- if( !b_normChecked )
- {
- /* Ugly :D */
- qs_filter.remove( "volnorm:" );
- qs_filter.remove( ":volnorm" );
- qs_filter.remove( "volnorm" );
- }
- }
- else /* qs_filter not empty, but doesn't have volnorm inside */
- if( b_normChecked ) qs_filter.append( ":volnorm" );
- }
- config_PutPsz( p_intf, "audio-filter", qtu( qs_filter ) );
+ if( b_checked && !qs_filter.contains( "volnorm" ) )
+ qs_filter.append( "volnorm" );
+ if( !b_checked && qs_filter.contains( "volnorm" ) )
+ qs_filter.removeAll( "volnorm" );
+
+ b_checked =
+ qobject_cast<QCheckBox *>(optionWidgets[headphoneB])->isChecked();
+
+ if( b_checked && !qs_filter.contains( "headphone" ) )
+ qs_filter.append( "headphone" );
+ if( !b_checked && qs_filter.contains( "headphone" ) )
+ qs_filter.removeAll( "headphone" );
+
+ config_PutPsz( p_intf, "audio-filter", qtu( qs_filter.join( ":" ) ) );