AudioDialog does not need explicit playlist.
authorCarl Hetherington <cth@carlh.net>
Wed, 17 Jun 2015 15:14:48 +0000 (16:14 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 17 Jun 2015 15:14:48 +0000 (16:14 +0100)
src/wx/audio_dialog.cc
src/wx/audio_dialog.h
src/wx/dcp_panel.cc

index 37bdfa2..26c12aa 100644 (file)
@@ -23,8 +23,8 @@
 #include "lib/audio_analysis.h"
 #include "lib/film.h"
 #include "lib/analyse_audio_job.h"
+#include "lib/audio_content.h"
 #include "lib/job_manager.h"
-#include "lib/playlist.h"
 #include <boost/filesystem.hpp>
 
 using boost::shared_ptr;
@@ -106,14 +106,8 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film)
        SetSizer (overall_sizer);
        overall_sizer->Layout ();
        overall_sizer->SetSizeHints (this);
-}
 
-void
-AudioDialog::set_playlist (shared_ptr<const Playlist> p)
-{
-       _playlist_connection.disconnect ();
-       _playlist = p;
-       _playlist_connection = _playlist->ContentChanged.connect (boost::bind (&AudioDialog::try_to_load_analysis, this));
+       _film_connection = film->ContentChanged.connect (boost::bind (&AudioDialog::try_to_load_analysis, this));
        try_to_load_analysis ();
        SetTitle (_("DCP-o-matic audio"));
 }
index b6cc412..3c2d4f6 100644 (file)
@@ -31,8 +31,6 @@ class AudioDialog : public wxDialog
 public:
        AudioDialog (wxWindow *, boost::shared_ptr<Film> film);
 
-       void set_playlist (boost::shared_ptr<const Playlist>);
-
 private:
        void content_changed (int);
        void channel_clicked (wxCommandEvent &);
@@ -42,7 +40,6 @@ private:
        void analysis_finished ();
        void setup_peak_time ();
 
-       boost::shared_ptr<const Playlist> _playlist;
        boost::shared_ptr<AudioAnalysis> _analysis;
        boost::weak_ptr<Film> _film;
        AudioPlot* _plot;
@@ -50,6 +47,6 @@ private:
        wxCheckBox* _channel_checkbox[MAX_DCP_AUDIO_CHANNELS];
        wxCheckBox* _type_checkbox[AudioPoint::COUNT];
        wxSlider* _smoothing;
-       boost::signals2::scoped_connection _playlist_connection;
+       boost::signals2::scoped_connection _film_connection;
        boost::signals2::scoped_connection _analysis_finished_connection;
 };
index 2829d88..0a7f3c8 100644 (file)
@@ -753,5 +753,4 @@ DCPPanel::show_audio_clicked ()
        
        AudioDialog* d = new AudioDialog (_panel, _film);
        d->Show ();
-       d->set_playlist (_film->playlist ());
 }