Commit 07541e2e authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: compilation fixes for wxX11 (it doesn't support drag and drop
yet). Compilation fix for MacOSX as well (wxEntry() not declared).
* src/misc/variables.c: added a FreeMutex() function.
parent caf200f5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc * interface.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: interface.cpp,v 1.9 2002/11/23 18:42:59 gbazin Exp $ * $Id: interface.cpp,v 1.10 2002/12/08 19:56:04 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -164,8 +164,10 @@ Interface::Interface( intf_thread_t *_p_intf ): ...@@ -164,8 +164,10 @@ Interface::Interface( intf_thread_t *_p_intf ):
frame_sizer->Layout(); frame_sizer->Layout();
frame_sizer->Fit(this); frame_sizer->Fit(this);
#if !defined(__WXX11__)
/* Associate drop targets with the main interface */ /* Associate drop targets with the main interface */
SetDropTarget( new DragAndDrop( p_intf ) ); SetDropTarget( new DragAndDrop( p_intf ) );
#endif
} }
Interface::~Interface() Interface::~Interface()
...@@ -232,8 +234,10 @@ void Interface::CreateOurMenuBar() ...@@ -232,8 +234,10 @@ void Interface::CreateOurMenuBar()
/* Attach the menu bar to the frame */ /* Attach the menu bar to the frame */
SetMenuBar( menubar ); SetMenuBar( menubar );
#if !defined(__WXX11__)
/* Associate drop targets with the menubar */ /* Associate drop targets with the menubar */
menubar->SetDropTarget( new DragAndDrop( p_intf ) ); menubar->SetDropTarget( new DragAndDrop( p_intf ) );
#endif
} }
void Interface::CreateOurToolBar() void Interface::CreateOurToolBar()
...@@ -285,8 +289,10 @@ void Interface::CreateOurToolBar() ...@@ -285,8 +289,10 @@ void Interface::CreateOurToolBar()
toolbar_sizer->Layout(); toolbar_sizer->Layout();
frame_sizer->SetMinSize( toolbar_sizer->GetMinSize().GetWidth(), -1 ); frame_sizer->SetMinSize( toolbar_sizer->GetMinSize().GetWidth(), -1 );
#if !defined(__WXX11__)
/* Associate drop targets with the toolbar */ /* Associate drop targets with the toolbar */
toolbar->SetDropTarget( new DragAndDrop( p_intf ) ); toolbar->SetDropTarget( new DragAndDrop( p_intf ) );
#endif
} }
void Interface::CreateOurSlider() void Interface::CreateOurSlider()
...@@ -451,6 +457,7 @@ void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) ) ...@@ -451,6 +457,7 @@ void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) )
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
#if !defined(__WXX11__)
/***************************************************************************** /*****************************************************************************
* Definition of DragAndDrop class. * Definition of DragAndDrop class.
*****************************************************************************/ *****************************************************************************/
...@@ -485,3 +492,4 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord, ...@@ -485,3 +492,4 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord,
return TRUE; return TRUE;
} }
#endif
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.cpp : wxWindows plugin for vlc * playlist.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: playlist.cpp,v 1.4 2002/11/23 18:42:59 gbazin Exp $ * $Id: playlist.cpp,v 1.5 2002/12/08 19:56:04 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* *
...@@ -155,8 +155,10 @@ Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ): ...@@ -155,8 +155,10 @@ Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ):
main_sizer->Layout(); main_sizer->Layout();
SetSizerAndFit( main_sizer ); SetSizerAndFit( main_sizer );
#if !defined(__WXX11__)
/* Associate drop targets with the playlist */ /* Associate drop targets with the playlist */
SetDropTarget( new DragAndDrop( p_intf ) ); SetDropTarget( new DragAndDrop( p_intf ) );
#endif
/* Update the playlist */ /* Update the playlist */
Rebuild(); Rebuild();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wxwindows.cpp : wxWindows plugin for vlc * wxwindows.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: wxwindows.cpp,v 1.6 2002/11/23 16:17:12 gbazin Exp $ * $Id: wxwindows.cpp,v 1.7 2002/12/08 19:56:04 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -46,6 +46,11 @@ ...@@ -46,6 +46,11 @@
#include "wxwindows.h" #include "wxwindows.h"
/* Temporary hack */
#ifdef __DARWIN__
int wxEntry( int argc, char *argv[] , bool enterLoop = TRUE );
#endif
/***************************************************************************** /*****************************************************************************
* Local prototypes. * Local prototypes.
*****************************************************************************/ *****************************************************************************/
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description * wxwindows.h: private wxWindows interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.3 2002/11/23 14:28:51 gbazin Exp $ * $Id: wxwindows.h,v 1.4 2002/12/08 19:56:04 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -166,6 +166,7 @@ private: ...@@ -166,6 +166,7 @@ private:
wxButton *ok_button; wxButton *ok_button;
}; };
#if !defined(__WXX11__)
/* Drag and Drop class */ /* Drag and Drop class */
class DragAndDrop: public wxFileDropTarget class DragAndDrop: public wxFileDropTarget
{ {
...@@ -178,3 +179,4 @@ public: ...@@ -178,3 +179,4 @@ public:
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
}; };
#endif
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* variables.c: routines for object variables handling * variables.c: routines for object variables handling
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: variables.c,v 1.15 2002/12/07 15:25:27 gbazin Exp $ * $Id: variables.c,v 1.16 2002/12/08 19:56:04 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -56,6 +56,7 @@ static void DupString( vlc_value_t *p_val ) { p_val->psz_string = strdup( p_val- ...@@ -56,6 +56,7 @@ static void DupString( vlc_value_t *p_val ) { p_val->psz_string = strdup( p_val-
static void FreeDummy( vlc_value_t *p_val ) { (void)p_val; /* unused */ } static void FreeDummy( vlc_value_t *p_val ) { (void)p_val; /* unused */ }
static void FreeString( vlc_value_t *p_val ) { free( p_val->psz_string ); } static void FreeString( vlc_value_t *p_val ) { free( p_val->psz_string ); }
static void FreeMutex( vlc_value_t *p_val ) { vlc_mutex_destroy( (vlc_mutex_t*)p_val->p_address ); free( p_val->p_address ); }
/***************************************************************************** /*****************************************************************************
* Local prototypes * Local prototypes
...@@ -172,6 +173,7 @@ int __var_Create( vlc_object_t *p_this, const char *psz_name, int i_type ) ...@@ -172,6 +173,7 @@ int __var_Create( vlc_object_t *p_this, const char *psz_name, int i_type )
break; break;
case VLC_VAR_MUTEX: case VLC_VAR_MUTEX:
p_var->pf_cmp = CmpAddress; p_var->pf_cmp = CmpAddress;
p_var->pf_free = FreeMutex;
p_var->val.p_address = malloc( sizeof(vlc_mutex_t) ); p_var->val.p_address = malloc( sizeof(vlc_mutex_t) );
vlc_mutex_init( p_this, (vlc_mutex_t*)p_var->val.p_address ); vlc_mutex_init( p_this, (vlc_mutex_t*)p_var->val.p_address );
break; break;
...@@ -217,15 +219,6 @@ int __var_Destroy( vlc_object_t *p_this, const char *psz_name ) ...@@ -217,15 +219,6 @@ int __var_Destroy( vlc_object_t *p_this, const char *psz_name )
/* Free value if needed */ /* Free value if needed */
p_var->pf_free( &p_var->val ); p_var->pf_free( &p_var->val );
switch( p_var->i_type & VLC_VAR_TYPE )
{
/* XXX: find a way to put this in pf_free */
case VLC_VAR_MUTEX:
vlc_mutex_destroy( (vlc_mutex_t*)p_var->val.p_address );
free( p_var->val.p_address );
break;
}
/* Free choice list if needed */ /* Free choice list if needed */
if( p_var->pp_choices ) if( p_var->pp_choices )
{ {
......
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