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 @@
* interface.cpp : wxWindows plugin for vlc
*****************************************************************************
* 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>
*
......@@ -164,8 +164,10 @@ Interface::Interface( intf_thread_t *_p_intf ):
frame_sizer->Layout();
frame_sizer->Fit(this);
#if !defined(__WXX11__)
/* Associate drop targets with the main interface */
SetDropTarget( new DragAndDrop( p_intf ) );
#endif
}
Interface::~Interface()
......@@ -232,8 +234,10 @@ void Interface::CreateOurMenuBar()
/* Attach the menu bar to the frame */
SetMenuBar( menubar );
#if !defined(__WXX11__)
/* Associate drop targets with the menubar */
menubar->SetDropTarget( new DragAndDrop( p_intf ) );
#endif
}
void Interface::CreateOurToolBar()
......@@ -285,8 +289,10 @@ void Interface::CreateOurToolBar()
toolbar_sizer->Layout();
frame_sizer->SetMinSize( toolbar_sizer->GetMinSize().GetWidth(), -1 );
#if !defined(__WXX11__)
/* Associate drop targets with the toolbar */
toolbar->SetDropTarget( new DragAndDrop( p_intf ) );
#endif
}
void Interface::CreateOurSlider()
......@@ -451,6 +457,7 @@ void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) )
vlc_object_release( p_playlist );
}
#if !defined(__WXX11__)
/*****************************************************************************
* Definition of DragAndDrop class.
*****************************************************************************/
......@@ -485,3 +492,4 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord,
return TRUE;
}
#endif
......@@ -2,7 +2,7 @@
* playlist.cpp : wxWindows plugin for vlc
*****************************************************************************
* 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>
*
......@@ -155,8 +155,10 @@ Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ):
main_sizer->Layout();
SetSizerAndFit( main_sizer );
#if !defined(__WXX11__)
/* Associate drop targets with the playlist */
SetDropTarget( new DragAndDrop( p_intf ) );
#endif
/* Update the playlist */
Rebuild();
......
......@@ -2,7 +2,7 @@
* wxwindows.cpp : wxWindows plugin for vlc
*****************************************************************************
* 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>
*
......@@ -46,6 +46,11 @@
#include "wxwindows.h"
/* Temporary hack */
#ifdef __DARWIN__
int wxEntry( int argc, char *argv[] , bool enterLoop = TRUE );
#endif
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
......
......@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* 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>
*
......@@ -166,6 +166,7 @@ private:
wxButton *ok_button;
};
#if !defined(__WXX11__)
/* Drag and Drop class */
class DragAndDrop: public wxFileDropTarget
{
......@@ -178,3 +179,4 @@ public:
private:
intf_thread_t *p_intf;
};
#endif
......@@ -2,7 +2,7 @@
* variables.c: routines for object variables handling
*****************************************************************************
* 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>
*
......@@ -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 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
......@@ -172,6 +173,7 @@ int __var_Create( vlc_object_t *p_this, const char *psz_name, int i_type )
break;
case VLC_VAR_MUTEX:
p_var->pf_cmp = CmpAddress;
p_var->pf_free = FreeMutex;
p_var->val.p_address = malloc( sizeof(vlc_mutex_t) );
vlc_mutex_init( p_this, (vlc_mutex_t*)p_var->val.p_address );
break;
......@@ -217,15 +219,6 @@ int __var_Destroy( vlc_object_t *p_this, const char *psz_name )
/* Free value if needed */
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 */
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