Add explicit file:// URI scheme for html help files

This fixes the help location on MacOS
This commit is contained in:
Jon Evans 2018-03-28 17:18:03 -04:00
parent 6740a37632
commit ed99251f0b
2 changed files with 10 additions and 1 deletions

View File

@ -98,7 +98,8 @@ bool GetAssociatedDocument( wxWindow* aParent,
wxT( "http:" ),
wxT( "https:" ),
wxT( "ftp:" ),
wxT( "www." )
wxT( "www." ),
wxT( "file:" )
};
for( unsigned ii = 0; ii < DIM(url_header); ii++ )

View File

@ -162,7 +162,11 @@ wxString SearchHelpFileFullPath( const SEARCH_STACK& aSStack, const wxString& aB
fn = FindFileInSearchPaths( ss, aBaseName + wxT( ".html" ), &altsubdirs );
if( !fn.IsEmpty() )
{
// Prepend URI protocol since we will open in a browser
fn = wxT( "file://" ) + fn;
break;
}
fn = FindFileInSearchPaths( ss, aBaseName + wxT( ".pdf" ), &altsubdirs );
@ -172,7 +176,11 @@ wxString SearchHelpFileFullPath( const SEARCH_STACK& aSStack, const wxString& aB
fn = FindFileInSearchPaths( ss, aBaseName + wxT( ".html" ), &subdirs );
if( !fn.IsEmpty() )
{
// Prepend URI protocol since we will open in a browser
fn = wxT( "file://" ) + fn;
break;
}
fn = FindFileInSearchPaths( ss, aBaseName + wxT( ".pdf" ), &subdirs );