Commit 4dccfee4 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fixed behaviour of the volnorm settings for trunk too

parent d805d20d
......@@ -2,22 +2,34 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>69 71 356 240 0 0 1280 778 </string>
<key>IBEditorPositions</key>
<dict>
<key>2311</key>
<string>345 426 590 230 0 0 1280 778 </string>
<key>2330</key>
<string>345 222 590 502 0 0 1280 778 </string>
<key>2562</key>
<string>345 220 590 505 0 0 1280 778 </string>
<key>2668</key>
<string>345 256 590 457 0 0 1280 778 </string>
</dict>
<key>IBFramework Version</key>
<string>644</string>
<string>489.0</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../../vlc.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>2311</integer>
<integer>2330</integer>
<integer>1530</integer>
<integer>2668</integer>
<integer>2265</integer>
<integer>2677</integer>
<integer>2330</integer>
<integer>2311</integer>
<integer>2562</integer>
<integer>2537</integer>
<integer>2265</integer>
<integer>2668</integer>
</array>
<key>IBSystem Version</key>
<string>9E17</string>
......
......@@ -43,6 +43,7 @@
IBOutlet id o_audio_lastuser_txt;
IBOutlet id o_audio_norm_ckb;
IBOutlet id o_audio_norm_fld;
IBOutlet id o_audio_norm_stepper;
IBOutlet id o_audio_spdif_ckb;
IBOutlet id o_audio_view;
IBOutlet id o_audio_visual_pop;
......
......@@ -427,7 +427,11 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
psz_tmp = config_GetPsz( p_intf, "audio-filter" );
if( psz_tmp )
[o_audio_norm_ckb setState: (int)strstr( psz_tmp, "normvol" )];
{
[o_audio_norm_ckb setState: (int)strstr( psz_tmp, "volnorm" )];
[o_audio_norm_fld setEnabled: [o_audio_norm_ckb state]];
[o_audio_norm_stepper setEnabled: [o_audio_norm_ckb state]];
}
[o_audio_norm_fld setFloatValue: config_GetFloat( p_intf, "norm-max-level" )];
[self setupButton: o_audio_visual_pop forModuleList: "audio-visual"];
......@@ -749,21 +753,28 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
config_PutPsz( p_intf, "audio-language", [[o_audio_lang_fld stringValue] UTF8String] );
config_PutInt( p_intf, "headphone-dolby", [o_audio_headphone_ckb state] );
psz_tmp = config_GetPsz( p_intf, "audio-filter" );
if(! psz_tmp)
config_PutPsz( p_intf, "audio-filter", "volnorm" );
else if( (int)strstr( psz_tmp, "normvol" ) == NO )
if( [o_audio_norm_ckb state] == NSOnState )
{
/* work-around a GCC 4.0.1 bug */
psz_tmp = (char *)[[NSString stringWithFormat: @"%s:volnorm", psz_tmp] UTF8String];
config_PutPsz( p_intf, "audio-filter", psz_tmp );
psz_tmp = config_GetPsz( p_intf, "audio-filter" );
if(! psz_tmp)
config_PutPsz( p_intf, "audio-filter", "volnorm" );
else if( (int)strstr( psz_tmp, "normvol" ) == NO )
{
/* work-around a GCC 4.0.1 bug */
psz_tmp = (char *)[[NSString stringWithFormat: @"%s:volnorm", psz_tmp] UTF8String];
config_PutPsz( p_intf, "audio-filter", psz_tmp );
}
}
else
{
psz_tmp = (char *)[[[NSString stringWithUTF8String: psz_tmp] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@":volnorm"]] UTF8String];
psz_tmp = (char *)[[[NSString stringWithUTF8String: psz_tmp] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@"volnorm:"]] UTF8String];
psz_tmp = (char *)[[[NSString stringWithUTF8String: psz_tmp] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@"volnorm"]] UTF8String];
config_PutPsz( p_intf, "audio-filter", psz_tmp );
psz_tmp = config_GetPsz( p_intf, "audio-filter" );
if( psz_tmp )
{
psz_tmp = (char *)[[[NSString stringWithUTF8String: psz_tmp] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@":volnorm"]] UTF8String];
psz_tmp = (char *)[[[NSString stringWithUTF8String: psz_tmp] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@"volnorm:"]] UTF8String];
psz_tmp = (char *)[[[NSString stringWithUTF8String: psz_tmp] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@"volnorm"]] UTF8String];
config_PutPsz( p_intf, "audio-filter", psz_tmp );
}
}
config_PutFloat( p_intf, "norm-max-level", [o_audio_norm_fld floatValue] );
......@@ -1025,6 +1036,12 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
if( sender == o_audio_vol_fld )
[o_audio_vol_sld setIntValue: [o_audio_vol_fld intValue]];
if( sender == o_audio_norm_ckb )
{
[o_audio_norm_stepper setEnabled: [o_audio_norm_ckb state]];
[o_audio_norm_fld setEnabled: [o_audio_norm_ckb state]];
}
if( sender == o_audio_last_ckb )
{
if( [o_audio_last_ckb state] == NSOnState )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment