Commit b25a72c0 authored by Olivier Teulière's avatar Olivier Teulière

* skins2/parser/skin_parser.cpp: fixed a FIXME

 * skins2/vars/playtree.cpp: removed some debug lines
parent 54f65066
......@@ -261,8 +261,8 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
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"],
......@@ -331,7 +331,10 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
{
// 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"] ),
......@@ -450,11 +453,14 @@ void SkinParser::handleEndElement( const string &rName )
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 = "";
}
}
......
......@@ -46,6 +46,7 @@ class SkinParser: public XMLParser
string m_curWindowId;
string m_curLayoutId;
string m_curListId;
string m_curTreeId;
/// Current offset of the controls
int m_xOffset, m_yOffset;
list<int> m_xOffsetList, m_yOffsetList;
......
......@@ -28,6 +28,7 @@
#include "charset.h"
Playtree::Playtree( intf_thread_t *pIntf )
:VarTree( pIntf, /*m_parent = */NULL )
{
......@@ -41,7 +42,7 @@ Playtree::Playtree( intf_thread_t *pIntf )
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" );
}
......@@ -51,7 +52,7 @@ Playtree::Playtree( intf_thread_t *pIntf )
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
}
......@@ -96,10 +97,8 @@ void Playtree::onChange()
void Playtree::buildNode( playlist_item_t *p_node, VarTree &m_pNode )
{
fprintf( stderr, "Playtree::buildNode\n");
for( int i = 0; i < p_node->i_children; i++ )
{
fprintf( stderr, ""__FILE__ "%d : 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,
......
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