summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-12-31 23:33:50 +0100
committerCarl Hetherington <cth@carlh.net>2025-12-31 23:33:50 +0100
commit28f6d73aaa6e811c3fc7cc8e3a25811f82d1e875 (patch)
tree42052a37b2bfac539819ad6087a31f971bf117d2
parent4f9dbe8ebd57ddc46ac4233b56b404682426c949 (diff)
White space: export_subtitles_dialog.{cc,h}
-rw-r--r--src/wx/export_subtitles_dialog.cc48
-rw-r--r--src/wx/export_subtitles_dialog.h10
2 files changed, 29 insertions, 29 deletions
diff --git a/src/wx/export_subtitles_dialog.cc b/src/wx/export_subtitles_dialog.cc
index b2ed52377..73ddd9d6c 100644
--- a/src/wx/export_subtitles_dialog.cc
+++ b/src/wx/export_subtitles_dialog.cc
@@ -34,27 +34,27 @@ using std::string;
using boost::bind;
-ExportSubtitlesDialog::ExportSubtitlesDialog (wxWindow* parent, int reels, bool interop)
+ExportSubtitlesDialog::ExportSubtitlesDialog(wxWindow* parent, int reels, bool interop)
: wxDialog(parent, wxID_ANY, _("Export subtitles"))
- , _interop (interop)
+ , _interop(interop)
{
auto sizer = new wxGridBagSizer(DCPOMATIC_SIZER_GAP, DCPOMATIC_SIZER_GAP);
int r = 0;
- _split_reels = new CheckBox (this, _("Write reels into separate files"));
+ _split_reels = new CheckBox(this, _("Write reels into separate files"));
sizer->Add(_split_reels, wxGBPosition(r, 0), wxGBSpan(1, 2));
++r;
if (reels > 1) {
- _split_reels->Enable (false);
+ _split_reels->Enable(false);
}
- _include_font = new CheckBox (this, _("Define font in output and export font file"));
+ _include_font = new CheckBox(this, _("Define font in output and export font file"));
sizer->Add(_include_font, wxGBPosition(r, 0), wxGBSpan(1, 2));
++r;
if (!_interop) {
- _include_font->Enable (false);
+ _include_font->Enable(false);
}
wxString const wildcard = _interop ? _("Subtitle files (.xml)|*.xml") : _("Subtitle files (.mxf)|*.mxf");
@@ -67,13 +67,13 @@ ExportSubtitlesDialog::ExportSubtitlesDialog (wxWindow* parent, int reels, bool
_dir_label = new wxStaticText(this, wxID_ANY, (_("Output folder")));
sizer->Add(_dir_label, wxGBPosition(r, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
- _dir = new DirPickerCtrl (this);
+ _dir = new DirPickerCtrl(this);
sizer->Add(_dir, wxGBPosition(r, 1));
_split_reels->bind(&ExportSubtitlesDialog::setup_sensitivity, this);
_include_font->bind(&ExportSubtitlesDialog::setup_sensitivity, this);
- _file->Bind (wxEVT_FILEPICKER_CHANGED, bind(&ExportSubtitlesDialog::setup_sensitivity, this));
- _dir->Bind (wxEVT_DIRPICKER_CHANGED, bind(&ExportSubtitlesDialog::setup_sensitivity, this));
+ _file->Bind(wxEVT_FILEPICKER_CHANGED, bind(&ExportSubtitlesDialog::setup_sensitivity, this));
+ _dir->Bind(wxEVT_DIRPICKER_CHANGED, bind(&ExportSubtitlesDialog::setup_sensitivity, this));
auto overall_sizer = new wxBoxSizer(wxVERTICAL);
overall_sizer->Add(sizer, 1, wxALL, DCPOMATIC_DIALOG_BORDER);
@@ -84,22 +84,22 @@ ExportSubtitlesDialog::ExportSubtitlesDialog (wxWindow* parent, int reels, bool
}
SetSizerAndFit(overall_sizer);
- setup_sensitivity ();
+ setup_sensitivity();
}
void
-ExportSubtitlesDialog::setup_sensitivity ()
+ExportSubtitlesDialog::setup_sensitivity()
{
bool const multi = split_reels() || (_interop && _include_font->GetValue());
- _file_label->Enable (!multi);
- _file->Enable (!multi);
- _dir_label->Enable (multi);
- _dir->Enable (multi);
-
- wxButton* ok = dynamic_cast<wxButton *> (FindWindowById(wxID_OK, this));
- DCPOMATIC_ASSERT (ok);
- ok->Enable (path().is_absolute());
+ _file_label->Enable(!multi);
+ _file->Enable(!multi);
+ _dir_label->Enable(multi);
+ _dir->Enable(multi);
+
+ wxButton* ok = dynamic_cast<wxButton *>(FindWindowById(wxID_OK, this));
+ DCPOMATIC_ASSERT(ok);
+ ok->Enable(path().is_absolute());
}
@@ -107,7 +107,7 @@ ExportSubtitlesDialog::setup_sensitivity ()
* a full path to a directory.
*/
boost::filesystem::path
-ExportSubtitlesDialog::path () const
+ExportSubtitlesDialog::path() const
{
if (_file->IsEnabled()) {
if (auto path = _file->path()) {
@@ -117,19 +117,19 @@ ExportSubtitlesDialog::path () const
}
}
- return wx_to_std (_dir->GetPath());
+ return wx_to_std(_dir->GetPath());
}
bool
-ExportSubtitlesDialog::split_reels () const
+ExportSubtitlesDialog::split_reels() const
{
- return _split_reels->GetValue ();
+ return _split_reels->GetValue();
}
bool
-ExportSubtitlesDialog::include_font () const
+ExportSubtitlesDialog::include_font() const
{
return !_interop || _include_font->GetValue();
}
diff --git a/src/wx/export_subtitles_dialog.h b/src/wx/export_subtitles_dialog.h
index 52170418e..282c8884e 100644
--- a/src/wx/export_subtitles_dialog.h
+++ b/src/wx/export_subtitles_dialog.h
@@ -34,14 +34,14 @@ class FilePickerCtrl;
class ExportSubtitlesDialog : public wxDialog
{
public:
- ExportSubtitlesDialog (wxWindow* parent, int reels, bool interop);
+ ExportSubtitlesDialog(wxWindow* parent, int reels, bool interop);
- boost::filesystem::path path () const;
- bool split_reels () const;
- bool include_font () const;
+ boost::filesystem::path path() const;
+ bool split_reels() const;
+ bool include_font() const;
private:
- void setup_sensitivity ();
+ void setup_sensitivity();
bool _interop;
CheckBox* _split_reels;