Changeset 9b5889a2e846d4a99ebb0b5b1b72f1ea39da8468
- Timestamp:
- 07/05/08 18:30:39
(2 months ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1215275439 +0200
- git-parent:
[ffe7bdd1604d611685865f2f67048fabd55f69c7]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1215275439 +0200
- Message:
macosx: Kind of fix the preferences on Mac OS X.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r8fb46d3 |
r9b5889a |
|
| 325 | 325 | withTitle: o_child_title |
|---|
| 326 | 326 | withHelp: o_child_help |
|---|
| 327 | | ID: p_items[i].value.i |
|---|
| | 327 | ID: ((vlc_object_t*)p_main_module)->i_object_id |
|---|
| 328 | 328 | parent:self |
|---|
| 329 | 329 | children:[[NSMutableArray alloc] |
|---|
| 330 | 330 | initWithCapacity:10] |
|---|
| 331 | | whithCategory: p_items[i].i_type]]; |
|---|
| | 331 | whithCategory: p_items[i].value.i]]; |
|---|
| 332 | 332 | break; |
|---|
| 333 | 333 | case CONFIG_SUBCATEGORY: |
|---|
| … | … | |
| 353 | 353 | withTitle: o_child_title |
|---|
| 354 | 354 | withHelp: o_child_help |
|---|
| 355 | | ID: p_items[i].value.i |
|---|
| | 355 | ID: ((vlc_object_t*)p_main_module)->i_object_id |
|---|
| 356 | 356 | parent:p_last_category |
|---|
| 357 | 357 | children:[[NSMutableArray alloc] |
|---|
| 358 | 358 | initWithCapacity:10] |
|---|
| 359 | | whithCategory: p_items[i].i_type]]; |
|---|
| | 359 | whithCategory: p_items[i].value.i]]; |
|---|
| 360 | 360 | } |
|---|
| 361 | 361 | |
|---|
| … | … | |
| 385 | 385 | /* Exclude empty plugins (submodules don't have config */ |
|---|
| 386 | 386 | /* options, they are stored in the parent module) */ |
|---|
| 387 | | // Does not work |
|---|
| 388 | | // if( modules_IsSubModule( p_module ) ) |
|---|
| 389 | | // continue; |
|---|
| 390 | 387 | p_items = module_GetConfig( p_module, &confsize ); |
|---|
| 391 | 388 | |
|---|
| … | … | |
| 416 | 413 | long cookie; |
|---|
| 417 | 414 | bool b_found = false; |
|---|
| 418 | | unsigned int i; |
|---|
| | 415 | |
|---|
| 419 | 416 | VLCTreeItem* p_category_item, * p_subcategory_item; |
|---|
| 420 | | for (i = 0 ; i < [o_children count] ; i++) |
|---|
| | 417 | for (j = 0 ; j < [o_children count] ; j++) |
|---|
| 421 | 418 | { |
|---|
| 422 | | p_category_item = [o_children objectAtIndex: i]; |
|---|
| 423 | | if( p_category_item->i_object_id == i_category ) |
|---|
| | 419 | p_category_item = [o_children objectAtIndex: j]; |
|---|
| | 420 | if( p_category_item->i_object_category == i_category ) |
|---|
| 424 | 421 | { |
|---|
| 425 | 422 | b_found = true; |
|---|
| … | … | |
| 432 | 429 | b_found = false; |
|---|
| 433 | 430 | cookie = -1; |
|---|
| 434 | | for (i = 0 ; i < [p_category_item->o_children count] ; i++) |
|---|
| | 431 | for (j = 0 ; j < [p_category_item->o_children count] ; j++) |
|---|
| 435 | 432 | { |
|---|
| 436 | 433 | p_subcategory_item = [p_category_item->o_children |
|---|
| 437 | | objectAtIndex: i]; |
|---|
| 438 | | if( p_subcategory_item->i_object_id == i_subcategory ) |
|---|
| | 434 | objectAtIndex: j]; |
|---|
| | 435 | if( p_subcategory_item->i_object_category == i_subcategory ) |
|---|
| 439 | 436 | { |
|---|
| 440 | 437 | b_found = true; |
|---|
| … | … | |
| 592 | 589 | p_items = module_GetConfig( p_main_module, &confsize ); |
|---|
| 593 | 590 | |
|---|
| | 591 | /* We need to first, find the right (sub)category, |
|---|
| | 592 | * and then abort when we find a new (sub)category. Part of the Ugliness. */ |
|---|
| | 593 | bool in_right_category = false; |
|---|
| | 594 | bool in_subcategory = false; |
|---|
| | 595 | bool done = false; |
|---|
| 594 | 596 | for( i = 0; i < confsize; i++ ) |
|---|
| 595 | 597 | { |
|---|
| … | … | |
| 602 | 604 | switch( p_items[i].i_type ) |
|---|
| 603 | 605 | { |
|---|
| | 606 | case CONFIG_CATEGORY: |
|---|
| | 607 | if(!in_right_category && p_items[i].value.i == i_object_category) |
|---|
| | 608 | in_right_category = true; |
|---|
| | 609 | else if(in_right_category) |
|---|
| | 610 | done = true; |
|---|
| | 611 | break; |
|---|
| 604 | 612 | case CONFIG_SUBCATEGORY: |
|---|
| 605 | | case CONFIG_CATEGORY: |
|---|
| | 613 | if(!in_right_category && p_items[i].value.i == i_object_category) |
|---|
| | 614 | { |
|---|
| | 615 | in_right_category = true; |
|---|
| | 616 | in_subcategory = true; |
|---|
| | 617 | } |
|---|
| | 618 | else if(in_right_category && in_subcategory) |
|---|
| | 619 | done = true; |
|---|
| | 620 | break; |
|---|
| 606 | 621 | case CONFIG_SECTION: |
|---|
| 607 | 622 | case CONFIG_HINT_USAGE: |
|---|
| … | … | |
| 609 | 624 | default: |
|---|
| 610 | 625 | { |
|---|
| | 626 | if(!in_right_category) break; |
|---|
| | 627 | |
|---|
| 611 | 628 | VLCConfigControl *o_control = nil; |
|---|
| 612 | 629 | o_control = [VLCConfigControl newControl:&p_items[i] |
|---|
| … | … | |
| 621 | 638 | } |
|---|
| 622 | 639 | } |
|---|
| | 640 | if( done ) break; |
|---|
| 623 | 641 | } |
|---|
| 624 | 642 | vlc_object_release( (vlc_object_t*)p_main_module ); |
|---|