X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic.cc;h=b7f9fcbec6605d1f883f1a01f25917ac611844e6;hp=fa61d4e1d5fa50652e3bbabddbdddf9ad2e3604a;hb=cf7b7beb82606ca9a961bb705a3e2c550808b961;hpb=b8be074080290e14b9ff7bf381f0ca0d69eee0df diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index fa61d4e1d..b7f9fcbec 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -366,9 +366,8 @@ public: 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)); @@ -495,6 +494,7 @@ public: _film->Message.connect (boost::bind(&DOMFrame::film_message, this, _1)); dcpomatic_log = _film->log (); } + set_title (); } shared_ptr film () const { @@ -523,16 +523,6 @@ private: } } - 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); @@ -1515,6 +1505,16 @@ private: 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 _film_viewer; StandardControls* _controls;