mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +02:00
Another attempt to tame WxString
This commit is contained in:
parent
1241e76243
commit
43a9e778e4
@ -88,22 +88,23 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* wxFromLocale() is a replacement for LibVLC FromLocale() that accepts
|
* wxFromLocale() is a replacement for LibVLC FromLocale() that accepts
|
||||||
* a wxString. It was originally introduced because wxString::mb_str()
|
* a wxString.
|
||||||
* sucks on Linux with Unicode wxWidgets. It then turned out wxWidgets
|
|
||||||
* did not support wc_str() when Unicode was not enabled.
|
|
||||||
*
|
*
|
||||||
* But heh, that's wxWidgets; you can't really expect it to actually
|
* Note that if you want to use non-ANSI code page characters on Windows,
|
||||||
* work, let alone work like its documentation says.
|
* you MUST build WxWidgets in “Unicode” mode.
|
||||||
*
|
|
||||||
* Unicode needs to be enabled to catch non-ANSI characters on Windows
|
|
||||||
* through wxString::wc_str(); they are lost when using mb_str().
|
|
||||||
*/
|
*/
|
||||||
#if defined( wxUSE_UNICODE ) && defined( WIN32 )
|
#if defined( wxUSE_UNICODE )
|
||||||
# define wxFromLocale(wxstring) FromWide((wxstring).wc_str())
|
# if defined( WIN32 )
|
||||||
# define wxLocaleFree(string) free(string)
|
# define wxFromLocale(wxstring) FromWide((wxstring).c_str())
|
||||||
|
# define wxLocaleFree(string) free(string)
|
||||||
|
# else
|
||||||
|
# define wxFromLocale(wxstring) FromLocale((wxstring).mb_str())
|
||||||
|
# define wxLocaleFree(string) LocaleFree(string)
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
# define wxFromLocale(wxstring) FromLocale((wxstring).mb_str())
|
# warning Please use WxWidgets with Unicode.
|
||||||
# define wxLocaleFree(string) LocaleFree(string)
|
# define wxFromLocale(wxstring) FromLocale((wxstring).c_str())
|
||||||
|
# define wxLocaleFree(string) LocaleFree(string)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* From Locale functions to use for File Drop targets ... go figure */
|
/* From Locale functions to use for File Drop targets ... go figure */
|
||||||
|
Loading…
Reference in New Issue
Block a user