summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-03-17 12:24:02 +0100
committerCarl Hetherington <cth@carlh.net>2024-03-17 12:45:46 +0100
commit45fc375d656e99218ca8ec3281aa2605e148b521 (patch)
tree486d81831f859c7ccc1d779b20e8f451e7cb6375 /src
parentb2591c6a9104eb9368f51f020834aef7713acf29 (diff)
Add PlaylistEditorRestrictedMenus option, similar to PlayerRestrictedMenus.
Diffstat (limited to 'src')
-rw-r--r--src/lib/config.cc6
-rw-r--r--src/lib/config.h5
-rw-r--r--src/tools/dcpomatic_playlist.cc10
3 files changed, 18 insertions, 3 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 56870145a..160ef7645 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -178,6 +178,7 @@ Config::set_defaults ()
_gdc_password = optional<string>();
_player_mode = PLAYER_MODE_WINDOW;
_player_restricted_menus = false;
+ _playlist_editor_restricted_menus = false;
_image_display = 0;
_video_view_type = VIDEO_VIEW_SIMPLE;
_respect_kdm_validity_periods = true;
@@ -594,6 +595,7 @@ try
}
_player_restricted_menus = f.optional_bool_child("PlayerRestrictedMenus").get_value_or(false);
+ _playlist_editor_restricted_menus = f.optional_bool_child("PlaylistEditorRestrictedMenus").get_value_or(false);
_image_display = f.optional_number_child<int>("ImageDisplay").get_value_or(0);
auto vc = f.optional_string_child("VideoViewType");
@@ -1082,6 +1084,10 @@ Config::write_config () const
root->add_child("PlayerRestrictedMenus")->add_child_text("1");
}
+ if (_playlist_editor_restricted_menus) {
+ root->add_child("PlaylistEditorRestrictedMenus")->add_child_text("1");
+ }
+
/* [XML] ImageDisplay Screen number to put image on in dual-screen player mode. */
root->add_child("ImageDisplay")->add_child_text(raw_convert<string>(_image_display));
switch (_video_view_type) {
diff --git a/src/lib/config.h b/src/lib/config.h
index a63830552..ec804c9bf 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -538,6 +538,10 @@ public:
return _player_restricted_menus;
}
+ bool playlist_editor_restricted_menus() const {
+ return _playlist_editor_restricted_menus;
+ }
+
int image_display () const {
return _image_display;
}
@@ -1454,6 +1458,7 @@ private:
boost::optional<std::string> _gdc_password;
PlayerMode _player_mode;
bool _player_restricted_menus = false;
+ bool _playlist_editor_restricted_menus = false;
int _image_display;
VideoViewType _video_view_type;
bool _respect_kdm_validity_periods;
diff --git a/src/tools/dcpomatic_playlist.cc b/src/tools/dcpomatic_playlist.cc
index d092ca513..b16a2be68 100644
--- a/src/tools/dcpomatic_playlist.cc
+++ b/src/tools/dcpomatic_playlist.cc
@@ -572,7 +572,9 @@ private:
/* These just need to be appended somewhere, it seems - they magically
* get moved to the right place.
*/
- help->Append(wxID_PREFERENCES, _("&Preferences...\tCtrl-,"));
+ if (!Config::instance()->playlist_editor_restricted_menus()) {
+ help->Append(wxID_PREFERENCES, _("&Preferences...\tCtrl-,"));
+ }
help->Append(wxID_EXIT, _("&Exit"));
help->Append(wxID_ABOUT, _("About DCP-o-matic"));
@@ -588,8 +590,10 @@ private:
help->Append(wxID_ABOUT, _("About"));
m->Append(file, _("&File"));
- m->Append(edit, _("&Edit"));
- m->Append(help, _("&Help"));
+ if (!Config::instance()->playlist_editor_restricted_menus()) {
+ m->Append(edit, _("&Edit"));
+ m->Append(help, _("&Help"));
+ }
#endif
}