]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/wxwidgets.hpp
fix update code in macosx gui
[vlc] / modules / gui / wxwidgets / wxwidgets.hpp
index f19e3ae21c126dca1247b26856b99ede36681ebf..c7dd431b84ffb8082bdef9ba3b8610569d69b6e6 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * wxwidgets.hpp: Common headers for the wxwidges interface
+ * wxwidgets.hpp: Common headers for the wxwidgets interface
  *****************************************************************************
  * Copyright (C) 1999-2005 the VideoLAN team
  * $Id$
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #ifndef _WXVLC_WIDGETS_H_
 #define _WXVLC_WIDGETS_H_
 
@@ -38,9 +42,9 @@
 #define WXINTL_NO_GETTEXT_MACRO
 
 #include <vlc/vlc.h>
-#include <vlc/intf.h>
-#include "charset.h"
-
+#include <vlc_interface.h>
+#include "vlc_charset.h"
+#include <vlc_playlist.h>
 #include <wx/wx.h>
 #define SLIDER_MAX_POS 10000
 
@@ -91,17 +95,17 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
  * a wxString.
  *
  * Note that if you want to use non-ANSI code page characters on Windows,
- * you MUST build WxWidgets in “Unicode” mode.
+ * you MUST build WxWidgets in “Unicode” mode. wxConvUTF8
  */
 static inline char *wxFromLocale (const wxString& string)
 {
 #if defined( wxUSE_UNICODE )
 # if defined( WIN32 )
-    return FromWide ((wchar_t *)string.c_str());
+    return FromWide ((const wchar_t *)string.c_str());
 #  define wxLocaleFree free
 # else
-    return FromLocale (string.mb_str());
-#  define wxLocaleFree LocaleFree
+    return FromLocaleDup (string.mb_str());
+#  define wxLocaleFree free
 # endif
 #else
 # warning Please use WxWidgets with Unicode.
@@ -109,7 +113,7 @@ static inline char *wxFromLocale (const wxString& string)
 # define wxLocaleFree LocaleFree
 #endif
 }
-       
+    
 /* From Locale functions to use for File Drop targets ... go figure */
 #if defined( wxUSE_UNICODE ) && !defined( WIN32 )
 static inline char *wxDnDFromLocale( const wxChar *stupid )