Changeset cacd39b8661a299781bbeb4c888a36d4a47215ca
- Timestamp:
- 10/31/07 21:26:52
(10 months ago)
- Author:
- Jean-Baptiste Kempf <jb@videolan.org>
- git-committer:
- Jean-Baptiste Kempf <jb@videolan.org> 1193862412 +0000
- git-parent:
[ad9ca44d5979a242ef0781dbe793c3c7ae8d8caa]
- git-author:
- Jean-Baptiste Kempf <jb@videolan.org> 1193862412 +0000
- Message:
Preferences, audio, save the normalizer activation and clean.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r9774edc |
rcacd39b |
|
| 29 | 29 | * - Improvements over WX |
|---|
| 30 | 30 | * - Validator for modulelist |
|---|
| 31 | | * - Implement update stuff using a general Updated signal |
|---|
| 32 | 31 | */ |
|---|
| 33 | 32 | |
|---|
| … | … | |
| 686 | 685 | } |
|---|
| 687 | 686 | } |
|---|
| 688 | | emit Updated(); |
|---|
| 689 | 687 | } |
|---|
| 690 | 688 | |
|---|
| r9774edc |
rcacd39b |
|
| 86 | 86 | QWidget *widget; |
|---|
| 87 | 87 | bool _advanced; |
|---|
| | 88 | #if 0 |
|---|
| | 89 | /* You shouldn't use that now..*/ |
|---|
| 88 | 90 | signals: |
|---|
| 89 | 91 | void Updated(); |
|---|
| | 92 | #endif |
|---|
| 90 | 93 | }; |
|---|
| 91 | 94 | |
|---|
| ra9cce62 |
rcacd39b |
|
| 216 | 216 | |
|---|
| 217 | 217 | CONFIG_GENERIC( "headphone-dolby" , Bool , NULL, headphoneEffect ); |
|---|
| 218 | | // CONFIG_GENERIC( "" , Bool, NULL, ); activation of normalizer //FIXME |
|---|
| | 218 | |
|---|
| 219 | 219 | CONFIG_GENERIC_NO_BOOL( "norm-max-level" , Float , NULL, |
|---|
| 220 | | volNormalizer ); |
|---|
| | 220 | volNormSpin ); |
|---|
| 221 | 221 | CONFIG_GENERIC( "audio-visual" , Module , NULL, visualisation); |
|---|
| 222 | 222 | |
|---|
| … | … | |
| 271 | 271 | CONNECT( ui.lastfm, stateChanged( int ), this , |
|---|
| 272 | 272 | lastfm_Changed( int ) ); |
|---|
| | 273 | |
|---|
| | 274 | /* Normalizer */ |
|---|
| | 275 | normalizerBox = ui.volNormBox; |
|---|
| | 276 | CONNECT( ui.volNormBox, toggled( bool ), ui.volNormSpin, setEnabled( bool ) ); |
|---|
| | 277 | qs_filter = qfu( config_GetPsz( p_intf, "audio-filter" ) ); |
|---|
| | 278 | bool b_normalizer = ( qs_filter.contains( "volnorm" ) ); |
|---|
| | 279 | { |
|---|
| | 280 | ui.volNormBox->setChecked( b_normalizer ); |
|---|
| | 281 | ui.volNormSpin->setEnabled( b_normalizer ); |
|---|
| | 282 | } |
|---|
| 273 | 283 | |
|---|
| 274 | 284 | END_SPREFS_CAT; |
|---|
| … | … | |
| 298 | 308 | CONFIG_GENERIC_NO_BOOL( "server-port", Integer, NULL, UDPPort ); |
|---|
| 299 | 309 | CONFIG_GENERIC( "http-proxy", String , NULL, proxy ); |
|---|
| 300 | | |
|---|
| | 310 | |
|---|
| 301 | 311 | /* Caching */ |
|---|
| 302 | 312 | /* CONFIG_GENERIC( );*/ //FIXME |
|---|
| … | … | |
| 328 | 338 | |
|---|
| 329 | 339 | /* interface */ |
|---|
| 330 | | p_config = config_FindConfig( VLC_OBJECT(p_intf), "intf" ); |
|---|
| 331 | | if( p_config->value.psz && strcmp( p_config->value.psz, "qt4" )) |
|---|
| | 340 | char *psz_intf = config_GetPsz( p_intf, "intf" ); |
|---|
| | 341 | if( psz_intf ) |
|---|
| 332 | 342 | { |
|---|
| 333 | | ui.qt4->setChecked( true ); |
|---|
| 334 | | } |
|---|
| 335 | | if( p_config->value.psz && strcmp( p_config->value.psz, "skins2" )) |
|---|
| 336 | | { |
|---|
| 337 | | ui.skins->setChecked( true ); |
|---|
| | 343 | msg_Dbg( p_intf, "Interface in config file: %s", psz_intf ); |
|---|
| | 344 | if( strstr( psz_intf, "skin" ) ) |
|---|
| | 345 | ui.skins->setChecked( true ); |
|---|
| | 346 | else if( strstr( psz_intf, "qt" ) ) |
|---|
| | 347 | ui.qt4->setChecked( true ); |
|---|
| 338 | 348 | } |
|---|
| 339 | 349 | skinInterfaceButton = ui.skins; |
|---|
| … | … | |
| 436 | 446 | config_PutPsz( p_intf, "intf", "qt4" ); |
|---|
| 437 | 447 | } |
|---|
| | 448 | |
|---|
| | 449 | if( number == SPrefsAudio ) |
|---|
| | 450 | { |
|---|
| | 451 | bool b_normChecked = normalizerBox->isChecked(); |
|---|
| | 452 | if( qs_filter.isEmpty() ) |
|---|
| | 453 | { |
|---|
| | 454 | /* the psz_filter is already empty, so we just append it needed */ |
|---|
| | 455 | if( b_normChecked ) qs_filter = "volnorm"; |
|---|
| | 456 | } |
|---|
| | 457 | else /* Not Empty */ |
|---|
| | 458 | { |
|---|
| | 459 | if( qs_filter.contains( "volnorm" ) ) |
|---|
| | 460 | { |
|---|
| | 461 | /* The qs_filter not empty and contains "volnorm" that we have to remove */ |
|---|
| | 462 | if( !b_normChecked ) |
|---|
| | 463 | { |
|---|
| | 464 | /* Ugly :D */ |
|---|
| | 465 | qs_filter.remove( "volnorm:" ); |
|---|
| | 466 | qs_filter.remove( ":volnorm" ); |
|---|
| | 467 | qs_filter.remove( "volnorm" ); |
|---|
| | 468 | } |
|---|
| | 469 | } |
|---|
| | 470 | else /* qs_filter not empty, but doesn't have volnorm inside already */ |
|---|
| | 471 | if( b_normChecked ) qs_filter.append( ":volnorm" ); |
|---|
| | 472 | } |
|---|
| | 473 | config_PutPsz( p_intf, "audio-filter", qtu( qs_filter ) ); |
|---|
| | 474 | } |
|---|
| 438 | 475 | } |
|---|
| 439 | 476 | |
|---|
| r4d27e75 |
rcacd39b |
|
| 44 | 44 | class QLineEdit; |
|---|
| 45 | 45 | class QRadioButton; |
|---|
| | 46 | class QCheckBox; |
|---|
| | 47 | class QString; |
|---|
| 46 | 48 | |
|---|
| 47 | 49 | class SPrefsCatList : public QWidget |
|---|
| … | … | |
| 73 | 75 | int number; |
|---|
| 74 | 76 | |
|---|
| | 77 | /* this is ugly and bad until I found a new solution */ |
|---|
| 75 | 78 | QWidget *alsa_options; |
|---|
| 76 | 79 | QWidget *oss_options; |
|---|
| … | … | |
| 81 | 84 | QRadioButton *skinInterfaceButton; |
|---|
| 82 | 85 | QRadioButton *qtInterfaceButton; |
|---|
| | 86 | QString qs_filter; |
|---|
| | 87 | QCheckBox *normalizerBox; |
|---|
| 83 | 88 | |
|---|
| 84 | 89 | /* Display only the options for the selected audio output */ |
|---|
| r086d074 |
rcacd39b |
|
| 256 | 256 | </item> |
|---|
| 257 | 257 | <item row="1" column="0" > |
|---|
| 258 | | <widget class="QCheckBox" name="volumeNormalizer" > |
|---|
| | 258 | <widget class="QCheckBox" name="volNormBox" > |
|---|
| 259 | 259 | <property name="text" > |
|---|
| 260 | 260 | <string>_("Volume normalizer")</string> |
|---|
| … | … | |
| 270 | 270 | </item> |
|---|
| 271 | 271 | <item row="1" column="1" > |
|---|
| 272 | | <widget class="QDoubleSpinBox" name="volNormalizer" > |
|---|
| | 272 | <widget class="QDoubleSpinBox" name="volNormSpin" > |
|---|
| 273 | 273 | <property name="alignment" > |
|---|
| 274 | 274 | <set>Qt::AlignRight</set> |
|---|
| … | … | |
| 334 | 334 | <tabstop>fileBrowseButton</tabstop> |
|---|
| 335 | 335 | <tabstop>headphoneEffect</tabstop> |
|---|
| 336 | | <tabstop>volumeNormalizer</tabstop> |
|---|
| 337 | | <tabstop>volNormalizer</tabstop> |
|---|
| | 336 | <tabstop>volNormBox</tabstop> |
|---|
| | 337 | <tabstop>volNormSpin</tabstop> |
|---|
| 338 | 338 | <tabstop>visualisation</tabstop> |
|---|
| 339 | 339 | </tabstops> |
|---|