Remove withCharset parameter from FrameMain::SaveSubtitles as it was never used (saving with a charset is done by exporting)

Originally committed to SVN as r5245.
This commit is contained in:
Thomas Goyne 2011-01-20 05:57:08 +00:00
parent 1a26edc869
commit 5270a3bf3a
2 changed files with 3 additions and 9 deletions

View File

@ -425,7 +425,7 @@ void FrameMain::LoadSubtitles(wxString filename,wxString charset) {
/// @param saveas /// @param saveas
/// @param withCharset /// @param withCharset
/// @return /// @return
bool FrameMain::SaveSubtitles(bool saveas, bool withCharset) { bool FrameMain::SaveSubtitles(bool saveas) {
wxString filename; wxString filename;
if (!saveas && context->ass->CanSave()) { if (!saveas && context->ass->CanSave()) {
filename = context->ass->filename; filename = context->ass->filename;
@ -441,14 +441,8 @@ bool FrameMain::SaveSubtitles(bool saveas, bool withCharset) {
return false; return false;
} }
wxString charset;
if (withCharset) {
charset = wxGetSingleChoice(_("Choose charset code:"), "Charset", agi::charset::GetEncodingsList<wxArrayString>(),this,-1, -1,true,250,200);
if (charset.empty()) return false;
}
try { try {
context->ass->Save(filename, true, true, charset); context->ass->Save(filename, true, true);
} }
catch (const agi::Exception& err) { catch (const agi::Exception& err) {
wxMessageBox(lagi_wxString(err.GetMessage()), "Error", wxOK | wxICON_ERROR, NULL); wxMessageBox(lagi_wxString(err.GetMessage()), "Error", wxOK | wxICON_ERROR, NULL);

View File

@ -87,7 +87,7 @@ public:
void StatusTimeout(wxString text,int ms=10000); void StatusTimeout(wxString text,int ms=10000);
void SetDisplayMode(int showVid,int showAudio); void SetDisplayMode(int showVid,int showAudio);
void LoadSubtitles(wxString filename,wxString charset=""); void LoadSubtitles(wxString filename,wxString charset="");
bool SaveSubtitles(bool saveas=false,bool withCharset=false); bool SaveSubtitles(bool saveas=false);
void DetachVideo(bool detach=true); void DetachVideo(bool detach=true);
void LoadVFR(wxString filename); void LoadVFR(wxString filename);