summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-08-25 22:00:06 +0200
committerCarl Hetherington <cth@carlh.net>2020-08-25 22:00:06 +0200
commit9f294327cb59fce307c3a439f044d79b081376b0 (patch)
treebce7bffabf5d9f7903e46245448fface6cbe8d58 /src/wx
parent8475d7b7d70d5b98e7737f326653d80a9fd8e9cf (diff)
Add option to export Interop subs with or without the font file / reference.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/export_subtitles_dialog.cc17
-rw-r--r--src/wx/export_subtitles_dialog.h4
2 files changed, 18 insertions, 3 deletions
diff --git a/src/wx/export_subtitles_dialog.cc b/src/wx/export_subtitles_dialog.cc
index 83e08feb4..bcc8adbe1 100644
--- a/src/wx/export_subtitles_dialog.cc
+++ b/src/wx/export_subtitles_dialog.cc
@@ -34,13 +34,19 @@ using std::string;
using boost::bind;
-ExportSubtitlesDialog::ExportSubtitlesDialog (wxWindow* parent, string name)
+ExportSubtitlesDialog::ExportSubtitlesDialog (wxWindow* parent, string name, bool interop)
: TableDialog (parent, _("Export subtitles"), 2, 1, true)
, _initial_name (name)
+ , _include_font (0)
{
_split_reels = new CheckBox (this, _("Write reels into separate files"));
add (_split_reels, false);
add_spacer ();
+ if (interop) {
+ _include_font = new CheckBox (this, _("Define font in output and export font file"));
+ add (_include_font, false);
+ add_spacer ();
+ }
add (_("Output file"), true);
/* Don't warn overwrite here, because on Linux (at least) if we specify a filename like foo
@@ -77,10 +83,17 @@ ExportSubtitlesDialog::split_reels () const
}
+bool
+ExportSubtitlesDialog::include_font () const
+{
+ return _include_font ? _include_font->GetValue () : true;
+}
+
+
void
ExportSubtitlesDialog::file_changed ()
{
- wxButton* ok = dynamic_cast<wxButton *> (FindWindowById (wxID_OK, this));
+ wxButton* ok = dynamic_cast<wxButton *> (FindWindowById(wxID_OK, this));
DCPOMATIC_ASSERT (ok);
ok->Enable (path().is_absolute());
}
diff --git a/src/wx/export_subtitles_dialog.h b/src/wx/export_subtitles_dialog.h
index d4405cb29..ee55729f7 100644
--- a/src/wx/export_subtitles_dialog.h
+++ b/src/wx/export_subtitles_dialog.h
@@ -27,15 +27,17 @@ class FilePickerCtrl;
class ExportSubtitlesDialog : public TableDialog
{
public:
- ExportSubtitlesDialog (wxWindow* parent, std::string name);
+ ExportSubtitlesDialog (wxWindow* parent, std::string name, bool interop);
boost::filesystem::path path () const;
bool split_reels () const;
+ bool include_font () const;
private:
void file_changed ();
std::string _initial_name;
wxCheckBox* _split_reels;
+ wxCheckBox* _include_font;
FilePickerCtrl* _file;
};