]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/*: compilation fixes for wxX11 (it doesn't support drag and...
authorGildas Bazin <gbazin@videolan.org>
Sun, 8 Dec 2002 19:56:04 +0000 (19:56 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sun, 8 Dec 2002 19:56:04 +0000 (19:56 +0000)
yet). Compilation fix for MacOSX as well (wxEntry() not declared).
* src/misc/variables.c: added a FreeMutex() function.

modules/gui/wxwindows/interface.cpp
modules/gui/wxwindows/playlist.cpp
modules/gui/wxwindows/wxwindows.cpp
modules/gui/wxwindows/wxwindows.h
src/misc/variables.c

index ae50cbfa8e3db8207dcc6cf9017d610010150fee..2b0b4fa87a73874639e4ba08d8a6604470f394a3 100644 (file)
@@ -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
index 0556bfd5ba0e6d574f5ccd321db92ee0fd435841..1d1941c01ed9a414aca753856e7ed97825d0719a 100644 (file)
@@ -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 Teulière <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();
index 9233a9335a0220b58127dbfb321891b08a9acda4..fdf009bd1e775226879daaa70b10b5345aa12012 100644 (file)
@@ -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>
  *
 
 #include "wxwindows.h"
 
+/* Temporary hack */
+#ifdef __DARWIN__
+int wxEntry( int argc, char *argv[] , bool enterLoop = TRUE );
+#endif
+
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
index a2f619b53aae2ec0c6b57cd2a80ed41d6dd0755c..2c0d25590b99781feb95a89430f1999052198ab5 100644 (file)
@@ -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
index 5267bdd3c55e676fd1a4dfc17fdac1da1cea06f0..77d47292261ac8a6e708e76ff327afcf90c2e169 100644 (file)
@@ -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 )
     {