mirror of https://github.com/odrling/Aegisub
MicroDVD import should also use default styles
This commit is contained in:
parent
1dc2ae09a0
commit
e1c575b7a1
|
@ -406,6 +406,9 @@
|
|||
},
|
||||
"Translate Alignments" : true
|
||||
},
|
||||
"MicroDVD": {
|
||||
"Default Style Catalog": "Default",
|
||||
},
|
||||
"SRT": {
|
||||
"Default Style Catalog": "Default",
|
||||
},
|
||||
|
|
|
@ -406,6 +406,9 @@
|
|||
},
|
||||
"Translate Alignments" : true
|
||||
},
|
||||
"MicroDVD": {
|
||||
"Default Style Catalog": "Default",
|
||||
},
|
||||
"SRT": {
|
||||
"Default Style Catalog": "Default",
|
||||
},
|
||||
|
|
|
@ -134,7 +134,7 @@ General_DefaultStyles::General_DefaultStyles(wxTreebook *book, Preferences *pare
|
|||
// Include all catalog files that exist
|
||||
[&](std::vector<std::string> 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");
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue