mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 08:51:17 +02:00
* now lhelp tabs are not shown if the items they represent are not available
git-svn-id: trunk@17669 -
This commit is contained in:
parent
9a205e2a39
commit
45a0a8e636
@ -259,6 +259,8 @@ var
|
|||||||
Stream: TMemoryStream;
|
Stream: TMemoryStream;
|
||||||
fChm: TChmReader;
|
fChm: TChmReader;
|
||||||
ParentNode: TTreeNode;
|
ParentNode: TTreeNode;
|
||||||
|
i: Integer;
|
||||||
|
HasSearchIndex: Boolean = False;
|
||||||
begin
|
begin
|
||||||
if fFillingToc = True then begin
|
if fFillingToc = True then begin
|
||||||
Application.QueueAsyncCall(@FillToc, Data);
|
Application.QueueAsyncCall(@FillToc, Data);
|
||||||
@ -283,8 +285,10 @@ begin
|
|||||||
DoFill(ParentNode);
|
DoFill(ParentNode);
|
||||||
Free;
|
Free;
|
||||||
end;
|
end;
|
||||||
|
Stream.Free;
|
||||||
end;
|
end;
|
||||||
Stream.Free;
|
fContentsTab.TabVisible := fContentsTree.Items.Count > 1;
|
||||||
|
|
||||||
// we fill the index here too but only for the main file
|
// we fill the index here too but only for the main file
|
||||||
if fChms.IndexOfObject(fChm) < 1 then
|
if fChms.IndexOfObject(fChm) < 1 then
|
||||||
begin
|
begin
|
||||||
@ -299,15 +303,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
fIndexTab.TabVisible := fIndexView.Items.Count > 0;
|
||||||
if ParentNode.Index = 0 then ParentNode.Expanded := True;
|
if ParentNode.Index = 0 then ParentNode.Expanded := True;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fContentsTree.Visible := True;
|
fContentsTree.Visible := True;
|
||||||
{$IFDEF CHM_DEBUG_TIME}
|
{$IFDEF CHM_DEBUG_TIME}
|
||||||
writeln('Eind: ',FormatDateTime('hh:nn:ss.zzz', Now));
|
writeln('Eind: ',FormatDateTime('hh:nn:ss.zzz', Now));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
fFillingToc := False;
|
fFillingToc := False;
|
||||||
|
|
||||||
|
i := 0;
|
||||||
|
while (HasSearchIndex = False) and (i < fChms.Count) do
|
||||||
|
begin
|
||||||
|
HasSearchIndex := fChms.Chm[i].ObjectExists('/$FIftiMain') > 0;
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
|
||||||
|
fSearchTab.TabVisible := HasSearchIndex;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChmContentProvider.IpHtmlPanelDocumentOpen(Sender: TObject);
|
procedure TChmContentProvider.IpHtmlPanelDocumentOpen(Sender: TObject);
|
||||||
|
Loading…
Reference in New Issue
Block a user