[vlc-commits] commit: skins2: Oops, autoresize (part 2) (Erwan Tulou )

git at videolan.org git at videolan.org
Sat Aug 14 15:57:54 CEST 2010


vlc/vlc-1.1 | branch: master | Erwan Tulou <erwan10 at videolan.org> | Sat Aug 14 15:33:52 2010 +0200| [5bb0b91a7b733c16c2a2126c0e6553aca4aa2fe6] | committer: Erwan Tulou 

skins2: Oops, autoresize (part 2)

this patch completes 07bf40d589a3f4fa9a608c50d7599b8b9b7059bf
(cherry picked from commit 8079da513e4673acaca296e431ba5d7f39d25944)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=5bb0b91a7b733c16c2a2126c0e6553aca4aa2fe6
---

 modules/gui/skins2/parser/builder.cpp |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/modules/gui/skins2/parser/builder.cpp b/modules/gui/skins2/parser/builder.cpp
index 0535b68..ff9d445 100644
--- a/modules/gui/skins2/parser/builder.cpp
+++ b/modules/gui/skins2/parser/builder.cpp
@@ -1014,16 +1014,6 @@ void Builder::addVideo( const BuilderData::Video &rData )
         return;
     }
 
-    // Get the visibility variable
-    // XXX check when it is null
-    Interpreter *pInterpreter = Interpreter::instance( getIntf() );
-    VarBool *pVisible = pInterpreter->getVarBool( rData.m_visible, m_pTheme );
-
-    CtrlVideo *pVideo = new CtrlVideo( getIntf(), *pLayout,
-        rData.m_autoResize, UString( getIntf(), rData.m_help.c_str() ),
-        pVisible );
-    m_pTheme->m_controls[rData.m_id] = CtrlGenericPtr( pVideo );
-
     BuilderData::Video Data = rData;
     if( Data.m_autoResize )
     {
@@ -1039,6 +1029,16 @@ void Builder::addVideo( const BuilderData::Video &rData )
         }
     }
 
+    // Get the visibility variable
+    // XXX check when it is null
+    Interpreter *pInterpreter = Interpreter::instance( getIntf() );
+    VarBool *pVisible = pInterpreter->getVarBool( Data.m_visible, m_pTheme );
+
+    CtrlVideo *pVideo = new CtrlVideo( getIntf(), *pLayout,
+        Data.m_autoResize, UString( getIntf(), Data.m_help.c_str() ),
+        pVisible );
+    m_pTheme->m_controls[Data.m_id] = CtrlGenericPtr( pVideo );
+
     // Compute the position of the control
     const GenericRect *pRect;
     GET_BOX( pRect, rData.m_panelId , pLayout);
@@ -1048,7 +1048,7 @@ void Builder::addVideo( const BuilderData::Video &rData )
                                        *pRect,
                                        Data.m_xKeepRatio, Data.m_yKeepRatio );
 
-    pLayout->addControl( pVideo, pos, rData.m_layer );
+    pLayout->addControl( pVideo, pos, Data.m_layer );
 }
 
 



More information about the vlc-commits mailing list