From 87094af7dc32037ee752767130cedd8a3d8df725 Mon Sep 17 00:00:00 2001 From: juha Date: Tue, 8 Oct 2013 18:58:43 +0000 Subject: [PATCH] ChmHelp & Democontrol: add right lhelp path for Windows. Cleanup. git-svn-id: trunk@43181 - --- .../chmhelp/democontrol/helpconnectionunit1.lfm | 4 ++-- .../chmhelp/democontrol/helpconnectionunit1.pas | 11 +++++++---- .../chmhelp/democontrol/lhelpconnectiondemo1.lpi | 3 ++- components/chmhelp/lhelp/lhelpcore.lfm | 6 +++--- components/chmhelp/lhelp/lhelpcore.pas | 3 --- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/components/chmhelp/democontrol/helpconnectionunit1.lfm b/components/chmhelp/democontrol/helpconnectionunit1.lfm index 3861410469..c95f092450 100644 --- a/components/chmhelp/democontrol/helpconnectionunit1.lfm +++ b/components/chmhelp/democontrol/helpconnectionunit1.lfm @@ -9,10 +9,10 @@ object Form1: TForm1 ClientWidth = 400 OnCreate = FormCreate OnDestroy = FormDestroy - LCLVersion = '0.9.27' + LCLVersion = '1.3' object Label1: TLabel Left = 93 - Height = 18 + Height = 20 Top = 73 Width = 110 Caption = 'Response is here' diff --git a/components/chmhelp/democontrol/helpconnectionunit1.pas b/components/chmhelp/democontrol/helpconnectionunit1.pas index 378da39e6f..dc084b7fc4 100644 --- a/components/chmhelp/democontrol/helpconnectionunit1.pas +++ b/components/chmhelp/democontrol/helpconnectionunit1.pas @@ -37,11 +37,11 @@ implementation function ResponseToString(Ares: TLHelpResponse): String; begin case Ares of - srNoAnswer: Result := 'NoAnswer'; + srNoAnswer: Result := 'NoAnswer'; srSuccess: Result := 'Success'; - srInvalidFile:Result := 'InvalidFileName'; - srInvalidURL:Result := 'InvalidURL'; - srInvalidContext:Result := 'InvalidContext'; + srInvalidFile: Result := 'InvalidFileName'; + srInvalidURL: Result := 'InvalidURL'; + srInvalidContext: Result := 'InvalidContext'; end; end; @@ -80,6 +80,9 @@ end; function TForm1.GetLHelpFilename: string; begin Result:='../lhelp/lhelp'; + {$IFDEF Windows} + Result:='..\lhelp\lhelp.exe'; + {$ENDIF} {$IFDEF darwin} Result:=Result+'.app/Contents/MacOS/'+ExtractFilename(Result); {$ENDIF} diff --git a/components/chmhelp/democontrol/lhelpconnectiondemo1.lpi b/components/chmhelp/democontrol/lhelpconnectiondemo1.lpi index 77b20bc9cf..54d96516ac 100644 --- a/components/chmhelp/democontrol/lhelpconnectiondemo1.lpi +++ b/components/chmhelp/democontrol/lhelpconnectiondemo1.lpi @@ -1,4 +1,4 @@ - + @@ -46,6 +46,7 @@ + diff --git a/components/chmhelp/lhelp/lhelpcore.lfm b/components/chmhelp/lhelp/lhelpcore.lfm index d57b433353..a055117a58 100644 --- a/components/chmhelp/lhelp/lhelpcore.lfm +++ b/components/chmhelp/lhelp/lhelpcore.lfm @@ -5,7 +5,7 @@ object HelpForm: THelpForm Width = 758 ActiveControl = Panel1 Caption = 'LHelp' - ClientHeight = 516 + ClientHeight = 510 ClientWidth = 758 Icon.Data = { 7E04000000000100010010100000010020006804000016000000280000001000 @@ -52,7 +52,7 @@ object HelpForm: THelpForm OnKeyUp = FormKeyUp OnShow = FormShow Position = poScreenCenter - LCLVersion = '1.1' + LCLVersion = '1.3' Visible = True object Panel1: TPanel Left = 0 @@ -238,7 +238,7 @@ object HelpForm: THelpForm end object PageControl: TPageControl Left = 0 - Height = 484 + Height = 478 Top = 32 Width = 758 Align = alClient diff --git a/components/chmhelp/lhelp/lhelpcore.pas b/components/chmhelp/lhelp/lhelpcore.pas index 032f42c339..2749ef8b59 100644 --- a/components/chmhelp/lhelp/lhelpcore.pas +++ b/components/chmhelp/lhelp/lhelpcore.pas @@ -427,15 +427,12 @@ begin if FileMenuOpenRecentItem.Count > MaxHistory then FileMenuOpenRecentItem.Items[MaxHistory-1].Free; - - end; procedure THelpForm.ContentTitleChange(sender: TObject); begin if ActivePage = nil then Exit; - Caption := 'LHelp - ' + ActivePage.fContentProvider.Title; end;