summaryrefslogtreecommitdiff
path: root/src/lib/release_notes.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-07-07 15:21:19 +0200
committerCarl Hetherington <cth@carlh.net>2022-07-20 10:38:17 +0200
commitf706bbb9afd10472e81a051cd5db601d6404377c (patch)
treee55e0c1c72d71c1eec008f3527757293c942c9b7 /src/lib/release_notes.cc
parent704bc0f8be05ddca94a3853a6e112f22f8f2df70 (diff)
Basic release notes support (#2282).
Diffstat (limited to 'src/lib/release_notes.cc')
-rw-r--r--src/lib/release_notes.cc55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/lib/release_notes.cc b/src/lib/release_notes.cc
new file mode 100644
index 000000000..b1eb95257
--- /dev/null
+++ b/src/lib/release_notes.cc
@@ -0,0 +1,55 @@
+/*
+ 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 {};
+}