mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
Necessary changes for the previous API/UTF-8 changes.
This commit is contained in:
parent
6377a9c4ef
commit
7b9392f0c7
@ -431,24 +431,33 @@ strip(vector<wxString> &v,
|
||||
|
||||
string
|
||||
to_utf8(const wxString &src) {
|
||||
char *utf8;
|
||||
string retval;
|
||||
|
||||
#if WXUNICODE
|
||||
char *utf8;
|
||||
int len;
|
||||
|
||||
len = wxConvUTF8.WC2MB(NULL, src.c_str(), 0);
|
||||
utf8 = (char *)safemalloc(len + 1);
|
||||
wxConvUTF8.WC2MB(utf8, src.c_str(), len + 1);
|
||||
#else
|
||||
utf8 = to_utf8_c(cc_local_utf8, src);
|
||||
#endif
|
||||
retval = utf8;
|
||||
safefree(utf8);
|
||||
#else
|
||||
retval = to_utf8(cc_local_utf8, src.c_str());
|
||||
#endif
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
wxString
|
||||
from_utf8(const wxString &src) {
|
||||
#if WXUNICODE
|
||||
return src;
|
||||
#else
|
||||
return wxString(from_utf8(cc_local_utf8, src.c_str()).c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
wxString
|
||||
unescape(const wxString &src) {
|
||||
wxString dst;
|
||||
|
@ -92,6 +92,7 @@ wxString join(const wxString &pattern, vector<wxString> &strings);
|
||||
wxString &strip(wxString &s, bool newlines = false);
|
||||
vector<wxString> & strip(vector<wxString> &v, bool newlines = false);
|
||||
string to_utf8(const wxString &src);
|
||||
wxString from_utf8(const wxString &src);
|
||||
wxString UTFstring_to_wxString(const UTFstring &u);
|
||||
wxString unescape(const wxString &src);
|
||||
wxString format_date_time(time_t date_time);
|
||||
|
@ -634,21 +634,6 @@ tab_input::enable_ar_controls(mmg_track_t *track) {
|
||||
rb_display_dimensions->SetValue(!ar_enabled);
|
||||
}
|
||||
|
||||
static wxString
|
||||
from_utf8(const wxString &src) {
|
||||
#if WXUNICODE
|
||||
return src;
|
||||
#else
|
||||
wxString retval;
|
||||
char *local;
|
||||
|
||||
local = from_utf8_c(cc_local_utf8, src.c_str());
|
||||
retval = local;
|
||||
safefree(local);
|
||||
return retval;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
tab_input::on_add_file(wxCommandEvent &evt) {
|
||||
wxString media_files;
|
||||
|
Loading…
Reference in New Issue
Block a user