Changeset 722ab9f14ee31f8f0633cfc7a0b79401c47316fe

Show
Ignore:
Timestamp:
22/04/08 19:51:49 (6 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1208886709 +0200
git-parent:

[1f26dd3fc7a3a285a00e5e84db113ae4b496da5b]

git-author:
Rafaël Carré <funman@videolan.org> 1208886693 +0200
Message:

playlist-tree has only 2 meaningful values now

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_playlist.h

    r04cfbc3 r722ab9f  
    190190    playlist_item_t *     p_ml_onelevel; /** < "Library" in ONELEVEL view */ 
    191191 
    192     bool            b_always_tree;/**< Always display as tree */ 
    193     bool            b_never_tree;/**< Never display as tree */ 
     192    bool                  b_tree; /**< Display as a tree */ 
    194193 
    195194    bool            b_doing_ml; /**< Doing media library stuff, 
  • src/libvlc-module.c

    rf94a2f9 r722ab9f  
    11221122    "start VLC." ) 
    11231123 
    1124 #define PLTREE_TEXT N_("Use playlist tree") 
     1124#define PLTREE_TEXT N_("Display playlist tree") 
    11251125#define PLTREE_LONGTEXT N_( \ 
    11261126    "The playlist can use a tree to categorize some items, like the " \ 
    1127     "contents of a directory. \"Default\" means that the tree will only " \ 
    1128     "be used when really needed." ) 
    1129 static int pi_pltree_values[] = { 0, 1, 2 }; 
    1130 static const char *ppsz_pltree_descriptions[] = { N_("Default"), N_("Always"), N_("Never") }; 
    1131  
     1127    "contents of a directory." ) 
    11321128 
    11331129 
     
    18691865    add_bool( "play-and-stop", 0, NULL, PAS_TEXT, PAS_LONGTEXT, false ); 
    18701866    add_bool( "media-library", 1, NULL, ML_TEXT, ML_LONGTEXT, false ); 
    1871     add_integer( "playlist-tree", 0, NULL, PLTREE_TEXT, PLTREE_LONGTEXT, 
    1872                  true ); 
    1873         change_integer_list( pi_pltree_values, ppsz_pltree_descriptions, 0 ); 
     1867    add_bool( "playlist-tree", 0, NULL, PLTREE_TEXT, PLTREE_LONGTEXT, false ); 
    18741868 
    18751869    add_string( "open", "", NULL, OPEN_TEXT, OPEN_LONGTEXT, false ); 
  • src/playlist/engine.c

    r449fd28 r722ab9f  
    6363    playlist_t *p_playlist; 
    6464    bool b_save; 
    65     int i_tree; 
    6665 
    6766    /* Allocate structure */ 
     
    9695    p_playlist->last_rebuild_date = 0; 
    9796 
    98     i_tree = var_CreateGetBool( p_playlist, "playlist-tree" ); 
    99     p_playlist->b_always_tree = (i_tree == 1); 
    100     p_playlist->b_never_tree = (i_tree == 2); 
     97    p_playlist->b_tree = var_CreateGetBool( p_playlist, "playlist-tree" ); 
    10198 
    10299    p_playlist->b_doing_ml = false; 
  • src/playlist/tree.c

    r1f26dd3 r722ab9f  
    320320 * Get the node in the preferred tree from a node in one of category 
    321321 * or onelevel tree. 
    322  * For example, for the SAP node, it will return the node in the category 
    323  * tree if --playlist-tree is not set to never, because the SAP node prefers 
    324  * category 
    325322 */ 
    326323playlist_item_t * playlist_GetPreferredNode( playlist_t *p_playlist, 
     
    330327    if( p_node->p_parent == p_playlist->p_root_category ) 
    331328    { 
    332         if( p_playlist->b_always_tree ) 
     329        if( p_playlist->b_tree ) 
    333330            return p_node; 
    334331        for( i = 0 ; i< p_playlist->p_root_onelevel->i_children; i++ ) 
     
    341338    else if( p_node->p_parent == p_playlist->p_root_onelevel ) 
    342339    { 
    343         if( p_playlist->b_never_tree ) 
     340        if( !p_playlist->b_tree ) 
    344341            return p_node; 
    345342        for( i = 0 ; i< p_playlist->p_root_category->i_children; i++ )