From 531172c4bec02f0a06029d1ac47d1989ef6111b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ed=C3=AAnis=20Freindorfer=20Azevedo?= Date: Mon, 16 Sep 2019 14:22:26 -0300 Subject: [PATCH] Fix displaying of link menu when `ENABLE_LINK=NO`. We disable the items, but not the menu. So, there was an empty list on `Options` > `Link` > `Type`. --- src/wx/guiinit.cpp | 6 ++++++ src/wx/xrc/MainMenu.xrc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wx/guiinit.cpp b/src/wx/guiinit.cpp index 6075f6f5..44c3da10 100644 --- a/src/wx/guiinit.cpp +++ b/src/wx/guiinit.cpp @@ -2930,6 +2930,12 @@ bool MainFrame::BindControls() gdbmi->GetMenu()->Remove(gdbmi); gdbmi = NULL; #endif +#ifdef NO_LINK + // remove this item from the menu completely + wxMenuItem* linkmi = XRCITEM("LinkMenu"); + linkmi->GetMenu()->Remove(linkmi); + linkmi = NULL; +#endif // if a recent menu is present, save its location wxMenuItem* recentmi = XRCITEM("RecentMenu"); diff --git a/src/wx/xrc/MainMenu.xrc b/src/wx/xrc/MainMenu.xrc index 48a19686..5517bd3c 100644 --- a/src/wx/xrc/MainMenu.xrc +++ b/src/wx/xrc/MainMenu.xrc @@ -260,7 +260,7 @@ - +