forked from mia/Aegisub
get locale stuff more correct
Originally committed to SVN as r983.
This commit is contained in:
parent
246be56350
commit
91c11fbf09
2 changed files with 17 additions and 2 deletions
|
@ -77,6 +77,17 @@
|
|||
FrameMain::FrameMain (wxArrayString args)
|
||||
: wxFrame ((wxFrame*)NULL,-1,_T(""),wxDefaultPosition,wxSize(800,600),wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN)
|
||||
{
|
||||
#ifdef __WXGTK__
|
||||
/* XXX HACK XXX
|
||||
* Gtk just got initialized. And if we're using the SCIM IME,
|
||||
* it just did a setlocale(LC_ALL, ""). so, BOOM. "§!$)(!"§$.
|
||||
*/
|
||||
setlocale(LC_ALL, "");
|
||||
setlocale(LC_CTYPE, "C");
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
/* XXX HACK XXX */
|
||||
#endif
|
||||
|
||||
// Set application's frame
|
||||
AegisubApp::Get()->frame = this;
|
||||
|
||||
|
@ -1361,4 +1372,4 @@ bool FrameMain::LoadList(wxArrayString list) {
|
|||
void FrameMain::SetUndoRedoDesc() {
|
||||
editMenu->SetHelpString(0,_T("Undo ")+AssFile::GetUndoDescription());
|
||||
editMenu->SetHelpString(1,_T("Redo ")+AssFile::GetRedoDescription());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,6 +73,10 @@ bool AegisubApp::OnInit() {
|
|||
// Initialize randomizer
|
||||
srand(time(NULL));
|
||||
|
||||
// locale for loading options
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
setlocale(LC_CTYPE, "C");
|
||||
|
||||
// App name
|
||||
SetAppName(_T("Aegisub"));
|
||||
#ifndef _DEBUG
|
||||
|
@ -100,7 +104,7 @@ bool AegisubApp::OnInit() {
|
|||
}
|
||||
locale.Init(lang);
|
||||
#else
|
||||
locale.Init(wxLocale::GetSystemLanguage());
|
||||
locale.Init(wxLANGUAGE_DEFAULT);
|
||||
#endif
|
||||
|
||||
// Load Automation scripts
|
||||
|
|
Loading…
Reference in a new issue