From d4c8e395b4e51c43d15dcf8fcb2c927664440d3d Mon Sep 17 00:00:00 2001 From: Eran Ifrah Date: Wed, 29 Oct 2025 20:13:14 +0200 Subject: [PATCH] Make menu commands in stc sample usable under macOS On macOS, "Minimal editor" and "Document map" items placed in the "Window" menu didn't appear in the (standard) "Window" menu at all and so couldn't be accessed. Temporarily work around this wxOSX bug by moving them to another menu. Closes #25935. Signed-off-by: Eran Ifrah --- samples/stc/stctest.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/samples/stc/stctest.cpp b/samples/stc/stctest.cpp index 9f1a2e46d0..12bea9d14a 100644 --- a/samples/stc/stctest.cpp +++ b/samples/stc/stctest.cpp @@ -540,6 +540,9 @@ void AppFrame::CreateMenu () menuView->AppendCheckItem (myID_WHITESPACE, _("Show white&space")); menuView->AppendSeparator(); menuView->Append (myID_USECHARSET, _("Use &code page of .."), menuCharset); + menuView->AppendSeparator(); + menuView->Append(myID_WINDOW_MINIMAL, _("&Minimal editor")); + menuView->Append(myID_WINDOW_DOCMAP, _("Document &map\tF2")); // Annotations menu wxMenu* menuAnnotations = new wxMenu; @@ -614,11 +617,6 @@ void AppFrame::CreateMenu () #endif menuExtra->AppendCheckItem (myID_CUSTOM_POPUP, _("C&ustom context menu")); - // Window menu - wxMenu *menuWindow = new wxMenu; - menuWindow->Append(myID_WINDOW_MINIMAL, _("&Minimal editor")); - menuWindow->Append(myID_WINDOW_DOCMAP, _("Document &map\tF2")); - // Help menu wxMenu *menuHelp = new wxMenu; menuHelp->Append (wxID_ABOUT, _("&About ..\tCtrl+D")); @@ -630,7 +628,6 @@ void AppFrame::CreateMenu () m_menuBar->Append (menuAnnotations, _("&Annotations")); m_menuBar->Append (menuIndicators, _("&Indicators")); m_menuBar->Append (menuExtra, _("E&xtra")); - m_menuBar->Append (menuWindow, _("&Window")); m_menuBar->Append (menuHelp, _("&Help")); SetMenuBar (m_menuBar);