diff --git a/src/common/wx.h b/src/common/wx.h index 417a438de..8a2be3430 100644 --- a/src/common/wx.h +++ b/src/common/wx.h @@ -17,17 +17,16 @@ #include -#if defined(wxUSE_UNICODE) && wxUSE_UNICODE -# define wxU(s) wxString(s, wxConvUTF8) -# define wxCS(s) ((const wchar_t *)(s).c_str()) -# define wxMB(s) ((const char *)(s).mb_str(wxConvUTF8)) -# define wxUCS(s) wxU(s).c_str() -# define wxCS2WS(s) wxUCS((s).c_str()) -# define WXUNICODE 1 -#else +#if !defined(wxUSE_UNICODE) || !wxUSE_UNICODE # error wxWidgets was not compiled with Unicode support. #endif +#define wxU(s) wxString(s, wxConvUTF8) +#define wxCS(s) ((const wchar_t *)(s).c_str()) +#define wxMB(s) ((const char *)(s).mb_str(wxConvUTF8)) +#define wxUCS(s) wxU(s).c_str() +#define wxCS2WS(s) wxUCS((s).c_str()) + /* i18n stuff */ #if defined(HAVE_LIBINTL_H) # include diff --git a/src/info/gui.cpp b/src/info/gui.cpp index 10a9d73c8..93a5a56a2 100644 --- a/src/info/gui.cpp +++ b/src/info/gui.cpp @@ -31,10 +31,6 @@ using namespace libebml; using namespace libmatroska; -#if ! wxCHECK_VERSION(2,4,2) -# define wxTreeItemIdValue long -#endif - mi_frame *frame; enum { @@ -53,14 +49,9 @@ mi_app::OnInit() { setup(); -#if WXUNICODE int i; - for (i = 1; i < argc; i++) args.push_back(std::string(wxMB(wxString(argv[i])))); -#else - args = command_line_utf8(argc, argv); -#endif parse_args(args, initial_file); diff --git a/src/info/wxwidgets_ui.cpp b/src/info/wxwidgets_ui.cpp index 2290fb28e..1e0e5a87b 100644 --- a/src/info/wxwidgets_ui.cpp +++ b/src/info/wxwidgets_ui.cpp @@ -35,10 +35,6 @@ using namespace libebml; using namespace libmatroska; -#if ! wxCHECK_VERSION(2,4,2) -# define wxTreeItemIdValue long -#endif - static mi_frame *frame; enum { @@ -81,14 +77,9 @@ mi_app::OnInit() { setup(get_ui_locale()); -#if WXUNICODE int i; - for (i = 1; i < argc; i++) args.push_back(std::string(wxMB(wxString(argv[i])))); -#else - args = command_line_utf8(argc, argv); -#endif parse_args(args, initial_file);