summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-04-08 23:55:43 +0200
committerCarl Hetherington <cth@carlh.net>2026-04-08 23:55:43 +0200
commitce9a066e9a02deccad9235a665e2b5fa1512dd6a (patch)
treefc34c9fddf204634ccbc8e99e661511cab4f6a01
parente85a966df4087d451f7e4e1810f4076bb5e81603 (diff)
White space: kdm_dialog.{cc,h}
-rw-r--r--src/wx/kdm_dialog.cc114
-rw-r--r--src/wx/kdm_dialog.h8
2 files changed, 61 insertions, 61 deletions
diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc
index 97aa835c6..11b2901b9 100644
--- a/src/wx/kdm_dialog.cc
+++ b/src/wx/kdm_dialog.cc
@@ -63,80 +63,80 @@ using namespace boost::placeholders;
#endif
-KDMDialog::KDMDialog (wxWindow* parent, shared_ptr<const Film> film)
- : wxDialog (parent, wxID_ANY, _("Make KDMs"))
- , _film (film)
+KDMDialog::KDMDialog(wxWindow* parent, shared_ptr<const Film> film)
+ : wxDialog(parent, wxID_ANY, _("Make KDMs"))
+ , _film(film)
{
/* Main sizers */
- auto horizontal = new wxBoxSizer (wxHORIZONTAL);
- auto left = new wxBoxSizer (wxVERTICAL);
- auto right = new wxBoxSizer (wxVERTICAL);
+ auto horizontal = new wxBoxSizer(wxHORIZONTAL);
+ auto left = new wxBoxSizer(wxVERTICAL);
+ auto right = new wxBoxSizer(wxVERTICAL);
- horizontal->Add (left, 1, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_X_GAP * 4);
- horizontal->Add (right, 1, wxEXPAND);
+ horizontal->Add(left, 1, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_X_GAP * 4);
+ horizontal->Add(right, 1, wxEXPAND);
/* Font for sub-headings */
- wxFont subheading_font (*wxNORMAL_FONT);
- subheading_font.SetWeight (wxFONTWEIGHT_BOLD);
+ wxFont subheading_font(*wxNORMAL_FONT);
+ subheading_font.SetWeight(wxFONTWEIGHT_BOLD);
/* Sub-heading: Screens */
- auto h = new StaticText (this, _("Screens"));
- h->SetFont (subheading_font);
- left->Add (h, 0, wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
- _screens = new ScreensPanel (this);
- left->Add (_screens, 1, wxEXPAND | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
+ auto h = new StaticText(this, _("Screens"));
+ h->SetFont(subheading_font);
+ left->Add(h, 0, wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
+ _screens = new ScreensPanel(this);
+ left->Add(_screens, 1, wxEXPAND | wxBOTTOM, DCPOMATIC_SIZER_Y_GAP);
/* Sub-heading: Timing */
/// TRANSLATORS: translate the word "Timing" here; do not include the "KDM|" prefix
- h = new StaticText (this, S_("KDM|Timing"));
- h->SetFont (subheading_font);
- right->Add (h);
- _timing = new KDMTimingPanel (this);
- right->Add (_timing);
+ h = new StaticText(this, S_("KDM|Timing"));
+ h->SetFont(subheading_font);
+ right->Add(h);
+ _timing = new KDMTimingPanel(this);
+ right->Add(_timing);
/* Sub-heading: CPL */
- h = new StaticText (this, _("CPL"));
- h->SetFont (subheading_font);
- right->Add (h);
+ h = new StaticText(this, _("CPL"));
+ h->SetFont(subheading_font);
+ right->Add(h);
vector<dcp::CPLSummary> cpls;
for (auto const& i: film->cpls()) {
if (i.encrypted) {
- cpls.push_back (i);
+ cpls.push_back(i);
}
}
- _cpl = new KDMCPLPanel (this, cpls);
- right->Add (_cpl, 0, wxEXPAND);
+ _cpl = new KDMCPLPanel(this, cpls);
+ right->Add(_cpl, 0, wxEXPAND);
/* Sub-heading: Output */
- h = new StaticText (this, _("Output"));
- h->SetFont (subheading_font);
+ h = new StaticText(this, _("Output"));
+ h->SetFont(subheading_font);
right->Add(h, 0, wxTOP, DCPOMATIC_SUBHEADING_TOP_PAD);
_output = new TallKDMOutputPanel(this);
- right->Add (_output, 0, wxEXPAND | wxTOP, DCPOMATIC_SIZER_GAP);
+ right->Add(_output, 0, wxEXPAND | wxTOP, DCPOMATIC_SIZER_GAP);
- _make = new Button (this, _("Make KDMs"));
- right->Add (_make, 0, wxTOP | wxBOTTOM, DCPOMATIC_SIZER_GAP);
+ _make = new Button(this, _("Make KDMs"));
+ right->Add(_make, 0, wxTOP | wxBOTTOM, DCPOMATIC_SIZER_GAP);
/* Make an overall sizer to get a nice border */
- auto overall_sizer = new wxBoxSizer (wxVERTICAL);
- overall_sizer->Add (horizontal, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER);
+ auto overall_sizer = new wxBoxSizer(wxVERTICAL);
+ overall_sizer->Add(horizontal, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, DCPOMATIC_DIALOG_BORDER);
/* Bind */
_screens->ScreensChanged.connect(boost::bind(&KDMDialog::screens_changed, this));
- _timing->TimingChanged.connect (boost::bind (&KDMDialog::setup_sensitivity, this));
- _make->Bind (wxEVT_BUTTON, boost::bind (&KDMDialog::make_clicked, this));
+ _timing->TimingChanged.connect(boost::bind(&KDMDialog::setup_sensitivity, this));
+ _make->Bind(wxEVT_BUTTON, boost::bind(&KDMDialog::make_clicked, this));
_cpl->Changed.connect(boost::bind(&KDMDialog::cpl_changed, this));
cpl_changed();
- setup_sensitivity ();
+ setup_sensitivity();
- SetSizer (overall_sizer);
- overall_sizer->Layout ();
- overall_sizer->SetSizeHints (this);
+ SetSizer(overall_sizer);
+ overall_sizer->Layout();
+ overall_sizer->SetSizeHints(this);
}
@@ -162,29 +162,29 @@ KDMDialog::cpl_changed()
void
-KDMDialog::setup_sensitivity ()
+KDMDialog::setup_sensitivity()
{
- _screens->setup_sensitivity ();
- _output->setup_sensitivity ();
- _make->Enable (!_screens->screens().empty() && _timing->valid() && _cpl->has_selected());
+ _screens->setup_sensitivity();
+ _output->setup_sensitivity();
+ _make->Enable(!_screens->screens().empty() && _timing->valid() && _cpl->has_selected());
}
bool
-KDMDialog::confirm_overwrite (boost::filesystem::path path)
+KDMDialog::confirm_overwrite(boost::filesystem::path path)
{
- return confirm_dialog (
+ return confirm_dialog(
this,
- wxString::Format (_("File %s already exists. Do you want to overwrite it?"), std_to_wx(path.string()).data())
+ wxString::Format(_("File %s already exists. Do you want to overwrite it?"), std_to_wx(path.string()).data())
);
}
void
-KDMDialog::make_clicked ()
+KDMDialog::make_clicked()
{
- auto film = _film.lock ();
- DCPOMATIC_ASSERT (film);
+ auto film = _film.lock();
+ DCPOMATIC_ASSERT(film);
list<KDMWithMetadataPtr> kdms;
try {
@@ -200,7 +200,7 @@ KDMDialog::make_clicked ()
vector<KDMCertificatePeriod> period_checks;
- std::function<dcp::DecryptedKDM (dcp::LocalTime, dcp::LocalTime)> make_kdm = [film, this](dcp::LocalTime begin, dcp::LocalTime end) {
+ std::function<dcp::DecryptedKDM(dcp::LocalTime, dcp::LocalTime)> make_kdm = [film, this](dcp::LocalTime begin, dcp::LocalTime end) {
return film->make_kdm(_cpl->cpl(), begin, end);
};
@@ -220,7 +220,7 @@ KDMDialog::make_clicked ()
period_checks
);
if (p) {
- kdms.push_back (p);
+ kdms.push_back(p);
}
}
@@ -238,7 +238,7 @@ KDMDialog::make_clicked ()
} catch (dcp::BadKDMDateError& e) {
if (e.starts_too_early()) {
- error_dialog (this, _("The KDM start period is before (or close to) the start of the signing certificate's validity period. Use a later start time for this KDM."));
+ error_dialog(this, _("The KDM start period is before (or close to) the start of the signing certificate's validity period. Use a later start time for this KDM."));
} else {
error_dialog(
this,
@@ -250,21 +250,21 @@ KDMDialog::make_clicked ()
}
return;
} catch (runtime_error& e) {
- error_dialog (this, std_to_wx(e.what()));
+ error_dialog(this, std_to_wx(e.what()));
return;
}
- auto result = _output->make(kdms, film->dcp_name(), bind (&KDMDialog::confirm_overwrite, this, _1));
+ auto result = _output->make(kdms, film->dcp_name(), bind(&KDMDialog::confirm_overwrite, this, _1));
if (result.first) {
- JobManager::instance()->add (result.first);
+ JobManager::instance()->add(result.first);
}
if (result.second > 0) {
/* XXX: proper plural form support in wxWidgets? */
wxString s = result.second == 1 ? _("%d KDM written to %s") : _("%d KDMs written to %s");
- message_dialog (
+ message_dialog(
this,
- wxString::Format (s, result.second, std_to_wx(_output->directory().string()).data())
+ wxString::Format(s, result.second, std_to_wx(_output->directory().string()).data())
);
}
}
diff --git a/src/wx/kdm_dialog.h b/src/wx/kdm_dialog.h
index b6e4b7604..168fb2544 100644
--- a/src/wx/kdm_dialog.h
+++ b/src/wx/kdm_dialog.h
@@ -44,12 +44,12 @@ class ScreensPanel;
class KDMDialog : public wxDialog
{
public:
- KDMDialog (wxWindow *, std::shared_ptr<const Film> film);
+ KDMDialog(wxWindow *, std::shared_ptr<const Film> film);
private:
- void setup_sensitivity ();
- void make_clicked ();
- bool confirm_overwrite (boost::filesystem::path path);
+ void setup_sensitivity();
+ void make_clicked();
+ bool confirm_overwrite(boost::filesystem::path path);
void cpl_changed();
void screens_changed();