Override CanWriteFile in the Encore subtitle format as the default extension check doesn't work for the weird filename format

Originally committed to SVN as r6471.
This commit is contained in:
Thomas Goyne 2012-02-14 00:35:33 +00:00
parent 3252503eaa
commit 17b293865b
2 changed files with 5 additions and 0 deletions

View file

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

View file

@ -46,5 +46,6 @@ class EncoreSubtitleFormat : public SubtitleFormat {
public:
EncoreSubtitleFormat();
wxArrayString GetWriteWildcards() const;
bool CanWriteFile(wxString const& filename) const;
void WriteFile(const AssFile *src, wxString const& filename, wxString const&) const;
};