Skip to content

Commit

Permalink
An assert if the internal help browser was disabled, but requested.
Browse files Browse the repository at this point in the history
Resolves #1881
  • Loading branch information
gunterkoenigsmann committed Jan 12, 2024
1 parent 597ea9e commit c76be45
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
- Rescaling affected size calculations for code only with a delay
- Mac Os: way higher stability if multiple windows are open
- The context menu in the "greek letters" sidebar now works (#1878)
- Resolved an assert if the internal help browser was disabled,
but requested (#1881)

# 23.12.0

Expand Down
15 changes: 8 additions & 7 deletions src/wxMaxima.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3689,13 +3689,14 @@ void wxMaxima::VariableActionHtmlHelp(const wxString &value) {
m_HelpMenu->Check(EventIDs::menu_maxima_uses_html_help, true);
m_configuration.MaximaHelpFormat(Configuration::browser);
}
#ifdef USE_WEBVIEW
if ((value == wxS("wxmaxima")) || (value == wxS("frontend"))) {
if (!m_HelpMenu->IsChecked(EventIDs::menu_maxima_uses_wxmaxima_help))
m_HelpMenu->Check(EventIDs::menu_maxima_uses_wxmaxima_help, true);
m_configuration.MaximaHelpFormat(Configuration::frontend);
}
#endif
if(m_configuration.OfferInternalHelpBrowser())
{
if ((value == wxS("wxmaxima")) || (value == wxS("frontend"))) {
if (!m_HelpMenu->IsChecked(EventIDs::menu_maxima_uses_wxmaxima_help))
m_HelpMenu->Check(EventIDs::menu_maxima_uses_wxmaxima_help, true);
m_configuration.MaximaHelpFormat(Configuration::frontend);
}
}
}

void wxMaxima::VariableActionAutoplay(const wxString &value) {
Expand Down
23 changes: 12 additions & 11 deletions src/wxMaximaFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1859,17 +1859,18 @@ void wxMaximaFrame::SetupMenu() {
#endif
APPEND_MENU_ITEM(m_HelpMenu, EventIDs::menu_show_tip, _("Show &Tips..."),
_("Show a tip"), wxART_TIP);
#ifdef USE_WEBVIEW
m_HelpMenu->AppendSeparator();
m_HelpMenu->AppendRadioItem(EventIDs::menu_wxmaxima_uses_help_sidebar,
_("wxMaxima shows help in the sidebar"));
m_HelpMenu->AppendRadioItem(EventIDs::menu_wxmaxima_uses_help_browser,
_("wxMaxima shows help in a browser"));
if(m_configuration.InternalHelpBrowser())
m_HelpMenu->Check(EventIDs::menu_wxmaxima_uses_help_sidebar, true);
else
m_HelpMenu->Check(EventIDs::menu_wxmaxima_uses_help_browser, true);
#endif
if(m_configuration.OfferInternalHelpBrowser())
{
m_HelpMenu->AppendSeparator();
m_HelpMenu->AppendRadioItem(EventIDs::menu_wxmaxima_uses_help_sidebar,
_("wxMaxima shows help in the sidebar"));
m_HelpMenu->AppendRadioItem(EventIDs::menu_wxmaxima_uses_help_browser,
_("wxMaxima shows help in a browser"));
if(m_configuration.InternalHelpBrowser())
m_HelpMenu->Check(EventIDs::menu_wxmaxima_uses_help_sidebar, true);
else
m_HelpMenu->Check(EventIDs::menu_wxmaxima_uses_help_browser, true);
}
m_HelpMenu->AppendSeparator();
wxMenu *tutorials_sub = new wxMenu;
tutorials_sub->Append(EventIDs::menu_help_solving, _("Solving equations with Maxima"),
Expand Down

0 comments on commit c76be45

Please sign in to comment.