Label Import select all supported formats rather than just txt.

(cherry picked from commit c0689cca8d66722a03bfed25c12d028381f90c0d)
This commit is contained in:
Christopher Oezbek
2025-05-13 15:15:47 +02:00
committed by Avery King
parent 1a05883add
commit d1f2633f47
4 changed files with 6 additions and 4 deletions

View File

@@ -47,6 +47,7 @@ for drawing different aspects of the label and its text box.
const FileNames::FileType LabelTrack::SubripFiles{ XO("SubRip text file"), { wxT("srt") }, true };
const FileNames::FileType LabelTrack::WebVTTFiles{ XO("WebVTT file"), { wxT("vtt") }, true };
const FileNames::FileType LabelTrack::AllSupportedFiles{ XO("Supported label file"), { wxT("srt"), wxT("txt") }, true };
EnumSetting<bool> LabelStyleSetting {
wxT("/FileFormats/LabelStyleChoice"),

View File

@@ -130,6 +130,7 @@ class LABEL_TRACK_API LabelTrack final
static const FileNames::FileType SubripFiles;
static const FileNames::FileType WebVTTFiles;
static const FileNames::FileType AllSupportedFiles;
private:
Track::Holder Clone(bool backup) const override;

View File

@@ -632,8 +632,8 @@ void LabelDialog::OnImport(wxCommandEvent & WXUNUSED(event))
XO("Select a text file containing labels"),
wxEmptyString, // Path
wxT(""), // Name
wxT("txt"), // Extension
{ FileNames::TextFiles, LabelTrack::SubripFiles, FileNames::AllFiles },
wxT(""), // Extension
{ LabelTrack::AllSupportedFiles, FileNames::TextFiles, LabelTrack::SubripFiles, FileNames::AllFiles },
wxRESIZE_BORDER, // Flags
this); // Parent

View File

@@ -385,8 +385,8 @@ void OnImportLabels(const CommandContext &context)
XO("Select a text file containing labels"),
wxEmptyString, // Path
wxT(""), // Name
wxT("txt"), // Extension
{ FileNames::TextFiles, LabelTrack::SubripFiles, FileNames::AllFiles },
wxT(""), // Extension
{ LabelTrack::AllSupportedFiles, FileNames::TextFiles, LabelTrack::SubripFiles, FileNames::AllFiles },
wxRESIZE_BORDER, // Flags
&window); // Parent