Changed chm idepkg so that helplabel cannot be blank

git-svn-id: trunk@23316 -
This commit is contained in:
andrew 2009-12-29 16:45:26 +00:00
parent 4f2c331030
commit 2fc46bc8e1

View File

@ -39,6 +39,7 @@ type
function GetHelpEXE: String;
function DBFindViewer(HelpDB: THelpDatabase; const MimeType: string;
var ErrMsg: string; out Viewer: THelpViewer): TShowHelpResult;
function GetHelpLabel: String;
protected
function GetFileNameAndURL(RawUrl: String; out FileName: String; out URL: String): Boolean;
procedure SetHelpEXE(AValue: String);
@ -60,7 +61,7 @@ type
function GetLocalizedName: string; override;
published
property HelpEXE: String read GetHelpEXE write SetHelpEXE;
property HelpLabel: String read fHelpLabel write SetHelpLabel;
property HelpLabel: String read GetHelpLabel write SetHelpLabel;
property HelpFilesPath: String read fChmsFilePath write fChmsFilePath;
end;
@ -104,6 +105,13 @@ begin
Result:=shrSuccess;
end;
function TChmHelpViewer.GetHelpLabel: String;
begin
if Length(fHelpLabel) = 0 then
fHelpLabel := 'lazhelp';
Result := fHelpLabel;
end;
function TChmHelpViewer.GetHelpEXE: String;
begin
if fHelpExe <> '' then
@ -354,7 +362,7 @@ begin
FileName := DocsDir+FileName;
fHelpConnection.StartHelpServer(fHelpLabel, HelpExe);
fHelpConnection.StartHelpServer(HelpLabel, HelpExe);
Res := fHelpConnection.OpenURL(FileName, Url);
case Res of