#include "lib/compose.hpp"
#include "lib/config.h"
#include "lib/content_factory.h"
+#include "lib/cross.h"
#include "lib/dcp_content.h"
#include "lib/dcpomatic_log.h"
#include "lib/ffmpeg_content.h"
using std::exception;
using std::list;
using std::make_shared;
-using std::max;
using std::shared_ptr;
using std::string;
using std::vector;
_timing_panel = new TimingPanel (this, _film_viewer);
_notebook->AddPage (_timing_panel, _("Timing"), false);
+ _timing_panel->create ();
_content->Bind (wxEVT_LIST_ITEM_SELECTED, boost::bind (&ContentPanel::item_selected, this));
_content->Bind (wxEVT_LIST_ITEM_DESELECTED, boost::bind (&ContentPanel::item_deselected, this));
if (have_video && !_video_panel) {
_video_panel = new VideoPanel (this);
_notebook->InsertPage (off, _video_panel, _video_panel->name());
+ _video_panel->create ();
} else if (!have_video && _video_panel) {
_notebook->DeletePage (off);
_video_panel = 0;
if (have_audio && !_audio_panel) {
_audio_panel = new AudioPanel (this);
_notebook->InsertPage (off, _audio_panel, _audio_panel->name());
+ _audio_panel->create ();
} else if (!have_audio && _audio_panel) {
_notebook->DeletePage (off);
_audio_panel = 0;
if (have_text[i] && !_text_panel[i]) {
_text_panel[i] = new TextPanel (this, static_cast<TextType>(i));
_notebook->InsertPage (off, _text_panel[i], _text_panel[i]->name());
+ _text_panel[i]->create ();
} else if (!have_text[i] && _text_panel[i]) {
_notebook->DeletePage (off);
_text_panel[i] = 0;
return;
}
+ auto path = Config::instance()->add_files_path();
+
/* The wxFD_CHANGE_DIR here prevents a `could not set working directory' error 123 on Windows when using
non-Latin filenames or paths.
*/
auto d = new wxFileDialog (
_splitter,
_("Choose a file or files"),
- wxT (""),
+ std_to_wx(path ? path->string() : home_directory().string()),
wxT (""),
wxT ("All files|*.*|Subtitle files|*.srt;*.xml|Audio files|*.wav;*.w64;*.flac;*.aif;*.aiff"),
wxFD_MULTIPLE | wxFD_CHANGE_DIR
}
add_files (path_list);
+ if (!path_list.empty()) {
+ Config::instance()->set_add_files_path(path_list[0].parent_path());
+ }
+
d->Destroy ();
}