Minor change in Export Filter interface.

Originally committed to SVN as r358.
This commit is contained in:
Niels Martin Hansen 2006-04-28 20:22:35 +00:00
parent 44f1f7a985
commit 97f4b48d73
6 changed files with 14 additions and 5 deletions

View File

@ -146,6 +146,13 @@ void AssExportFilter::LoadSettings(bool IsDefault) {
}
//////////////////////
// Description reader
const wxString& AssExportFilter::GetDescription() const {
return description;
}
///////////////
// Static list
AssExportFilterChain *AssExportFilterChain::instance=NULL;

View File

@ -88,7 +88,7 @@ private:
protected:
bool autoExporter;
bool initialized;
wxString Description;
wxString description;
void Register(wxString name,int priority=0); // Register the filter with specific name. Higher priority filters get the file to process first.
void Unregister(); // Unregister the filter instance
@ -99,6 +99,8 @@ public:
AssExportFilter();
virtual ~AssExportFilter();
const wxString& GetDescription() const;
virtual void ProcessSubs(AssFile *subs)=0; // Process subtitles - this function must be overriden.
virtual wxWindow *GetConfigDialogWindow(wxWindow *parent); // Draw setup controls - this function may optionally be overridden.
virtual void LoadSettings(bool IsDefault); // Config dialog is done - extract data now.

View File

@ -173,7 +173,7 @@ wxString AssExporter::GetDescription(wxString name) {
FilterList::iterator end = AssExportFilterChain::GetFilterList()->end();
for (FilterList::iterator cur=begin;cur!=end;cur++) {
if ((*cur)->RegisterName == name) {
return (*cur)->Description;
return (*cur)->GetDescription();
}
}
throw wxString::Format(_T("Filter not found: %s"), name.c_str());

View File

@ -56,7 +56,7 @@ void AssTransformCleanInfoFilter::Init() {
initialized = true;
autoExporter = false;
Register(_("Clean Script Info"),0);
Description = _("Removes all but the absolutely required fields from the Script Info section. You might want to run this on files that you plan to distribute in original form.");
description = _("Removes all but the absolutely required fields from the Script Info section. You might want to run this on files that you plan to distribute in original form.");
}

View File

@ -56,7 +56,7 @@ void AssFixStylesFilter::Init() {
initialized = true;
autoExporter = true;
Register(_("Fix Styles"),-5000);
Description = _("Fixes styles by replacing any style that isn't available on file with Default.");
description = _("Fixes styles by replacing any style that isn't available on file with Default.");
}

View File

@ -57,7 +57,7 @@ void AssTransformFramerateFilter::Init() {
initialized = true;
autoExporter = true;
Register(_("Transform Framerate"),1000);
Description = _("Transform subtitles times, including those in override tags, from input to output. This is most useful to convert CFR to VFR for hardsubbing. You usually DO NOT want to check this filter for softsubbing.");
description = _("Transform subtitles times, including those in override tags, from input to output. This is most useful to convert CFR to VFR for hardsubbing. You usually DO NOT want to check this filter for softsubbing.");
Input = NULL;
Output = NULL;
}