Cleanup: remove some unnecessary includes.
[dcpomatic.git] / src / wx / controls.cc
index f16b494c91baef74be9120bac4f926e900c9ebbb..7cb75ef153874a5e158a56b596e9c302cd5370d1 100644 (file)
@@ -36,6 +36,7 @@
 #include "lib/job.h"
 #include "lib/job_manager.h"
 #include "lib/player_video.h"
+#include "lib/scope_guard.h"
 #include <dcp/cpl.h>
 #include <dcp/dcp.h>
 #include <dcp/reel.h>
@@ -69,10 +70,6 @@ Controls::Controls(wxWindow* parent, FilmViewer& viewer, bool editor_controls)
        , _markers (new MarkersPanel(this, viewer))
        , _slider (new wxSlider(this, wxID_ANY, 0, 0, 4096))
        , _viewer (viewer)
-       , _slider_being_moved (false)
-       , _outline_content (0)
-       , _eye (0)
-       , _jump_to_selected (0)
        , _rewind_button (new Button(this, wxT("|<")))
        , _back_button (new Button(this, wxT("<")))
        , _forward_button (new Button(this, wxT(">")))
@@ -380,22 +377,22 @@ Controls::setup_sensitivity ()
 void
 Controls::timecode_clicked ()
 {
-       auto dialog = new PlayheadToTimecodeDialog(this, _viewer.position(), _film->video_frame_rate());
+       auto dialog = make_wx<PlayheadToTimecodeDialog>(this, _viewer.position(), _film->video_frame_rate());
+
        if (dialog->ShowModal() == wxID_OK) {
                _viewer.seek(dialog->get(), true);
        }
-       dialog->Destroy ();
 }
 
 
 void
 Controls::frame_number_clicked ()
 {
-       auto dialog = new PlayheadToFrameDialog(this, _viewer.position(), _film->video_frame_rate());
+       auto dialog = make_wx<PlayheadToFrameDialog>(this, _viewer.position(), _film->video_frame_rate());
+
        if (dialog->ShowModal() == wxID_OK) {
                _viewer.seek(dialog->get(), true);
        }
-       dialog->Destroy ();
 }