Override CanWriteFile in the transation subtitle format as the default doesn't work for it

Originally committed to SVN as r6630.
This commit is contained in:
Thomas Goyne 2012-03-29 00:05:34 +00:00
parent c4a1a93b97
commit c7d3c8a5c3
2 changed files with 5 additions and 0 deletions

View file

@ -59,6 +59,10 @@ wxArrayString TranStationSubtitleFormat::GetWriteWildcards() const {
return formats;
}
bool TranStationSubtitleFormat::CanWriteFile(wxString const& filename) const {
return filename.Lower().EndsWith(".transtation.txt");
}
void TranStationSubtitleFormat::WriteFile(const AssFile *src, wxString const& filename, wxString const& encoding) const {
FractionalTime ft = AskForFPS(true);
if (!ft.FPS().IsLoaded()) return;

View file

@ -48,6 +48,7 @@ class TranStationSubtitleFormat : public SubtitleFormat {
public:
TranStationSubtitleFormat();
bool CanWriteFile(wxString const& filename) const;
wxArrayString GetWriteWildcards() const;
void WriteFile(const AssFile *src, wxString const& filename, wxString const& encoding) const;
};