Skip to content

Commit

Permalink
ver. 2.2.0
Browse files Browse the repository at this point in the history
- Fixed loading content when Viewer is already open
  • Loading branch information
carloBarazzetta committed Mar 20, 2024
1 parent 39bfa58 commit 4af4e84
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 9 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Markdown Help Viewer [![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0)

**Latest Version 2.1.2 - 19 Mar 2024**
**Latest Version 2.2.0 - 20 Mar 2024**

**An integrated help system based on files in Markdown format (and also html), for Delphi and Windows applications**

Expand Down Expand Up @@ -98,6 +98,9 @@ Then the interface searches in the same folder of default file (specified into A

## Release Notes ##

20 Mar 2024: ver. 2.2.0
- Fixed loading content when Viewer is already open

19 Mar 2024: ver. 2.1.2
- Added property "AutoLoadOnHotSpotClick" to TMarkdownViewer
- Fixed resize Font changing Monitor-DPI
Expand Down
14 changes: 12 additions & 2 deletions Setup/MarkDownHelpViewerSetup.iss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName 'Markdown Help Viewer'
#define MyAppVersion '2.1.2'
#define MyAppVersion '2.2.0'

[Setup]
AppName={#MyAppName}
Expand Down Expand Up @@ -45,6 +45,16 @@ Name: es; MessagesFile: compiler:Languages\Spanish.isl; LicenseFile: .\License_E
Name: fr; MessagesFile: compiler:Languages\French.isl; LicenseFile: .\License_ENG.rtf
Name: pt; MessagesFile: compiler:Languages\Portuguese.isl; LicenseFile: .\License_ENG.rtf


[CustomMessages]
UninstallMessage=Undefined
en.UninstallMessage=An older version of "Markdown Help Viewer" was detected. The uninstaller will be executed...
it.UninstallMessage=È stata rilevata una versione precedente di "Markdown Help Viewer". Il programma di disinstallazione verrà eseguito...
de.UninstallMessage=Eine ältere Version von "Markdown Help Viewer" wurde erkannt. Das Deinstallationsprogramm wird ausgeführt...
es.UninstallMessage=Se detectó una versión anterior de "Markdown Help Viewer". El desinstalador se ejecutará...
fr.UninstallMessage=Une ancienne version de «Markdown Help Viewer» a été détectée. Le programme de désinstallation sera exécuté...
pt.UninstallMessage=Uma versão mais antiga do "Markdown Help Viewer" foi detectada. O desinstalador será executado...

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked; Components: Viewer

Expand Down Expand Up @@ -158,7 +168,7 @@ begin
if (IsUpgrade()) then
begin
if not IsSilentMode() then
MsgBox(ExpandConstant('An older version of "Markdown Help Viewer" was detected. The uninstaller will be executed...'), mbInformation, MB_OK);
MsgBox(ExpandConstant('{cm:UninstallMessage}'), mbInformation, MB_OK);
UnInstallOldVersion();
end;
end;
Expand Down
6 changes: 4 additions & 2 deletions Source/MDHelpView.Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,8 @@ procedure TMainForm.UpdateCaption;
procedure TMainForm.WMCopyData(var Message: TMessage);
var
p : PCopyDataStruct;
LFilePath, LFileName : string[255];
LFilePath, LFileName: string[255];
LFullName: string;
r : PRecToPass;
begin
p := PCopyDataStruct( Message.lParam );
Expand All @@ -1369,8 +1370,9 @@ procedure TMainForm.WMCopyData(var Message: TMessage);
r := PRecToPass(PCopyDataStruct(Message.LParam)^.lpData);
LFilePath := r^.FilePath;
LFileName := r^.FileName;
LFullName := StripQuotes(String(LFilePath+LFileName));
{$WARN IMPLICIT_STRING_CAST OFF}
LoadAndTransformFile(LFilePath+LFileName);
LoadAndTransformFile(LFullName);
if Self.WindowState = wsMinimized then
Self.WindowState := wsNormal;
end
Expand Down
18 changes: 18 additions & 0 deletions Source/MDHelpView.Misc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ interface
var MajorVersion, MinorVersion, Release, Build : integer);
function GetVersionString(const FileName: string;
FormatString: string = '%d.%d.%d'): string;
function StripQuotes(const AValue: string): string;

resourcestring
STextNotFound = 'Text not found';
Expand Down Expand Up @@ -195,6 +196,23 @@ function GetVersionString(const FileName: string;
Result := Format(FormatString,[MajorVersion, MinorVersion, Release, Build]);
end;

function StripQuotes(const AValue: string): string;

procedure StripQuote(const AQuote: Char);
begin
var Len := Length(Result);
if (Copy(Result,1,1) = AQuote) and
(Copy(Result,Len,1) = AQuote) then
Result := Copy(Result,2,Len-2);
end;

begin
Result := AValue;
StripQuote('"');
StripQuote('''');
end;


initialization

end.
7 changes: 3 additions & 4 deletions Source/MDHelpViewer.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<FrameworkType>VCL</FrameworkType>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<Platform Condition="'$(Platform)'==''">Win64</Platform>
<TargetedPlatforms>3</TargetedPlatforms>
<AppType>Application</AppType>
<MainSource>MDHelpViewer.dpr</MainSource>
Expand Down Expand Up @@ -69,13 +69,12 @@
<SanitizedProjectName>MDHelpViewer</SanitizedProjectName>
<DCC_UnitSearchPath>..\Ext\HTMLViewer\Source;..\Ext\MarkdownProcessor\Source;..\Ext\SVGIconImageList\Source;..\Ext\SVGIconImageList\Image32\Source;..\Ext\SynPDF;..\Ext\VclStyleUtils\Common;..\Ext\VclStyleUtils\DDetours\Source;..\Ext\StyledComponents\source;..\Ext\ISMultiLanguage\src\Engine;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=Markdown Help Viewer;FileVersion=2.1.2.0;InternalName=;LegalCopyright=Copyright (c) Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProgramID=;ProductName=MarkdownHelpViewer;ProductVersion=2.1;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=Markdown Help Viewer;FileVersion=2.2.0.0;InternalName=;LegalCopyright=Copyright (c) Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProgramID=;ProductName=MarkdownHelpViewer;ProductVersion=2.2;Comments=</VerInfo_Keys>
<Custom_Styles>Glow|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Glow.vsf;Sky|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Sky.vsf;Windows10|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10.vsf;&quot;Windows10 Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Dark.vsf&quot;;&quot;Windows10 SlateGray|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10SlateGray.vsf&quot;;&quot;Windows11 Modern Dark|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows11_Modern_Dark.vsf&quot;;&quot;Windows11 Modern Light|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows11_Modern_Light.vsf&quot;</Custom_Styles>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_MajorVer>2</VerInfo_MajorVer>
<DCC_Define>SKIA;STYLEDCOMPONENTS;$(DCC_Define)</DCC_Define>
<VerInfo_MinorVer>1</VerInfo_MinorVer>
<VerInfo_Release>2</VerInfo_Release>
<VerInfo_MinorVer>2</VerInfo_MinorVer>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
Expand Down
Binary file modified Source/MDHelpViewer.res
Binary file not shown.

0 comments on commit 4af4e84

Please sign in to comment.