Cleanup: move some methods from util to maths_util.
[dcpomatic.git] / src / wx / audio_dialog.cc
index f4b4b2577c67b97f85e702f55f584f030ee54cfc..c64f64e31eb4104ce612f9ca24cd98d3212b66f1 100644 (file)
@@ -18,6 +18,7 @@
 
 */
 
+
 #include "audio_dialog.h"
 #include "audio_plot.h"
 #include "check_box.h"
 #include "lib/audio_content.h"
 #include "lib/film.h"
 #include "lib/job_manager.h"
+#include "lib/maths_util.h"
 #include <libxml++/libxml++.h>
 #include <boost/filesystem.hpp>
 #include <iostream>
 
+
 using std::cout;
 using std::list;
 using std::make_shared;
@@ -48,6 +51,7 @@ using namespace dcpomatic;
 using namespace boost::placeholders;
 #endif
 
+
 /** @param parent Parent window.
  *  @param film Film we are using.
  *  @param content Content to analyse, or 0 to analyse all of the film's audio.
@@ -161,7 +165,11 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film, weak_ptr<Film
        _film_connection = film->Change.connect (boost::bind(&AudioDialog::film_change, this, _1, _2));
        _film_content_connection = film->ContentChange.connect(boost::bind(&AudioDialog::content_change, this, _1, _3));
        DCPOMATIC_ASSERT (film->directory());
-       SetTitle(wxString::Format(_("DCP-o-matic audio - %s"), std_to_wx(film->directory().get().string())));
+       if (content) {
+               SetTitle(wxString::Format(_("DCP-o-matic audio - %s"), std_to_wx(content->path(0).string())));
+       } else {
+               SetTitle(wxString::Format(_("DCP-o-matic audio - %s"), std_to_wx(film->directory().get().string())));
+       }
 
        if (content) {
                _playlist = make_shared<Playlist>();