]> git.sesse.net Git - vlc/commitdiff
* modules/gui/skins2/*: a few bug fixes.
authorGildas Bazin <gbazin@videolan.org>
Fri, 30 Apr 2004 15:35:56 +0000 (15:35 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 30 Apr 2004 15:35:56 +0000 (15:35 +0000)
modules/gui/skins2/commands/async_queue.cpp
modules/gui/skins2/src/skin_main.cpp
modules/gui/skins2/win32/win32_factory.cpp

index 364ad56760aca32bf372ba8af922fc0737cf650b..43059ac8bc4b794979f833396c03b5a226b048b7 100644 (file)
@@ -2,7 +2,7 @@
  * async_queue.cpp
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: async_queue.cpp,v 1.1 2004/01/03 23:31:33 asmax Exp $
+ * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
  *          Olivier Teulière <ipkiss@via.ecp.fr>
@@ -40,6 +40,7 @@ AsyncQueue::AsyncQueue( intf_thread_t *pIntf ): SkinObject( pIntf )
 
 AsyncQueue::~AsyncQueue()
 {
+    delete( m_pTimer );
 }
 
 
index e267925d5a52a5e00fbe2615feb829e0ab284494..d9b14ffbb9bc75ae238a9ecd2c31fba654f36c85 100644 (file)
@@ -166,7 +166,7 @@ static void Run( intf_thread_t *p_intf )
     ThemeLoader *pLoader = new ThemeLoader( p_intf );
     char *skin_last = config_GetPsz( p_intf, "skins2-last" );
 
-    if( skin_last == NULL || !pLoader->load( skin_last ) )
+    if( !skin_last || !*skin_last || !pLoader->load( skin_last ) )
     {
         // Get the resource path and try to load the default skin
         OSFactory *pOSFactory = OSFactory::instance( p_intf );
@@ -219,16 +219,7 @@ static void Run( intf_thread_t *p_intf )
                                            FIND_ANYWHERE );
         if( p_playlist )
         {
-            vlc_mutex_lock( &p_playlist->object_lock );
-            if( p_playlist->i_size )
-            {
-                vlc_mutex_unlock( &p_playlist->object_lock );
-                playlist_Play( p_playlist );
-            }
-            else
-            {
-                vlc_mutex_unlock( &p_playlist->object_lock );
-            }
+            playlist_Play( p_playlist );
             vlc_object_release( p_playlist );
         }
     }
index bf994a50622159c602e4bd6f30e8b9773b7500ea..dbcea954451e48e0da1ba3abdfd95b54ef9b9a89 100644 (file)
@@ -80,7 +80,8 @@ LRESULT CALLBACK Win32Proc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
 
 Win32Factory::Win32Factory( intf_thread_t *pIntf ):
     OSFactory( pIntf ), TransparentBlt( NULL ), AlphaBlend( NULL ),
-    SetLayeredWindowAttributes( NULL ), m_dirSep( "\\" )
+    SetLayeredWindowAttributes( NULL ), m_hParentWindow( NULL ),
+    m_dirSep( "\\" )
 {
     // see init()
 }
@@ -178,8 +179,12 @@ bool Win32Factory::init()
     }
 
     // Initialize the resource path
+    m_resourcePath.push_back( (string)getIntf()->p_vlc->psz_homedir +
+                               "\\" + CONFIG_DIR + "\\skins2" );
     m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath +
                               "\\skins2" );
+    m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath +
+                              "\\share\\skins2" );
 
     // All went well
     return true;
@@ -191,6 +196,8 @@ Win32Factory::~Win32Factory()
     // Uninitialize the OLE library
     OleUninitialize();
 
+    if( m_hParentWindow ) DestroyWindow( m_hParentWindow );
+
     // Unload msimg32.dll and user32.dll
     if( m_hMsimg32 )
         FreeLibrary( m_hMsimg32 );