Changeset 8679868f312aef7645ed56706b7886fe7e06d283

Show
Ignore:
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
  • extras/package/macosx/Resources/English.lproj/Preferences.nib/info.nib

    r4d8b370 r8679868  
    1111    <key>IBOpenObjects</key> 
    1212    <array> 
     13        <integer>2668</integer> 
    1314        <integer>2562</integer> 
    1415        <integer>2410</integer> 
    1516        <integer>2440</integer> 
     17        <integer>2311</integer> 
    1618        <integer>2523</integer> 
     19        <integer>2330</integer> 
    1720        <integer>2678</integer> 
    18         <integer>2668</integer> 
    19         <integer>2311</integer> 
    2021    </array> 
    2122    <key>IBSystem Version</key> 
  • modules/gui/macosx/simple_prefs.m

    re5189c4 r8679868  
    295295    [o_video_fullscreen_ckb setTitle: _NS("Fullscreen")]; 
    296296    [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")]; 
    298298    [o_video_skipFrames_ckb setTitle: _NS("Skip frames")]; 
    299299    [o_video_snap_box setTitle: _NS("Video snapshots")]; 
     
    308308{ 
    309309    module_config_t *p_item; 
     310    vlc_list_t *p_list; 
     311    module_t *p_parser; 
    310312    int i, y = 0; 
    311313    char *psz_tmp; 
     
    324326        [object selectItemAtIndex: p_item->value.i]; \ 
    325327    else \ 
    326         [object selectItemAtIndex: 0] 
     328        [object selectItemAtIndex: 0]; \ 
     329    [object setToolTip: _NS( p_item->psz_longtext )] 
    327330 
    328331    #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 ) ) \ 
    333354        { \ 
    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]]; \ 
    337359        } \ 
    338         [object selectItemAtIndex: y] 
     360    } \ 
     361    vlc_list_release( p_list ); \ 
     362    [object setToolTip: _NS(p_item->psz_longtext)] 
    339363 
    340364    /********************** 
     
    367391        [o_audio_norm_ckb setState: (int)strstr( psz_tmp, "normvol" )]; 
    368392    [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 
    373396    /* Last.FM is optional */ 
    374397    if( module_Exists( p_intf, "audioscrobbler" ) ) 
     
    392415    [o_video_black_ckb setState: config_GetInt( p_intf, "macosx-black" )]; 
    393416 
    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]; 
    395421 
    396422    if( config_GetPsz( p_intf, "snapshot-path" ) != NULL ) 
     
    579605{ 
    580606    module_config_t *p_item; 
     607    vlc_list_t *p_list; 
     608    module_t *p_parser; 
    581609    char *psz_tmp; 
    582610    int i; 
     
    596624        config_PutPsz( p_intf, name, strdup( [[VLCMain sharedInstance] delocalizeString: [object stringValue]] ) ) 
    597625 
     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 
    598647    /********************** 
    599648     * interface settings * 
     
    653702        config_PutFloat( p_intf, "norm-max-level", [o_audio_norm_fld floatValue] ); 
    654703 
    655         msg_Warn( p_intf, "visualizer not implemented!" ); 
     704        SaveModuleList( o_audio_visual_pop, "audio-visual" ); 
    656705 
    657706        /* Last.FM is optional */ 
     
    691740        config_PutInt( p_intf, "macosx-black", [o_video_black_ckb state] ); 
    692741 
    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!" ); 
    694744 
    695745        config_PutPsz( p_intf, "snapshot-path", [[o_video_snap_folder_fld stringValue] UTF8String] );