diff --git a/src/libresrc/default_config.json b/src/libresrc/default_config.json index 9d1d4e5e9..d0ef192d0 100644 --- a/src/libresrc/default_config.json +++ b/src/libresrc/default_config.json @@ -406,6 +406,9 @@ }, "Translate Alignments" : true }, + "MicroDVD": { + "Default Style Catalog": "Default", + }, "SRT": { "Default Style Catalog": "Default", }, diff --git a/src/libresrc/osx/default_config.json b/src/libresrc/osx/default_config.json index fd02f63c5..458cf0d2c 100644 --- a/src/libresrc/osx/default_config.json +++ b/src/libresrc/osx/default_config.json @@ -406,6 +406,9 @@ }, "Translate Alignments" : true }, + "MicroDVD": { + "Default Style Catalog": "Default", + }, "SRT": { "Default Style Catalog": "Default", }, diff --git a/src/preferences.cpp b/src/preferences.cpp index 3aa1a291e..8e93cac05 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -134,7 +134,7 @@ General_DefaultStyles::General_DefaultStyles(wxTreebook *book, Preferences *pare // Include all catalog files that exist [&](std::vector const& l){ catalogs_set.insert(l.begin(), l.end()); } (AssStyleStorage::GetCatalogs()); // Include all catalogs named in the existing configuration - static const char *formats[] = { "ASS", "SRT", "TTXT", "TXT" }; + static const char *formats[] = { "ASS", "MicroDVD", "SRT", "TTXT", "TXT" }; for (auto formatname : formats) catalogs_set.insert(OPT_GET("Subtitle Format/" + std::string(formatname) + "/Default Style Catalog")->GetString()); // Sorted version @@ -144,7 +144,7 @@ General_DefaultStyles::General_DefaultStyles(wxTreebook *book, Preferences *pare catalogs.Sort(); OptionChoice(general, _("New files"), catalogs, "Subtitle Format/ASS/Default Style Catalog"); - //CellSkip(general); + OptionChoice(general, _("MicroDVD import"), catalogs, "Subtitle Format/MicroDVD/Default Style Catalog"); OptionChoice(general, _("SRT import"), catalogs, "Subtitle Format/SRT/Default Style Catalog"); OptionChoice(general, _("TTXT import"), catalogs, "Subtitle Format/TTXT/Default Style Catalog"); OptionChoice(general, _("Plain text import"), catalogs, "Subtitle Format/TXT/Default Style Catalog"); diff --git a/src/subtitle_format_microdvd.cpp b/src/subtitle_format_microdvd.cpp index 04406f4c7..4e5bcd291 100644 --- a/src/subtitle_format_microdvd.cpp +++ b/src/subtitle_format_microdvd.cpp @@ -37,6 +37,7 @@ #include "ass_dialogue.h" #include "ass_file.h" #include "ass_time.h" +#include "options.h" #include "text_file_reader.h" #include "text_file_writer.h" #include "video_context.h" @@ -81,7 +82,7 @@ bool MicroDVDSubtitleFormat::CanReadFile(agi::fs::path const& filename, std::str void MicroDVDSubtitleFormat::ReadFile(AssFile *target, agi::fs::path const& filename, agi::vfr::Framerate const& vfps, std::string const& encoding) const { TextFileReader file(filename, encoding); - target->LoadDefault(false); + target->LoadDefault(false, OPT_GET("Subtitle Format/MicroDVD/Default Style Catalog")->GetString()); agi::vfr::Framerate fps;