X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic.cc;h=6f55b1771b88f2bbbc352520aa7c7deae10005b7;hp=a14a27343f21236399f8436c6f5e4ab451cde87d;hb=f706bbb9afd10472e81a051cd5db601d6404377c;hpb=3cbc5434edfd0eff96d4e25313d1dfcde478070c diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index a14a27343..6f55b1771 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -56,7 +56,7 @@ #include "wx/wx_util.h" #include "lib/analytics.h" #include "lib/audio_content.h" -#include "lib/check_content_change_job.h" +#include "lib/check_content_job.h" #include "lib/cinema.h" #include "lib/compose.hpp" #include "lib/config.h" @@ -78,6 +78,7 @@ #include "lib/kdm_with_metadata.h" #include "lib/log.h" #include "lib/make_dcp.h" +#include "lib/release_notes.h" #include "lib/screen.h" #include "lib/send_kdm_email_job.h" #include "lib/signal_manager.h" @@ -389,7 +390,7 @@ public: #else int accelerators = 6; #endif - auto accel = new wxAcceleratorEntry[accelerators]; + std::vector accel(accelerators); /* [Shortcut] Ctrl+A:Add file(s) to the film */ accel[0].Set (wxACCEL_CTRL, static_cast('A'), ID_add_file); /* [Shortcut] Delete:Remove selected content from film */ @@ -411,9 +412,8 @@ public: Bind (wxEVT_MENU, boost::bind (&DOMFrame::timeline_pressed, this), ID_timeline); Bind (wxEVT_MENU, boost::bind (&DOMFrame::back_frame, this), ID_back_frame); Bind (wxEVT_MENU, boost::bind (&DOMFrame::forward_frame, this), ID_forward_frame); - wxAcceleratorTable accel_table (accelerators, accel); + wxAcceleratorTable accel_table (accelerators, accel.data()); SetAcceleratorTable (accel_table); - delete[] accel; } void remove_accelerators () @@ -459,7 +459,7 @@ public: set_film (film); - JobManager::instance()->add(shared_ptr(new CheckContentChangeJob(film))); + JobManager::instance()->add(make_shared(film)); } catch (FileNotFoundError& e) { auto const dir = e.file().parent_path(); @@ -495,6 +495,7 @@ public: if (_film) { _film->Change.connect (boost::bind (&DOMFrame::film_change, this, _1)); _film->Message.connect (boost::bind(&DOMFrame::film_message, this, _1)); + _film->DirtyChange.connect (boost::bind(&DOMFrame::set_title, this)); dcpomatic_log = _film->log (); } set_title (); @@ -1528,8 +1529,13 @@ private: void set_title () { auto s = wx_to_std(_("DCP-o-matic")); - if (_film && _film->directory()) { - s += " - " + _film->directory()->string(); + if (_film) { + if (_film->directory()) { + s += " - " + _film->directory()->string(); + } + if (_film->dirty()) { + s += " *"; + } } SetTitle (std_to_wx(s)); @@ -1681,6 +1687,14 @@ private: if (Config::instance()->check_for_updates ()) { UpdateChecker::instance()->run (); } + + auto release_notes = find_release_notes(); + if (release_notes) { + auto notes = new HTMLDialog(nullptr, _("Release notes"), std_to_wx(*release_notes), true); + notes->Centre(); + notes->ShowModal(); + notes->Destroy(); + } } catch (exception& e) {