| 529 | } |
| 530 | |
| 531 | void LinkingHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) |
| 532 | { |
| 533 | wxString href = link.GetHref(); |
| 534 | |
| 535 | if( href.StartsWith( wxT("innerlink:help:"))) |
| 536 | { |
| 537 | HelpSystem::ShowHelp(this, ManualPageID{ href.Mid( 15 ) }, true ); |
| 538 | return; |
| 539 | } |
| 540 | else if( href.StartsWith(wxT("innerlink:")) ) |
| 541 | { |
| 542 | wxString FileName = |
| 543 | wxFileName( FileNames::HtmlHelpDir(), href.Mid( 10 ) + wxT(".htm") ).GetFullPath(); |
| 544 | if( wxFileExists( FileName ) ) |
| 545 | { |
| 546 | HelpSystem::ShowHelp(this, FileName, wxEmptyString, false); |
| 547 | return; |
| 548 | } |
| 549 | else |
| 550 | { |
| 551 | SetPage( HelpText( href.Mid( 10 ))); |
| 552 | wxGetTopLevelParent(this)->SetLabel( TitleText( href.Mid( 10 )).Translation() ); |
| 553 | } |
| 554 | } |
| 555 | else if( href.StartsWith(wxT("mailto:")) || href.StartsWith(wxT("file:")) ) |
| 556 | { |
| 557 | OpenInDefaultBrowser( link.GetHref() ); |
| 558 | return; |
| 559 | } |
| 560 | else if( !href.StartsWith( wxT("http:")) && !href.StartsWith( wxT("https:")) ) |
| 561 | { |
| 562 | HtmlWindow::OnLinkClicked( link ); |
| 563 | } |
| 564 | else |
| 565 | { |
| 566 | OpenInDefaultBrowser(link.GetHref()); |
| 567 | return; |
| 568 | } |
| 569 | wxFrame * pFrame = GetRelatedFrame(); |
| 570 | if( !pFrame ) |
| 571 | return; |
| 572 | wxWindow * pWnd = pFrame->FindWindow(BrowserDialog::ID); |
| 573 | if( !pWnd ) |
| 574 | return; |
| 575 | BrowserDialog * pDlg = wxDynamicCast( pWnd , BrowserDialog ); |
| 576 | if( !pDlg ) |
| 577 | return; |
| 578 | pDlg->UpdateButtons(); |
| 579 | } |
| 580 | |
| 581 | ChoiceSetting GUIManualLocation{ |
| 582 | wxT("/GUI/Help"), |
nothing calls this directly
no test coverage detected