Tidy and fix logging.
[dcpomatic.git] / src / wx / content_panel.cc
index 04e35c7582ac7051c793ee643d2c8a593bac3bda..89690a5d0f6be9b0554efdcff2708187bc3fbd3c 100644 (file)
@@ -41,6 +41,7 @@
 #include "lib/compose.hpp"
 #include "lib/string_text_file_content.h"
 #include "lib/string_text_file.h"
+#include "lib/dcpomatic_log.h"
 #include <wx/wx.h>
 #include <wx/notebook.h>
 #include <wx/listctrl.h>
@@ -59,8 +60,6 @@ using boost::weak_ptr;
 using boost::dynamic_pointer_cast;
 using boost::optional;
 
-#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL);
-
 ContentPanel::ContentPanel (wxNotebook* n, shared_ptr<Film> film, weak_ptr<FilmViewer> viewer)
        : _video_panel (0)
        , _audio_panel (0)
@@ -304,7 +303,7 @@ ContentPanel::check_selection ()
        if (go_to && Config::instance()->jump_to_selected() && signal_manager) {
                shared_ptr<FilmViewer> fv = _film_viewer.lock ();
                DCPOMATIC_ASSERT (fv);
-               signal_manager->when_idle(boost::bind(&FilmViewer::set_position, fv.get(), go_to.get().ceil(_film->video_frame_rate())));
+               signal_manager->when_idle(boost::bind(&FilmViewer::seek, fv.get(), go_to.get().ceil(_film->video_frame_rate()), true));
        }
 
        if (_timeline_dialog) {
@@ -450,7 +449,7 @@ ContentPanel::add_folder_clicked ()
        list<shared_ptr<Content> > content;
 
        try {
-               content = content_factory (_film, path);
+               content = content_factory (path);
        } catch (exception& e) {
                error_dialog (_parent, e.what());
                return;
@@ -493,7 +492,7 @@ ContentPanel::add_dcp_clicked ()
        }
 
        try {
-               _film->examine_and_add_content (shared_ptr<Content> (new DCPContent (_film, path)));
+               _film->examine_and_add_content (shared_ptr<Content> (new DCPContent (path)));
        } catch (exception& e) {
                error_dialog (_parent, e.what());
        }
@@ -755,7 +754,7 @@ ContentPanel::add_files (list<boost::filesystem::path> paths)
 
        try {
                BOOST_FOREACH (boost::filesystem::path i, paths) {
-                       BOOST_FOREACH (shared_ptr<Content> j, content_factory (_film, i)) {
+                       BOOST_FOREACH (shared_ptr<Content> j, content_factory(i)) {
                                _film->examine_and_add_content (j);
                        }
                }