_default_kdm_type = dcp::Formulation::MODIFIED_TRANSITIONAL_1;
_default_kdm_duration = RoughDuration(1, RoughDuration::Unit::WEEKS);
_auto_crop_threshold = 0.1;
+ _last_release_notes_version = boost::none;
_allowed_dcp_frame_rates.clear ();
_allowed_dcp_frame_rates.push_back (24);
_default_kdm_duration = RoughDuration(1, RoughDuration::Unit::WEEKS);
}
_auto_crop_threshold = f.optional_number_child<double>("AutoCropThreshold").get_value_or(0.1);
+ _last_release_notes_version = f.optional_string_child("LastReleaseNotesVersion");
_export.read(f.optional_node_child("Export"));
root->add_child("EmailKDMs")->add_child_text(_email_kdms ? "1" : "0");
root->add_child("DefaultKDMType")->add_child_text(dcp::formulation_to_string(_default_kdm_type));
root->add_child("AutoCropThreshold")->add_child_text(raw_convert<string>(_auto_crop_threshold));
+ if (_last_release_notes_version) {
+ root->add_child("LastReleaseNotesVersion")->add_child_text(*_last_release_notes_version);
+ }
_export.write(root->add_child("Export"));
return _auto_crop_threshold;
}
+ boost::optional<std::string> last_release_notes_version () const {
+ return _last_release_notes_version;
+ }
+
/* SET (mostly) */
void set_master_encoding_threads (int n) {
maybe_set (_auto_crop_threshold, threshold, AUTO_CROP_THRESHOLD);
}
+ void set_last_release_notes_version (std::string version) {
+ maybe_set (_last_release_notes_version, version);
+ }
+
ExportConfig& export_config() {
return _export;
}
dcp::Formulation _default_kdm_type;
RoughDuration _default_kdm_duration;
double _auto_crop_threshold;
+ boost::optional<std::string> _last_release_notes_version;
ExportConfig _export;
--- /dev/null
+/*
+ Copyright (C) 2022 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "config.h"
+#include "release_notes.h"
+#include "version.h"
+
+#include "i18n.h"
+
+
+using std::string;
+using boost::optional;
+
+
+optional<string>
+find_release_notes()
+{
+ auto last = Config::instance()->last_release_notes_version();
+ auto current = string(dcpomatic_version);
+ if (last && *last == current) {
+ return {};
+ }
+
+ Config::instance()->set_last_release_notes_version(current);
+
+ const string header = String::compose("<h1>DCP-o-matic %1 release notes</h1>", current);
+
+ if (current == "2.16.18") {
+ return header +
+ _("In this version there are changes to the way that subtitles are positioned. "
+ "Positioning should now be more correct, with respect to the standards, but you "
+ "should check any subtitles in your project to make sure that they are placed "
+ "where you want them.");
+ }
+
+ return {};
+}
--- /dev/null
+/*
+ Copyright (C) 2022 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include <boost/optional.hpp>
+#include <string>
+
+
+extern boost::optional<std::string> find_release_notes();
ratio.cc
raw_image_proxy.cc
reel_writer.cc
+ release_notes.cc
render_text.cc
resampler.cc
rgba.cc
#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"
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)
{