[vlc-devel] commit: playlist: b_tree is private. (Pierre d'Herbemont )

git version control git at videolan.org
Sun Sep 28 17:14:50 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Sep 28 16:36:01 2008 +0200| [1df015beff013d3fae00a4fae905ef28c4df10ce] | committer: Pierre d'Herbemont 

playlist: b_tree is private.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1df015beff013d3fae00a4fae905ef28c4df10ce
---

 include/vlc_playlist.h           |    2 --
 src/playlist/engine.c            |    2 +-
 src/playlist/playlist_internal.h |    2 ++
 src/playlist/tree.c              |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index c170b22..e83f4c3 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -177,8 +177,6 @@ struct playlist_t
     playlist_item_t *     p_local_onelevel; /** < "Playlist" in ONELEVEL view */
     playlist_item_t *     p_ml_onelevel; /** < "Library" in ONELEVEL view */
 
-    bool                  b_tree; /**< Display as a tree */
-
     bool            b_doing_ml; /**< Doing media library stuff,
                                        * get quicker */
     bool            b_auto_preparse;
diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 4eae3fa..0dcbd93 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -94,7 +94,7 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
     p_playlist->b_reset_currently_playing = true;
     p_playlist->last_rebuild_date = 0;
 
-    p_playlist->b_tree = var_CreateGetBool( p_playlist, "playlist-tree" );
+    pl_priv(p_playlist)->b_tree = var_CreateGetBool( p_playlist, "playlist-tree" );
 
     p_playlist->b_doing_ml = false;
 
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 1bcd850..69ad4ce 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -101,6 +101,8 @@ typedef struct playlist_private_t
         vlc_mutex_t         lock;     /**< Lock to protect request */
     } request;
 
+    bool                  b_tree; /**< Display as a tree */
+
 } playlist_private_t;
 
 #define pl_priv( pl ) ((playlist_private_t *)(pl))
diff --git a/src/playlist/tree.c b/src/playlist/tree.c
index 4f7f7f2..b5e4e11 100644
--- a/src/playlist/tree.c
+++ b/src/playlist/tree.c
@@ -336,7 +336,7 @@ playlist_item_t * playlist_GetPreferredNode( playlist_t *p_playlist,
     int i;
     if( p_node->p_parent == p_playlist->p_root_category )
     {
-        if( p_playlist->b_tree || p_node->p_input->b_prefers_tree )
+        if( pl_priv(p_playlist)->b_tree || p_node->p_input->b_prefers_tree )
             return p_node;
         for( i = 0 ; i< p_playlist->p_root_onelevel->i_children; i++ )
         {
@@ -347,7 +347,7 @@ playlist_item_t * playlist_GetPreferredNode( playlist_t *p_playlist,
     }
     else if( p_node->p_parent == p_playlist->p_root_onelevel )
     {
-        if( !p_playlist->b_tree || !p_node->p_input->b_prefers_tree )
+        if( !pl_priv(p_playlist)->b_tree || !p_node->p_input->b_prefers_tree )
             return p_node;
         for( i = 0 ; i< p_playlist->p_root_category->i_children; i++ )
         {




More information about the vlc-devel mailing list