- when loading a template, the layout function of the sizer is called, thus the new packages are also shown
- Author and NoComment are also loaded from a language pack
This commit is contained in:
code@koerner-de.net
2011-10-13 19:37:12 +00:00
parent 885360a407
commit d2becd3338
3 changed files with 9 additions and 1 deletions
+4 -1
View File
@@ -375,7 +375,10 @@ void OTM_Frame::OnMenuOpenTemplate(wxCommandEvent& WXUNUSED(event))
//wxString file_name = wxFileSelector( Language->ChooseFile, page->GetOpenPath(), "", "*.*", "textures (*.dds)|*.dds|zip (*.zip)|*.zip|tpf (*.tpf)|*.tpf", wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
wxString file_name = wxFileSelector( Language->ChooseFile, wxGetCwd(), "", "", "", wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
wxString dir = wxGetCwd();
dir << "/templates";
wxString file_name = wxFileSelector( Language->ChooseFile, dir, "", "*.txt", "text (*.txt)|*.txt", wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
if ( !file_name.empty() )
{
if (page->LoadTemplate( file_name))
+3
View File
@@ -393,6 +393,9 @@ int OTM_GamePage::LoadTemplate( const wxString &file_name)
}
delete [] checked;
NumberOfEntry = new_NumberOfEntry;
MainSizer->Layout();
MainSizer->FitInside(this);
return 0;
}
+2
View File
@@ -246,6 +246,8 @@ int OTM_Language::LoadLanguage(const wxString &name)
CheckEntry( command, msg, DeleteGame)
CheckEntry( command, msg, GameAlreadyAdded)
CheckEntry( command, msg, ExitGameAnyway)
CheckEntry( command, msg, NoComment)
CheckEntry( command, msg, Author)
CheckEntry( command, msg, Error_FileNotSupported)
CheckEntry( command, msg, Error_FktNotFound)
CheckEntry( command, msg, Error_DLLNotFound)