Commit a39c3623 authored by Cyril Deguet's avatar Cyril Deguet

* fixed some constructors and destructors

parent 340204ae
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* generic.cpp: Generic control, parent of the others * generic.cpp: Generic control, parent of the others
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: generic.cpp,v 1.4 2003/04/21 21:51:16 asmax Exp $ * $Id: generic.cpp,v 1.5 2003/04/23 10:29:52 asmax Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -51,6 +51,11 @@ GenericControl::GenericControl( string id, bool visible, string help, ...@@ -51,6 +51,11 @@ GenericControl::GenericControl( string id, bool visible, string help,
Visible = visible; Visible = visible;
Help = help; Help = help;
ParentWindow = Parent; ParentWindow = Parent;
Left = 0;
Top = 0;
Width = 0;
Height = 0;
State = 0;
Img = NULL; Img = NULL;
p_intf = Parent->GetIntf(); p_intf = Parent->GetIntf();
} }
...@@ -58,7 +63,7 @@ GenericControl::GenericControl( string id, bool visible, string help, ...@@ -58,7 +63,7 @@ GenericControl::GenericControl( string id, bool visible, string help,
GenericControl::~GenericControl() GenericControl::~GenericControl()
{ {
if( Img != NULL ) if( Img != NULL )
delete Img; delete[] Img;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
bool GenericControl::GenericProcessEvent( Event *evt ) bool GenericControl::GenericProcessEvent( Event *evt )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* skin_common.h: Private Skin interface description * skin_common.h: Private Skin interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: skin_common.h,v 1.4 2003/04/21 02:50:49 asmax Exp $ * $Id: skin_common.h,v 1.5 2003/04/23 10:29:52 asmax Exp $
* *
* Authors: Olivier Teulière <ipkiss@via.ecp.fr> * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -77,6 +77,7 @@ struct intf_sys_t ...@@ -77,6 +77,7 @@ struct intf_sys_t
// Wait wxwindows initialization // Wait wxwindows initialization
vlc_mutex_t init_lock; vlc_mutex_t init_lock;
vlc_cond_t init_cond; vlc_cond_t init_cond;
}; };
#endif #endif
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* skin-main.cpp: skins plugin for VLC * skin-main.cpp: skins plugin for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: skin_main.cpp,v 1.17 2003/04/22 19:26:02 asmax Exp $ * $Id: skin_main.cpp,v 1.18 2003/04/23 10:29:52 asmax Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -114,9 +114,9 @@ static int Open ( vlc_object_t *p_this ) ...@@ -114,9 +114,9 @@ static int Open ( vlc_object_t *p_this )
gdk_init( &i_args, &pp_args ); gdk_init( &i_args, &pp_args );
#endif #endif
// Initialize conditions // Initialize conditions and mutexes
vlc_mutex_init( p_intf, &p_intf->p_sys->init_lock); vlc_mutex_init( p_intf, &p_intf->p_sys->init_lock );
vlc_cond_init( p_intf, &p_intf->p_sys->init_cond); vlc_cond_init( p_intf, &p_intf->p_sys->init_cond );
p_intf->p_sys->p_theme = (Theme *)new OSTheme( p_intf ); p_intf->p_sys->p_theme = (Theme *)new OSTheme( p_intf );
...@@ -147,9 +147,9 @@ static void Close ( vlc_object_t *p_this ) ...@@ -147,9 +147,9 @@ static void Close ( vlc_object_t *p_this )
// Unsuscribe to messages bank // Unsuscribe to messages bank
msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub ); msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
// Destroy conditions // Destroy conditions and mutexes
vlc_cond_destroy( &p_intf->p_sys->init_cond); vlc_cond_destroy( &p_intf->p_sys->init_cond );
vlc_mutex_destroy( &p_intf->p_sys->init_lock); vlc_mutex_destroy( &p_intf->p_sys->init_lock );
// Destroy structure // Destroy structure
free( p_intf->p_sys ); free( p_intf->p_sys );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment