Skip to content

Commit

Permalink
Fix displaying of link menu when ENABLE_LINK=NO.
Browse files Browse the repository at this point in the history
We disable the items, but not the menu. So, there was an empty list
on `Options` > `Link` > `Type`.
  • Loading branch information
denisfa authored and rkitover committed Sep 16, 2019
1 parent 0710709 commit 531172c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/wx/guiinit.cpp
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/wx/xrc/MainMenu.xrc
Expand Up @@ -260,7 +260,7 @@
</object>
<object class="wxMenu">
<label>_Options</label>
<object class="wxMenu">
<object class="wxMenu" name="LinkMenu">
<label>_Link</label>
<object class="wxMenuItem" name="LanLink">
<label>Start _Network Link ...</label>
Expand Down

0 comments on commit 531172c

Please sign in to comment.