Clean up translator callback.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6842 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2011-01-14 00:15:08 +00:00
parent 984b0d14d2
commit a747cb548c
3 changed files with 13 additions and 15 deletions

View File

@ -56,7 +56,7 @@ END_EVENT_TABLE()
#include <wx/stdpaths.h>
bool wxMsgAlert(const char*, const char*, bool, int);
const char *wxStringTranslator(const char *);
std::string wxStringTranslator(const char *);
CFrame* main_frame = NULL;
@ -471,12 +471,9 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*
#endif
}
const char *wxStringTranslator(const char *text)
std::string wxStringTranslator(const char *text)
{
static char buffer[2048];
snprintf(buffer, 2048, "%s",
(const char *)wxString(wxGetTranslation(wxString::From8BitData(text))).ToUTF8());
return buffer;
return (const char *)wxString(wxGetTranslation(wxString::From8BitData(text))).ToUTF8();
}
// Accessor for the main window class