+ if( readConfig() == VLC_SUCCESS )
+ {
+ applyConfig();
+ }
+ else
+ {
+ getWindowManager().showAll( true );
+ }
+}
+
+
+void Theme::applyConfig()
+{
+ msg_Dbg( getIntf(), "Apply saved configuration");
+
+ list<save_t>::const_iterator it;
+ for( it = m_saved.begin(); it!= m_saved.end(); ++it )
+ {
+ TopWindow *pWin = (*it).win;
+ GenericLayout *pLayout = (*it).layout;
+ int x = (*it).x;
+ int y = (*it).y;
+ int width = (*it).width;
+ int height = (*it).height;
+
+ // Restore the layout
+ m_windowManager.setActiveLayout( *pWin, *pLayout );
+ if( pLayout->getWidth() != width ||
+ pLayout->getHeight() != height )
+ {
+ m_windowManager.startResize( *pLayout, WindowManager::kResizeSE );
+ m_windowManager.resize( *pLayout, width, height );
+ m_windowManager.stopResize();
+ }
+ // Move the window (which incidentally takes care of the anchoring)
+ m_windowManager.startMove( *pWin );
+ m_windowManager.move( *pWin, x, y );
+ m_windowManager.stopMove();
+ }
+
+ for( it = m_saved.begin(); it != m_saved.end(); ++it )
+ {
+ if( (*it).visible )
+ m_windowManager.show( *((*it).win) );
+ }
+}
+
+
+int Theme::readConfig()
+{
+ msg_Dbg( getIntf(), "reading theme configuration");
+