Commit 2b6d548b authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Don't show the General node in OS X playlist. it complicates logic, but...

* Don't show the General node in OS X playlist. it complicates logic, but looks much nicer this way.
parent 981c7b91
...@@ -1069,7 +1069,14 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -1069,7 +1069,14 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
playlist_view_t *p_view; playlist_view_t *p_view;
p_view = playlist_ViewFind( p_playlist, i_current_view ); p_view = playlist_ViewFind( p_playlist, i_current_view );
if( p_view && p_view->p_root ) if( p_view && p_view->p_root )
{
i_return = p_view->p_root->i_children; i_return = p_view->p_root->i_children;
if( i_current_view == VIEW_CATEGORY )
{
i_return--; /* remove the GENERAL item from the list */
i_return += p_playlist->p_general->i_children; /* add the items of the general node */
}
}
} }
else else
{ {
...@@ -1101,8 +1108,20 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -1101,8 +1108,20 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
/* root object */ /* root object */
playlist_view_t *p_view; playlist_view_t *p_view;
p_view = playlist_ViewFind( p_playlist, i_current_view ); p_view = playlist_ViewFind( p_playlist, i_current_view );
if( p_view && index < p_view->p_root->i_children && index >= 0 ) if( p_view && p_view->p_root ) p_return = p_view->p_root->pp_children[index];
p_return = p_view->p_root->pp_children[index];
if( i_current_view == VIEW_CATEGORY )
{
if( p_playlist->p_general->i_children && index >= 0 && index < p_playlist->p_general->i_children )
{
p_return = p_playlist->p_general->pp_children[index];
}
else if( p_view && p_view->p_root && index >= 0 && index - p_playlist->p_general->i_children < p_view->p_root->i_children )
{
p_return = p_view->p_root->pp_children[index - p_playlist->p_general->i_children + 1];
}
}
} }
else else
{ {
...@@ -1152,8 +1171,13 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/ ...@@ -1152,8 +1171,13 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
/* root object */ /* root object */
playlist_view_t *p_view; playlist_view_t *p_view;
p_view = playlist_ViewFind( p_playlist, i_current_view ); p_view = playlist_ViewFind( p_playlist, i_current_view );
if( p_view && p_view->p_root ) if( p_view && p_view->p_root ) i_return = p_view->p_root->i_children;
i_return = p_view->p_root->i_children;
if( i_current_view == VIEW_CATEGORY )
{
i_return--;
i_return += p_playlist->p_general->i_children;
}
} }
else else
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment