set_menu_sensitivity ();
- _film_editor->FileChanged.connect (bind (&DOMFrame::file_changed, this, _1));
_film_editor->content_panel()->SelectionChanged.connect (boost::bind (&DOMFrame::set_menu_sensitivity, this));
- file_changed ("");
+ set_title ();
JobManager::instance()->ActiveJobsChanged.connect (boost::bind (&DOMFrame::set_menu_sensitivity, this));
_film->Message.connect (boost::bind(&DOMFrame::film_message, this, _1));
dcpomatic_log = _film->log ();
}
+ set_title ();
}
shared_ptr<Film> film () const {
}
}
- void file_changed (boost::filesystem::path f)
- {
- auto s = wx_to_std(_("DCP-o-matic"));
- if (!f.empty ()) {
- s += " - " + f.string ();
- }
-
- SetTitle (std_to_wx (s));
- }
-
void file_new ()
{
auto d = new FilmNameLocationDialog (this, _("New Film"), true);
d->Destroy();
}
+ void set_title ()
+ {
+ auto s = wx_to_std(_("DCP-o-matic"));
+ if (_film && _film->directory()) {
+ s += " - " + _film->directory()->string();
+ }
+
+ SetTitle (std_to_wx(s));
+ }
+
FilmEditor* _film_editor;
std::shared_ptr<FilmViewer> _film_viewer;
StandardControls* _controls;
_dcp_panel->set_film (_film);
if (!_film) {
- FileChanged ("");
return;
}
_film->Change.connect (bind(&FilmEditor::film_change, this, _1, _2));
_film->ContentChange.connect (bind(&FilmEditor::film_content_change, this, _1, _3));
- if (_film->directory()) {
- FileChanged (_film->directory().get());
- } else {
- FileChanged ("");
- }
-
if (!_film->content().empty()) {
_content_panel->set_selection (_film->content().front());
}