Remove some debug code.
[dcpomatic.git] / src / wx / timeline_dialog.cc
index aef66d8032fde91e3671aae5eeb138501dfe75c8..36ca0ff7b7213c5d4c6ef47931a3ffb4b6df40d9 100644 (file)
@@ -32,7 +32,21 @@ using std::cout;
 using boost::shared_ptr;
 
 TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr<Film> film)
-       : wxDialog (cp->panel(), wxID_ANY, _("Timeline"), wxDefaultPosition, wxSize (640, 512), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE)
+       : wxDialog (
+               cp->panel(),
+               wxID_ANY,
+               _("Timeline"),
+               wxDefaultPosition,
+               wxSize (640, 512),
+#ifdef DCPOMATIC_OSX
+               /* I can't get wxFRAME_FLOAT_ON_PARENT to work on OS X, and although wxSTAY_ON_TOP keeps
+                  the window above all others (and not just our own) it's better than nothing for now.
+               */
+               wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxSTAY_ON_TOP
+#else
+               wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxFRAME_FLOAT_ON_PARENT
+#endif
+               )
        , _film (film)
        , _timeline (this, cp, film)
 {
@@ -59,9 +73,9 @@ TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr<Film> film)
        sizer->SetSizeHints (this);
 
        _snap->SetValue (_timeline.snap ());
-       _snap->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&TimelineDialog::snap_toggled, this));
+       _snap->Bind (wxEVT_CHECKBOX, boost::bind (&TimelineDialog::snap_toggled, this));
        film_changed (Film::SEQUENCE);
-       _sequence->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&TimelineDialog::sequence_toggled, this));
+       _sequence->Bind (wxEVT_CHECKBOX, boost::bind (&TimelineDialog::sequence_toggled, this));
 
        _film_changed_connection = film->Changed.connect (bind (&TimelineDialog::film_changed, this, _1));
 }