summaryrefslogtreecommitdiff
path: root/src/wx/content_menu.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-01-11 22:50:29 +0100
committerCarl Hetherington <cth@carlh.net>2024-01-11 22:50:29 +0100
commit80c463b76284aa87f892fb331877c2caf5cc2771 (patch)
tree3d278e61e102260dccd8c6a75f21b46d85c78151 /src/wx/content_menu.cc
parentfb415933fc53d55f25b46d00065fc39ffda43eb4 (diff)
Attempt to rationalise menu IDs and avoid duplicates.
Diffstat (limited to 'src/wx/content_menu.cc')
-rw-r--r--src/wx/content_menu.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc
index c0479ac83..b096ecae6 100644
--- a/src/wx/content_menu.cc
+++ b/src/wx/content_menu.cc
@@ -26,6 +26,7 @@
#include "dir_dialog.h"
#include "file_dialog.h"
#include "film_viewer.h"
+#include "id.h"
#include "repeat_dialog.h"
#include "timeline_video_content_view.h"
#include "timeline_audio_content_view.h"
@@ -74,8 +75,7 @@ using namespace dcpomatic;
enum {
- /* Start at 256 so we can have IDs on _cpl_menu from 1 to 255 */
- ID_repeat = 256,
+ ID_repeat = DCPOMATIC_CONTENT_MENU,
ID_join,
ID_find_missing,
ID_properties,
@@ -168,8 +168,7 @@ ContentMenu::popup (weak_ptr<Film> film, ContentList c, TimelineContentViewList
try {
auto cpls = dcp::find_and_resolve_cpls (dcp->directories(), true);
_choose_cpl->Enable (cpls.size() > 1);
- /* We can't have 0 as a menu item ID on OS X */
- int id = 1;
+ int id = DCPOMATIC_CPL_MENU;
for (auto i: cpls) {
auto item = _cpl_menu->AppendRadioItem (
id++,