summaryrefslogtreecommitdiff
path: root/src/wx/markers_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-01-15 21:42:37 +0100
committerCarl Hetherington <cth@carlh.net>2022-04-29 01:09:39 +0200
commit7861a2f4fe15952d43323a64284afd71427d09f4 (patch)
treeabaf0f1129998500d561a12dd944e400432d8269 /src/wx/markers_dialog.cc
parent78ca79cde19db630b1abfe8f00f49e87bb7e4068 (diff)
Extract marker strings out to a separate method.
Diffstat (limited to 'src/wx/markers_dialog.cc')
-rw-r--r--src/wx/markers_dialog.cc14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/wx/markers_dialog.cc b/src/wx/markers_dialog.cc
index ed0b68c8f..2e4dc42c5 100644
--- a/src/wx/markers_dialog.cc
+++ b/src/wx/markers_dialog.cc
@@ -22,6 +22,7 @@
#include "check_box.h"
#include "dcpomatic_button.h"
#include "film_viewer.h"
+#include "markers.h"
#include "markers_dialog.h"
#include "static_text.h"
#include "timecode.h"
@@ -131,16 +132,9 @@ MarkersDialog::MarkersDialog (wxWindow* parent, weak_ptr<Film> film, weak_ptr<Fi
auto grid = new wxGridBagSizer (DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
int r = 0;
- _markers.push_back (make_shared<Marker>(this, grid, r++, film, viewer, _("First frame of composition"), dcp::Marker::FFOC));
- _markers.push_back (make_shared<Marker>(this, grid, r++, film, viewer, _("Last frame of composition"), dcp::Marker::LFOC));
- _markers.push_back (make_shared<Marker>(this, grid, r++, film, viewer, _("First frame of title credits"), dcp::Marker::FFTC));
- _markers.push_back (make_shared<Marker>(this, grid, r++, film, viewer, _("Last frame of title credits"), dcp::Marker::LFTC));
- _markers.push_back (make_shared<Marker>(this, grid, r++, film, viewer, _("First frame of intermission"), dcp::Marker::FFOI));
- _markers.push_back (make_shared<Marker>(this, grid, r++, film, viewer, _("Last frame of intermission"), dcp::Marker::LFOI));
- _markers.push_back (make_shared<Marker>(this, grid, r++, film, viewer, _("First frame of end credits"), dcp::Marker::FFEC));
- _markers.push_back (make_shared<Marker>(this, grid, r++, film, viewer, _("Last frame of end credits"), dcp::Marker::LFEC));
- _markers.push_back (make_shared<Marker>(this, grid, r++, film, viewer, _("First frame of moving credits"), dcp::Marker::FFMC));
- _markers.push_back (make_shared<Marker>(this, grid, r++, film, viewer, _("Last frame of moving credits"), dcp::Marker::LFMC));
+ for (auto const& marker: all_markers()) {
+ _markers.push_back (make_shared<Marker>(this, grid, r++, film, viewer, marker.first, marker.second));
+ }
sizer->Add (grid, 0, wxALL, 8);