* skins2/src/vlcproc.cpp: a few cleanup fixes.
authorGildas Bazin <gbazin@videolan.org>
Tue, 18 May 2004 14:50:19 +0000 (14:50 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 18 May 2004 14:50:19 +0000 (14:50 +0000)
* wxwindows/*: a few cleanup fixes.

modules/gui/skins2/src/vlcproc.cpp
modules/gui/wxwindows/bookmarks.cpp
modules/gui/wxwindows/video.cpp

index c6e9ec2..093f87f 100755 (executable)
@@ -56,8 +56,8 @@ void VlcProc::destroy( intf_thread_t *pIntf )
 }
 
 
-VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ), m_pVoutWindow( NULL ),
-    m_pVout( NULL )
+VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
+                  m_pVoutWindow( NULL ), m_pVout( NULL )
 {
     // Create a timer to poll the status of the vlc
     OSFactory *pOsFactory = OSFactory::instance( pIntf );
@@ -117,6 +117,18 @@ VlcProc::~VlcProc()
     {
         vlc_object_release( getIntf()->p_sys->p_input );
     }
+
+    // Callbacks for vout requests
+    getIntf()->pf_request_window = NULL;
+    getIntf()->pf_release_window = NULL;
+    getIntf()->pf_control_window = NULL;
+
+    var_DelCallback( getIntf()->p_sys->p_playlist, "intf-change",
+                     onIntfChange, this );
+    var_DelCallback( getIntf()->p_sys->p_playlist, "playlist-current",
+                     onPlaylistChange, this );
+    var_DelCallback( getIntf()->p_sys->p_playlist, "item-change",
+                     onItemChange, this );
 }
 
 
index 4973a3d..5b907ad 100644 (file)
@@ -2,7 +2,7 @@
  * bookmarks.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2004 VideoLAN
- * $Id: bookmarks.cpp 6961 2004-03-05 17:34:23Z sam $
+ * $Id$
  *
  * Authors: Gildas Bazin <gbazin@videolan.org>
  *
@@ -167,9 +167,8 @@ BookmarksDialog::~BookmarksDialog()
                                        FIND_ANYWHERE );
     if( p_playlist )
     {
-       /* Some global changes happened -> Rebuild all */
-       var_DelCallback( p_playlist, "intf-change", PlaylistChanged, this );
-
+       var_DelCallback( p_playlist, "playlist-current",
+                        PlaylistChanged, this );
        vlc_object_release( p_playlist );
     }
 }
index 96751a5..e8e6f0d 100644 (file)
@@ -130,6 +130,10 @@ VideoWindow::~VideoWindow()
         if( vout_Control( p_vout, VOUT_REPARENT ) != VLC_SUCCESS )
             vout_Control( p_vout, VOUT_CLOSE );
     }
+
+    p_intf->pf_request_window = NULL;
+    p_intf->pf_release_window = NULL;
+    p_intf->pf_control_window = NULL;
     vlc_mutex_unlock( &lock );
 
     vlc_mutex_destroy( &lock );