diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-16 15:18:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-04-29 01:44:15 +0200 |
| commit | 3cbc5434edfd0eff96d4e25313d1dfcde478070c (patch) | |
| tree | 69b3d64de7714edc5e1c477766a2629eb8b0a75e /src/tools | |
| parent | 9b7a360f05b5074b1a13bf329416e1f86eb27f9d (diff) | |
Set window title based on the directory from Film.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 1ea9ab63b..a14a27343 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -368,9 +368,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)); @@ -498,6 +497,7 @@ public: _film->Message.connect (boost::bind(&DOMFrame::film_message, this, _1)); dcpomatic_log = _film->log (); } + set_title (); } shared_ptr<Film> film () const { @@ -526,16 +526,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); @@ -1535,6 +1525,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<FilmViewer> _film_viewer; StandardControls* _controls; |
