CheckDefault( "selcolor", "#0000FF" );
CheckDefault( "help", "" );
- m_curListId = uniqueId( attr["id"] );
- const BuilderData::Tree treeData( m_curListId, atoi( attr["x"] ) +
+ m_curTreeId = uniqueId( attr["id"] );
+ const BuilderData::Tree treeData( m_curTreeId, atoi( attr["x"] ) +
m_xOffset, atoi( attr["y"] ) + m_yOffset, attr["visible"],
atoi( attr["width"]), atoi( attr["height"] ),
attr["lefttop"], attr["rightbottom"],
{
// Slider associated to a list
newValue = "playlist.slider";
- // FIXME : this breaks slider usage in old style Playlists
+ }
+ else if( m_curTreeId != "" )
+ {
+ // Slider associated to a tree
newValue = "playtree.slider";
}
const BuilderData::Slider slider( uniqueId( attr["id"] ),
m_xOffsetList.pop_back();
m_yOffsetList.pop_back();
}
-
- else if( rName == "Playlist" || rName == "Playtree" )
+ else if( rName == "Playlist" )
{
m_curListId = "";
}
+ else if( rName == "Playtree" )
+ {
+ m_curTreeId = "";
+ }
}
#include "charset.h"
+
Playtree::Playtree( intf_thread_t *pIntf )
:VarTree( pIntf, /*m_parent = */NULL )
{
msg_Dbg( pIntf, "Using character encoding: %s", pCharset );
free( pCharset );
- if( iconvHandle == (vlc_iconv_t)-1 )
+ if( iconvHandle == (vlc_iconv_t) - 1 )
{
msg_Warn( pIntf, "Unable to do requested conversion" );
}
Playtree::~Playtree()
{
- if( iconvHandle != (vlc_iconv_t)-1 ) vlc_iconv_close( iconvHandle );
+ if( iconvHandle != (vlc_iconv_t) - 1 ) vlc_iconv_close( iconvHandle );
// TODO : check that everything is destroyed
}
void Playtree::buildNode( playlist_item_t *p_node, VarTree &m_pNode )
{
- fprintf( stderr, "\e[32;1mPlaytree::buildNode\e[0m\n");
for( int i = 0; i < p_node->i_children; i++ )
{
- fprintf( stderr, "\e[33;1m"__FILE__ "%d :\e[0m adding playtree item : %s\n", __LINE__, p_node->pp_children[i]->input.psz_name );
UString *pName = new UString( getIntf(), p_node->pp_children[i]->input.psz_name );
m_pNode.add( UStringPtr( pName ),
false,