Skip to content

Commit

Permalink
#5794: Hide the offline user guide item. The windows build doesn't pr…
Browse files Browse the repository at this point in the history
…ocess the ascii doc sources yet.
  • Loading branch information
codereader committed Nov 1, 2021
1 parent 3cdb2cb commit 06fe04c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion install/menu.xml
Expand Up @@ -330,6 +330,6 @@
<menuItem name="about" caption="&amp;About" command="About" />
<menuItem name="openForumLink" caption="&amp;Community Forum" command="OpenForumUrl" />
<menuItem name="userGuide" caption="&amp;User Guide (Online)" command="ShowUserGuide" />
<menuItem name="userGuide" caption="&amp;User Guide (Local)" command="ShowOfflineUserGuide" />
<menuItem name="userGuideLocal" caption="&amp;User Guide (Local)" command="ShowOfflineUserGuide" />
</subMenu>
</menu>
10 changes: 10 additions & 0 deletions radiant/ui/UserInterfaceModule.cpp
Expand Up @@ -229,6 +229,14 @@ void UserInterfaceModule::initialiseModule(const IApplicationContext& ctx)

_autosaveTimer.reset(new map::AutoSaveTimer);
_autosaveTimer->initialise();

#ifdef WIN32
// Hide the local user guide item in Windows
GlobalMainFrame().signal_MainFrameConstructed().connect([&]()
{
GlobalMenuManager().setVisibility("main/help/userGuideLocal", false);
});
#endif
}

void UserInterfaceModule::shutdownModule()
Expand Down Expand Up @@ -400,7 +408,9 @@ void UserInterfaceModule::registerUICommands()
GlobalCommandSystem().addCommand("About", AboutDialog::showDialog);
GlobalCommandSystem().addCommand("ShowUserGuide", Documentation::showUserGuide);
GlobalCommandSystem().addCommand("OpenForumUrl", Documentation::OpenForumUrl);
#ifndef WIN32
GlobalCommandSystem().addCommand("ShowOfflineUserGuide", Documentation::showOfflineUserGuide);
#endif
GlobalCommandSystem().addCommand("ExportSelectedAsModelDialog", ExportAsModelDialog::ShowDialog);
GlobalCommandSystem().addCommand("ConvertModelDialog", ConvertModelDialog::ShowDialog);

Expand Down

0 comments on commit 06fe04c

Please sign in to comment.