1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Bug 169 - Welcome Message: Local links to "Quick Help" and "Manual" do nothing if help is not installed.

This commit is contained in:
James Crook
2019-08-20 22:29:18 +01:00
parent efc95152d5
commit 80ef424338
2 changed files with 21 additions and 12 deletions

View File

@@ -524,7 +524,13 @@ LinkingHtmlWindow::LinkingHtmlWindow(wxWindow *parent, wxWindowID id /*= -1*/,
void LinkingHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
{
wxString href = link.GetHref();
if( href.StartsWith(wxT("innerlink:")) )
if( href.StartsWith( wxT("innerlink:help:")))
{
HelpSystem::ShowHelp(this, href.Mid( 15 ), true );
return;
}
else if( href.StartsWith(wxT("innerlink:")) )
{
wxString FileName =
wxFileName( FileNames::HtmlHelpDir(), href.Mid( 10 ) + wxT(".htm") ).GetFullPath();
@@ -553,10 +559,14 @@ void LinkingHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link)
OpenInDefaultBrowser(link);
return;
}
BrowserDialog * pDlg = wxDynamicCast(
GetRelatedFrame()->FindWindow(BrowserDialog::ID), BrowserDialog );
if( pDlg )
{
pDlg->UpdateButtons();
};
wxFrame * pFrame = GetRelatedFrame();
if( !pFrame )
return;
wxWindow * pWnd = pFrame->FindWindow(BrowserDialog::ID);
if( !pWnd )
return;
BrowserDialog * pDlg = wxDynamicCast( pWnd , BrowserDialog );
if( !pDlg )
return;
pDlg->UpdateButtons();
}