ChmHelp & Democontrol: add right lhelp path for Windows. Cleanup.

git-svn-id: trunk@43181 -
This commit is contained in:
juha 2013-10-08 18:58:43 +00:00
parent d29e9fa0b6
commit 87094af7dc
5 changed files with 14 additions and 13 deletions

View File

@ -9,10 +9,10 @@ object Form1: TForm1
ClientWidth = 400 ClientWidth = 400
OnCreate = FormCreate OnCreate = FormCreate
OnDestroy = FormDestroy OnDestroy = FormDestroy
LCLVersion = '0.9.27' LCLVersion = '1.3'
object Label1: TLabel object Label1: TLabel
Left = 93 Left = 93
Height = 18 Height = 20
Top = 73 Top = 73
Width = 110 Width = 110
Caption = 'Response is here' Caption = 'Response is here'

View File

@ -37,11 +37,11 @@ implementation
function ResponseToString(Ares: TLHelpResponse): String; function ResponseToString(Ares: TLHelpResponse): String;
begin begin
case Ares of case Ares of
srNoAnswer: Result := 'NoAnswer'; srNoAnswer: Result := 'NoAnswer';
srSuccess: Result := 'Success'; srSuccess: Result := 'Success';
srInvalidFile:Result := 'InvalidFileName'; srInvalidFile: Result := 'InvalidFileName';
srInvalidURL:Result := 'InvalidURL'; srInvalidURL: Result := 'InvalidURL';
srInvalidContext:Result := 'InvalidContext'; srInvalidContext: Result := 'InvalidContext';
end; end;
end; end;
@ -80,6 +80,9 @@ end;
function TForm1.GetLHelpFilename: string; function TForm1.GetLHelpFilename: string;
begin begin
Result:='../lhelp/lhelp'; Result:='../lhelp/lhelp';
{$IFDEF Windows}
Result:='..\lhelp\lhelp.exe';
{$ENDIF}
{$IFDEF darwin} {$IFDEF darwin}
Result:=Result+'.app/Contents/MacOS/'+ExtractFilename(Result); Result:=Result+'.app/Contents/MacOS/'+ExtractFilename(Result);
{$ENDIF} {$ENDIF}

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<Version Value="9"/> <Version Value="9"/>
@ -46,6 +46,7 @@
<Filename Value="helpconnectionunit1.pas"/> <Filename Value="helpconnectionunit1.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/> <ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="HelpConnectionUnit1"/> <UnitName Value="HelpConnectionUnit1"/>
</Unit1> </Unit1>

View File

@ -5,7 +5,7 @@ object HelpForm: THelpForm
Width = 758 Width = 758
ActiveControl = Panel1 ActiveControl = Panel1
Caption = 'LHelp' Caption = 'LHelp'
ClientHeight = 516 ClientHeight = 510
ClientWidth = 758 ClientWidth = 758
Icon.Data = { Icon.Data = {
7E04000000000100010010100000010020006804000016000000280000001000 7E04000000000100010010100000010020006804000016000000280000001000
@ -52,7 +52,7 @@ object HelpForm: THelpForm
OnKeyUp = FormKeyUp OnKeyUp = FormKeyUp
OnShow = FormShow OnShow = FormShow
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '1.1' LCLVersion = '1.3'
Visible = True Visible = True
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
@ -238,7 +238,7 @@ object HelpForm: THelpForm
end end
object PageControl: TPageControl object PageControl: TPageControl
Left = 0 Left = 0
Height = 484 Height = 478
Top = 32 Top = 32
Width = 758 Width = 758
Align = alClient Align = alClient

View File

@ -427,15 +427,12 @@ begin
if FileMenuOpenRecentItem.Count > MaxHistory then if FileMenuOpenRecentItem.Count > MaxHistory then
FileMenuOpenRecentItem.Items[MaxHistory-1].Free; FileMenuOpenRecentItem.Items[MaxHistory-1].Free;
end; end;
procedure THelpForm.ContentTitleChange(sender: TObject); procedure THelpForm.ContentTitleChange(sender: TObject);
begin begin
if ActivePage = nil then if ActivePage = nil then
Exit; Exit;
Caption := 'LHelp - ' + ActivePage.fContentProvider.Title; Caption := 'LHelp - ' + ActivePage.fContentProvider.Title;
end; end;