Changeset 8679868f312aef7645ed56706b7886fe7e06d283
- Timestamp:
- 03/24/08 22:04:48
(5 months ago)
- Author:
- Felix Paul Kühne <fkuehne@videolan.org>
- git-committer:
- Felix Paul Kühne <fkuehne@videolan.org> 1206392688 +0100
- git-parent:
[daa7c08f86f23fc4cd301f2c48e8540dc3a8f117]
- git-author:
- Felix Paul Kühne <fkuehne@videolan.org> 1206358393 +0100
- Message:
implemented the Visualiser and Video Output module settings
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4d8b370 |
r8679868 |
|
| 11 | 11 | <key>IBOpenObjects</key> |
|---|
| 12 | 12 | <array> |
|---|
| | 13 | <integer>2668</integer> |
|---|
| 13 | 14 | <integer>2562</integer> |
|---|
| 14 | 15 | <integer>2410</integer> |
|---|
| 15 | 16 | <integer>2440</integer> |
|---|
| | 17 | <integer>2311</integer> |
|---|
| 16 | 18 | <integer>2523</integer> |
|---|
| | 19 | <integer>2330</integer> |
|---|
| 17 | 20 | <integer>2678</integer> |
|---|
| 18 | | <integer>2668</integer> |
|---|
| 19 | | <integer>2311</integer> |
|---|
| 20 | 21 | </array> |
|---|
| 21 | 22 | <key>IBSystem Version</key> |
|---|
| re5189c4 |
r8679868 |
|
| 295 | 295 | [o_video_fullscreen_ckb setTitle: _NS("Fullscreen")]; |
|---|
| 296 | 296 | [o_video_onTop_ckb setTitle: _NS("Always on top")]; |
|---|
| 297 | | [o_video_output_txt setStringValue: _NS("Display device")]; |
|---|
| | 297 | [o_video_output_txt setStringValue: _NS("Output module")]; |
|---|
| 298 | 298 | [o_video_skipFrames_ckb setTitle: _NS("Skip frames")]; |
|---|
| 299 | 299 | [o_video_snap_box setTitle: _NS("Video snapshots")]; |
|---|
| … | … | |
| 308 | 308 | { |
|---|
| 309 | 309 | module_config_t *p_item; |
|---|
| | 310 | vlc_list_t *p_list; |
|---|
| | 311 | module_t *p_parser; |
|---|
| 310 | 312 | int i, y = 0; |
|---|
| 311 | 313 | char *psz_tmp; |
|---|
| … | … | |
| 324 | 326 | [object selectItemAtIndex: p_item->value.i]; \ |
|---|
| 325 | 327 | else \ |
|---|
| 326 | | [object selectItemAtIndex: 0] |
|---|
| | 328 | [object selectItemAtIndex: 0]; \ |
|---|
| | 329 | [object setToolTip: _NS( p_item->psz_longtext )] |
|---|
| 327 | 330 | |
|---|
| 328 | 331 | #define SetupStringList( object, name ) \ |
|---|
| 329 | | [object removeAllItems]; \ |
|---|
| 330 | | y = 0; \ |
|---|
| 331 | | p_item = config_FindConfig( VLC_OBJECT(p_intf), name ); \ |
|---|
| 332 | | for( i = 0; p_item->ppsz_list[i] != nil; i++ ) \ |
|---|
| | 332 | [object removeAllItems]; \ |
|---|
| | 333 | y = 0; \ |
|---|
| | 334 | p_item = config_FindConfig( VLC_OBJECT(p_intf), name ); \ |
|---|
| | 335 | for( i = 0; p_item->ppsz_list[i] != nil; i++ ) \ |
|---|
| | 336 | { \ |
|---|
| | 337 | [object addItemWithTitle: _NS( p_item->ppsz_list_text[i] )]; \ |
|---|
| | 338 | if( p_item->value.psz && !strcmp( p_item->value.psz, p_item->ppsz_list[i] ) ) \ |
|---|
| | 339 | y = i; \ |
|---|
| | 340 | } \ |
|---|
| | 341 | [object selectItemAtIndex: y]; \ |
|---|
| | 342 | [object setToolTip: _NS( p_item->psz_longtext )] |
|---|
| | 343 | |
|---|
| | 344 | #define SetupModuleList( object, name ) \ |
|---|
| | 345 | p_item = config_FindConfig( VLC_OBJECT(p_intf), name ); \ |
|---|
| | 346 | p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE ); \ |
|---|
| | 347 | [object removeAllItems]; \ |
|---|
| | 348 | [object addItemWithTitle: _NS("Default")]; \ |
|---|
| | 349 | for( int i_index = 0; i_index < p_list->i_count; i_index++ ) \ |
|---|
| | 350 | { \ |
|---|
| | 351 | p_parser = (module_t *)p_list->p_values[i_index].p_object ; \ |
|---|
| | 352 | \ |
|---|
| | 353 | if( module_IsCapable( p_parser, p_item->psz_type ) ) \ |
|---|
| 333 | 354 | { \ |
|---|
| 334 | | [object addItemWithTitle: _NS( p_item->ppsz_list_text[i] )]; \ |
|---|
| 335 | | if( p_item->value.psz && !strcmp( p_item->value.psz, p_item->ppsz_list[i] ) ) \ |
|---|
| 336 | | y = i; \ |
|---|
| | 355 | [object addItemWithTitle: [NSString stringWithUTF8String: module_GetLongName( p_parser )]]; \ |
|---|
| | 356 | \ |
|---|
| | 357 | if( p_item->value.psz && !strcmp( p_item->value.psz, module_GetObjName( p_parser ) ) ) \ |
|---|
| | 358 | [object selectItem: [object lastItem]]; \ |
|---|
| 337 | 359 | } \ |
|---|
| 338 | | [object selectItemAtIndex: y] |
|---|
| | 360 | } \ |
|---|
| | 361 | vlc_list_release( p_list ); \ |
|---|
| | 362 | [object setToolTip: _NS(p_item->psz_longtext)] |
|---|
| 339 | 363 | |
|---|
| 340 | 364 | /********************** |
|---|
| … | … | |
| 367 | 391 | [o_audio_norm_ckb setState: (int)strstr( psz_tmp, "normvol" )]; |
|---|
| 368 | 392 | [o_audio_norm_fld setFloatValue: config_GetFloat( p_intf, "norm-max-level" )]; |
|---|
| 369 | | |
|---|
| 370 | | // visualizer |
|---|
| 371 | | msg_Warn( p_intf, "visualizer not implemented!" ); |
|---|
| 372 | | |
|---|
| | 393 | |
|---|
| | 394 | SetupModuleList( o_audio_visual_pop, "audio-visual" ); |
|---|
| | 395 | |
|---|
| 373 | 396 | /* Last.FM is optional */ |
|---|
| 374 | 397 | if( module_Exists( p_intf, "audioscrobbler" ) ) |
|---|
| … | … | |
| 392 | 415 | [o_video_black_ckb setState: config_GetInt( p_intf, "macosx-black" )]; |
|---|
| 393 | 416 | |
|---|
| 394 | | msg_Warn( p_intf, "vout module and display device selectors not implemented!" ); |
|---|
| | 417 | SetupModuleList( o_video_output_pop, "vout" ); |
|---|
| | 418 | |
|---|
| | 419 | msg_Warn( p_intf, "display device selector not implemented!" ); |
|---|
| | 420 | [o_video_device_pop removeAllItems]; |
|---|
| 395 | 421 | |
|---|
| 396 | 422 | if( config_GetPsz( p_intf, "snapshot-path" ) != NULL ) |
|---|
| … | … | |
| 579 | 605 | { |
|---|
| 580 | 606 | module_config_t *p_item; |
|---|
| | 607 | vlc_list_t *p_list; |
|---|
| | 608 | module_t *p_parser; |
|---|
| 581 | 609 | char *psz_tmp; |
|---|
| 582 | 610 | int i; |
|---|
| … | … | |
| 596 | 624 | config_PutPsz( p_intf, name, strdup( [[VLCMain sharedInstance] delocalizeString: [object stringValue]] ) ) |
|---|
| 597 | 625 | |
|---|
| | 626 | #define SaveModuleList( object, name ) \ |
|---|
| | 627 | p_item = config_FindConfig( VLC_OBJECT(p_intf), name ); \ |
|---|
| | 628 | \ |
|---|
| | 629 | p_list = vlc_list_find( VLCIntf, VLC_OBJECT_MODULE, FIND_ANYWHERE ); \ |
|---|
| | 630 | for( int i_module_index = 0; i_module_index < p_list->i_count; i_module_index++ ) \ |
|---|
| | 631 | { \ |
|---|
| | 632 | p_parser = (module_t *)p_list->p_values[i_module_index].p_object; \ |
|---|
| | 633 | \ |
|---|
| | 634 | if( p_item->i_type == CONFIG_ITEM_MODULE && module_IsCapable( p_parser, p_item->psz_type ) ) \ |
|---|
| | 635 | { \ |
|---|
| | 636 | if( [[[object selectedItem] title] isEqualToString: _NS( module_GetLongName( p_parser ) )] ) \ |
|---|
| | 637 | { \ |
|---|
| | 638 | config_PutPsz( p_intf, name, strdup( module_GetObjName( p_parser ))); \ |
|---|
| | 639 | break; \ |
|---|
| | 640 | } \ |
|---|
| | 641 | } \ |
|---|
| | 642 | } \ |
|---|
| | 643 | vlc_list_release( p_list ); \ |
|---|
| | 644 | if( [[[object selectedItem] title] isEqualToString: _NS( "Default" )] ) \ |
|---|
| | 645 | config_PutPsz( p_intf, name, "Default" ) |
|---|
| | 646 | |
|---|
| 598 | 647 | /********************** |
|---|
| 599 | 648 | * interface settings * |
|---|
| … | … | |
| 653 | 702 | config_PutFloat( p_intf, "norm-max-level", [o_audio_norm_fld floatValue] ); |
|---|
| 654 | 703 | |
|---|
| 655 | | msg_Warn( p_intf, "visualizer not implemented!" ); |
|---|
| | 704 | SaveModuleList( o_audio_visual_pop, "audio-visual" ); |
|---|
| 656 | 705 | |
|---|
| 657 | 706 | /* Last.FM is optional */ |
|---|
| … | … | |
| 691 | 740 | config_PutInt( p_intf, "macosx-black", [o_video_black_ckb state] ); |
|---|
| 692 | 741 | |
|---|
| 693 | | msg_Warn( p_intf, "vout module and display device selectors not implemented!" ); |
|---|
| | 742 | SaveModuleList( o_video_output_pop, "vout" ); |
|---|
| | 743 | msg_Warn( p_intf, "display device selector not implemented!" ); |
|---|
| 694 | 744 | |
|---|
| 695 | 745 | config_PutPsz( p_intf, "snapshot-path", [[o_video_snap_folder_fld stringValue] UTF8String] ); |
|---|