mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Fix for compilation with Unicode enabled wxWidgets.
This commit is contained in:
parent
e8c75f67ab
commit
bef85c9fe6
@ -153,11 +153,11 @@ mi_frame::mi_frame(const wxString &title,
|
||||
|
||||
void
|
||||
mi_frame::open_file(wxString file_name) {
|
||||
char *cfile_name;
|
||||
string cfile_name;
|
||||
#if WXUNICODE
|
||||
cfile_name = from_utf8(cc_local_utf8, wxMB(file_name));
|
||||
#else
|
||||
cfile_name = safestrdup(wxMB(file_name));
|
||||
cfile_name = wxMB(file_name);
|
||||
#endif
|
||||
tree->DeleteAllItems();
|
||||
item_ids[0] = tree->AddRoot(file_name);
|
||||
@ -181,7 +181,6 @@ mi_frame::open_file(wxString file_name) {
|
||||
menu_options->Enable(mi_options_showall, true);
|
||||
SetStatusText(wxT("ready"));
|
||||
tree->Refresh();
|
||||
safefree(cfile_name);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1734,7 +1734,7 @@ def_handle(tags) {
|
||||
}
|
||||
|
||||
bool
|
||||
process_file(const char *file_name) {
|
||||
process_file(const string &file_name) {
|
||||
int upper_lvl_el;
|
||||
// Elements for different levels
|
||||
EbmlElement *l0 = NULL, *l1 = NULL, *l2 = NULL, *l3 = NULL, *l4 = NULL;
|
||||
@ -1749,7 +1749,7 @@ process_file(const char *file_name) {
|
||||
try {
|
||||
in = new mm_file_io_c(file_name);
|
||||
} catch (std::exception &ex) {
|
||||
show_error("Error: Couldn't open input file %s (%s).\n", file_name,
|
||||
show_error("Error: Couldn't open input file %s (%s).\n", file_name.c_str(),
|
||||
strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include "os.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_WXWINDOWS
|
||||
@ -29,9 +31,11 @@
|
||||
|
||||
#define NAME "MKVInfo"
|
||||
|
||||
using namespace std;
|
||||
|
||||
void parse_args(int argc, char **argv, char *&file_name);
|
||||
int console_main(int argc, char **argv);
|
||||
bool process_file(const char *file_name);
|
||||
bool process_file(const string &file_name);
|
||||
void setup();
|
||||
void cleanup();
|
||||
|
||||
|
@ -1341,12 +1341,10 @@ mmg_dialog::update_command_line() {
|
||||
}
|
||||
|
||||
#if WXUNICODE
|
||||
string utf8;
|
||||
char *tmp;
|
||||
string utf8, tmp;
|
||||
utf8 = to_utf8(cmdline);
|
||||
tmp = to_utf8(utf8_init("ISO8859-1"), utf8.c_str());
|
||||
cmdline = wxU(tmp);
|
||||
safefree(tmp);
|
||||
cmdline = wxU(tmp.c_str());
|
||||
#else
|
||||
cmdline = to_utf8(cmdline).c_str();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user