mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:59:26 +02:00
chmhelp: unregister default LCL help, search in docs/chm first
git-svn-id: trunk@50697 -
This commit is contained in:
parent
2fe0fde59e
commit
29fe61bfd2
@ -102,7 +102,7 @@ begin
|
||||
fCHMSearchPath := Path;
|
||||
if fCHMSearchPath = '' then
|
||||
begin
|
||||
fCHMSearchPath := '$(LazarusDir)/docs/html;$(LazarusDir)/docs/chm';
|
||||
fCHMSearchPath := '$(LazarusDir)/docs/chm;$(LazarusDir)/docs/html';
|
||||
IDEMacros.SubstituteMacros(fCHMSearchPath);
|
||||
fCHMSearchPath := MinimizeSearchPath(SetDirSeparators(fCHMSearchPath));
|
||||
end;
|
||||
|
@ -55,8 +55,16 @@ procedure RegisterLclHelpDatabase;
|
||||
var
|
||||
FPDocNode: THelpNode;
|
||||
DirItem: THelpDBISourceDirectory;
|
||||
DefaultHelpDB: THelpDatabase;
|
||||
begin
|
||||
if Assigned(LCLHelpDatabase) then Exit;
|
||||
|
||||
// remove default help
|
||||
DefaultHelpDB:=HelpDatabases.FindDatabase('LCLUnits');
|
||||
if DefaultHelpDB<>nil then
|
||||
DefaultHelpDB.Free;
|
||||
|
||||
// register our own help
|
||||
LCLHelpDatabase := TLclChmHelpDatabase(
|
||||
HelpDatabases.CreateHelpDatabase(sLclUnits, TLclChmHelpDatabase, True));
|
||||
|
||||
|
@ -184,7 +184,7 @@ begin
|
||||
Result:=FCHMSearchPath;
|
||||
if Result='' then
|
||||
begin
|
||||
Result := '$(LazarusDir)/docs/html;$(LazarusDir)/docs/chm';
|
||||
Result := '$(LazarusDir)/docs/chm;$(LazarusDir)/docs/html';
|
||||
IDEMacros.SubstituteMacros(Result);
|
||||
Result:=MinimizeSearchPath(SetDirSeparators(Result));
|
||||
end;
|
||||
|
@ -273,7 +273,7 @@ function TChmHelpViewer.GetHelpFilesPath: String;
|
||||
begin
|
||||
Result:=fCHMSearchPath;
|
||||
if Result='' then
|
||||
Result:='$(LazarusDir)/docs/html;$(LazarusDir)/docs/html/lcl;$(LazarusDir)/docs/chm';
|
||||
Result:='$(LazarusDir)/docs/chm;$(LazarusDir)/docs/html;$(LazarusDir)/docs/html/lcl';
|
||||
IDEMacros.SubstituteMacros(Result);
|
||||
Result:=MinimizeSearchPath(SetDirSeparators(Result));
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user