From 97f4b48d7309b4fc0cdf462627c9d24050906b5a Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Fri, 28 Apr 2006 20:22:35 +0000 Subject: [PATCH] Minor change in Export Filter interface. Originally committed to SVN as r358. --- core/ass_export_filter.cpp | 7 +++++++ core/ass_export_filter.h | 4 +++- core/ass_exporter.cpp | 2 +- core/export_clean_info.cpp | 2 +- core/export_fixstyle.cpp | 2 +- core/export_framerate.cpp | 2 +- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/core/ass_export_filter.cpp b/core/ass_export_filter.cpp index 1aed6641d..ed6ede0a4 100644 --- a/core/ass_export_filter.cpp +++ b/core/ass_export_filter.cpp @@ -146,6 +146,13 @@ void AssExportFilter::LoadSettings(bool IsDefault) { } +////////////////////// +// Description reader +const wxString& AssExportFilter::GetDescription() const { + return description; +} + + /////////////// // Static list AssExportFilterChain *AssExportFilterChain::instance=NULL; diff --git a/core/ass_export_filter.h b/core/ass_export_filter.h index dcefe805b..6dc8db64e 100644 --- a/core/ass_export_filter.h +++ b/core/ass_export_filter.h @@ -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. diff --git a/core/ass_exporter.cpp b/core/ass_exporter.cpp index dced71ab2..b806584a3 100644 --- a/core/ass_exporter.cpp +++ b/core/ass_exporter.cpp @@ -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()); diff --git a/core/export_clean_info.cpp b/core/export_clean_info.cpp index 4b50bda30..5e961d794 100644 --- a/core/export_clean_info.cpp +++ b/core/export_clean_info.cpp @@ -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."); } diff --git a/core/export_fixstyle.cpp b/core/export_fixstyle.cpp index 1f59376c8..2592cee22 100644 --- a/core/export_fixstyle.cpp +++ b/core/export_fixstyle.cpp @@ -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."); } diff --git a/core/export_framerate.cpp b/core/export_framerate.cpp index fbb91a496..a5ebb8d5f 100644 --- a/core/export_framerate.cpp +++ b/core/export_framerate.cpp @@ -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; }