projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tidy and fix logging.
[dcpomatic.git]
/
src
/
wx
/
content_panel.cc
diff --git
a/src/wx/content_panel.cc
b/src/wx/content_panel.cc
index 4e6cdb2f20b8295be89904eb848aa5fb9df0aa76..89690a5d0f6be9b0554efdcff2708187bc3fbd3c 100644
(file)
--- a/
src/wx/content_panel.cc
+++ b/
src/wx/content_panel.cc
@@
-41,6
+41,7
@@
#include "lib/compose.hpp"
#include "lib/string_text_file_content.h"
#include "lib/string_text_file.h"
#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>
#include <wx/wx.h>
#include <wx/notebook.h>
#include <wx/listctrl.h>
@@
-59,9
+60,7
@@
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
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, boost::shared_ptr<Film> film, FilmViewer* viewer)
+ContentPanel::ContentPanel (wxNotebook* n, shared_ptr<Film> film, weak_ptr<FilmViewer> viewer)
: _video_panel (0)
, _audio_panel (0)
, _timeline_dialog (0)
: _video_panel (0)
, _audio_panel (0)
, _timeline_dialog (0)
@@
-302,7
+301,9
@@
ContentPanel::check_selection ()
}
if (go_to && Config::instance()->jump_to_selected() && signal_manager) {
}
if (go_to && Config::instance()->jump_to_selected() && signal_manager) {
- signal_manager->when_idle(boost::bind(&FilmViewer::set_position, _film_viewer, go_to.get().ceil(_film->video_frame_rate())));
+ shared_ptr<FilmViewer> fv = _film_viewer.lock ();
+ DCPOMATIC_ASSERT (fv);
+ signal_manager->when_idle(boost::bind(&FilmViewer::seek, fv.get(), go_to.get().ceil(_film->video_frame_rate()), true));
}
if (_timeline_dialog) {
}
if (_timeline_dialog) {
@@
-448,7
+449,7
@@
ContentPanel::add_folder_clicked ()
list<shared_ptr<Content> > content;
try {
list<shared_ptr<Content> > content;
try {
- content = content_factory (
_film,
path);
+ content = content_factory (path);
} catch (exception& e) {
error_dialog (_parent, e.what());
return;
} catch (exception& e) {
error_dialog (_parent, e.what());
return;
@@
-491,7
+492,7
@@
ContentPanel::add_dcp_clicked ()
}
try {
}
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());
}
} catch (exception& e) {
error_dialog (_parent, e.what());
}
@@
-753,7
+754,7
@@
ContentPanel::add_files (list<boost::filesystem::path> paths)
try {
BOOST_FOREACH (boost::filesystem::path i, 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);
}
}
_film->examine_and_add_content (j);
}
}