]> git.sesse.net Git - vlc/commitdiff
* skins2/parser/skin_parser.cpp: fixed a FIXME
authorOlivier Teulière <ipkiss@videolan.org>
Sun, 11 Sep 2005 20:03:18 +0000 (20:03 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Sun, 11 Sep 2005 20:03:18 +0000 (20:03 +0000)
 * skins2/vars/playtree.cpp: removed some debug lines

modules/gui/skins2/parser/skin_parser.cpp
modules/gui/skins2/parser/skin_parser.hpp
modules/gui/skins2/vars/playtree.cpp

index 499b2886768e125bad29929e746451de4682dc2b..ad7502fe456bf0859f81874e04b5a1dd1ce8b107 100644 (file)
@@ -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 = "";
+    }
 }
 
 
index ee568fef83f6dd3514b6e868e8bd256a902972e6..957df56b4fdcdc5b96c288373f1e08dce52fe5c8 100644 (file)
@@ -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;
index 871e9eedc75139ec31f9e5edaac253203ee46973..b1af19d001636ab71f822ad272f9378863471698 100644 (file)
@@ -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, "\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,