Skip to content

Commit

Permalink
ver.1.5.1
Browse files Browse the repository at this point in the history
- Fixed Preview of Markdown files with extensions different from .markdown
  • Loading branch information
carloBarazzetta committed Jun 26, 2023
1 parent 8ba8ce5 commit 1b2898d
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 23 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Markdown Editor and Shell Extensions [![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0)

**Latest Version 1.5.0 - 24 Jun 2023**
**Latest Version 1.5.1 - 26 Jun 2023**

**A collection of tools for markdown files, to edit and view content:**

Expand Down Expand Up @@ -59,6 +59,9 @@ To manually install the SVGShellExtensions.dll follow these steps:

## Release Notes ##

26 Jun 2023: ver. 1.5.1
- Fixed Preview of Markdown files with extensions different from .markdown

24 Jun 2023: ver. 1.5.0
- Autoload local markdown files when clicked into Preview
- The editor can open all markdown extensions: .md, .mkd, .mdwn, .mdown, .mdtxt, .mdtext, .markdown, .txt, .text'
Expand Down
2 changes: 1 addition & 1 deletion Setup/MDShellExtensions.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 Shell Extensions and Editor'
#define MyAppVersion '1.5.0'
#define MyAppVersion '1.5.1'

[Setup]
AppName={#MyAppName}
Expand Down
20 changes: 11 additions & 9 deletions Source/MDShellEx.PreviewHandlerRegister.pas
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ implementation
SysUtils,
ShlObj,
System.Win.ComConst,
MDShellEx.Misc,
ComServ;

constructor TPreviewHandlerRegister.Create(APreviewHandlerClass: TPreviewHandlerClass;
Expand Down Expand Up @@ -170,6 +171,13 @@ procedure TPreviewHandlerRegister.UpdateRegistry(ARegister: Boolean);
sAppID: string;
sClassID: string;
LRegKey: string;
LExtension: string;

procedure RegisterExtension(const AExtension: string);
begin
LRegKey := RootPrefix + AExtension + '\shellex\' + SID_IPreviewHandler;
CreateRegKey(LRegKey, '', sClassID, RootKey);
end;
begin

if Instancing = ciInternal then
Expand All @@ -195,15 +203,9 @@ procedure TPreviewHandlerRegister.UpdateRegistry(ARegister: Boolean);
begin
CreateRegKey(sComServerKey, 'ProgID', ProgID, RootKey);

//Add extension for .md files
CreateRegKey(RootPrefix + '.md' + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.mkd' + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.mdwn' + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.mdown' + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.mdtxt' + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.mdtext' + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.markdown' + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey);

//Register for supported files ('.md','.mkd','.mdwn','.mdown','.mdtxt','.mdtext','.markdown')
for LExtension in AMarkDownFileExt do
RegisterExtension(LExtension);
CreateRegKey(sComServerKey, 'VersionIndependentProgID', ProgID, RootKey);
CreateRegKey(RootPrefix + ProgID + '\shellex\' + SID_IPreviewHandler, '', sClassID, RootKey);
CreateRegKey('SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers', sClassID, Description, RootUserReg);
Expand Down
20 changes: 11 additions & 9 deletions Source/MDShellEx.ThumbnailHandlerRegister.pas
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ implementation
SysUtils,
ShlObj,
System.Win.ComConst,
MDShellEx.Misc,
ComServ;

constructor TThumbnailHandlerRegister.Create(ATThumbnailHandlerClass: TThumbnailHandlerClass;
Expand Down Expand Up @@ -147,6 +148,13 @@ procedure TThumbnailHandlerRegister.UpdateRegistry(Register: Boolean);
sAppID: string;
sClassID: string;
LRegKey: string;
LExtension: string;

procedure RegisterExtension(const AExtension: string);
begin
LRegKey := RootPrefix + AExtension + '\shellex\' + ThumbnailProviderGUID;
CreateRegKey(LRegKey, '', sClassID, RootKey);
end;
begin

if Instancing = ciInternal then
Expand All @@ -170,17 +178,11 @@ procedure TThumbnailHandlerRegister.UpdateRegistry(Register: Boolean);
begin
CreateRegKey(sComServerKey, 'ProgID', ProgID, RootKey);

//Add extension for .md files
CreateRegKey(RootPrefix + '.md' + '\shellex\' + ThumbnailProviderGUID, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.mkd' + '\shellex\' + ThumbnailProviderGUID, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.mdwn' + '\shellex\' + ThumbnailProviderGUID, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.mdown' + '\shellex\' + ThumbnailProviderGUID, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.mdtxt' + '\shellex\' + ThumbnailProviderGUID, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.mdtext' + '\shellex\' + ThumbnailProviderGUID, '', sClassID, RootKey);
CreateRegKey(RootPrefix + '.markdown' + '\shellex\' + ThumbnailProviderGUID, '', sClassID, RootKey);
//Register for supported files ('.md','.mkd','.mdwn','.mdown','.mdtxt','.mdtext','.markdown')
for LExtension in AMarkDownFileExt do
RegisterExtension(LExtension);

CreateRegKey(sComServerKey, 'VersionIndependentProgID', ProgID, RootKey);

LRegKey := RootPrefix + ProgID + '\shellex\' + ThumbnailProviderGUID;
CreateRegKey(LRegKey, '', sClassID, RootKey);
end;
Expand Down
3 changes: 2 additions & 1 deletion Source/MDShellExtensions.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<Icon_MainIcon>..\Icons\logo.ico</Icon_MainIcon>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<VerInfo_Locale>1040</VerInfo_Locale>
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=MarkDown Shell Extensions 64bit;FileVersion=1.5.0.0;InternalName=;LegalCopyright=Copyright © 2021-2023 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=MarkDown Shell Extensions 64bit;ProductVersion=1.5;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=MarkDown Shell Extensions 64bit;FileVersion=1.5.1.0;InternalName=;LegalCopyright=Copyright © 2021-2023 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=MarkDown Shell Extensions 64bit;ProductVersion=1.5;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>
<DCC_UsePackage>rtl;vcl;vclx;vclactnband;xmlrtl;VclSmp;vclimg;svnui;svn;bdertl;TeeUI;TeeDB;Tee;vcldb;dbrtl;vcldbx;vcltouch;dsnap;dsnapcon;vclib;ibxpress;adortl;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_110_150;Intraweb_110_150;vclie;websnap;webdsnap;inetdb;inetdbbde;inetdbxpress;soaprtl;vclribbon;dbexpress;DbxCommonDriver;DataSnapIndy10ServerTransport;DataSnapProviderClient;DbxClientDriver;DataSnapClient;dbxcds;DataSnapServer;AzureCloud;DBXInterBaseDriver;DBXMySQLDriver;DBXFirebirdDriver;DBXSybaseASEDriver;DBXSybaseASADriver;DBXOracleDriver;DBXMSSQLDriver;DBXInformixDriver;DBXDb2Driver;Hydra_Core_D15;SynEdit_RXE;mbColorLibDXE;JclDeveloperTools;Jcl;JclVcl;JclContainers;JvCore;JvSystem;JvStdCtrls;JvAppFrm;JvBands;JvDB;JvDlgs;JvBDE;JvControls;JvCmp;JvCrypt;JvCustom;JvDocking;JvDotNetCtrls;JvGlobus;JvHMI;JvJans;JvManagedThreads;JvMM;JvNet;JvPageComps;JvPascalInterpreter;JvPluginSystem;JvPrintPreview;JvRuntimeDesign;JvTimeFramework;JvWizards;JvXPCtrls;WinSkinDXE;bsfd2011;IceTabSet;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_DcuOutput>..\Dcu\$(Platform)\$(Config)</DCC_DcuOutput>
Expand All @@ -73,6 +73,7 @@
<DCC_UnitSearchPath>..\Ext\SynEdit\Source;..\Ext\SVGIconImageList\Source;..\Ext\SVGIconImageList\SVG;..\Ext\VCLStyleUtils\Common;..\Ext\VCLStyleUtils\DDetours\Source;..\Ext\HTMLViewer\Source;..\Ext\SynPDF;..\Ext\SVGIconImageList\Image32\source;..\Ext\SVGIconImageList\Image32\source\Image32_SVG;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_MinorVer>5</VerInfo_MinorVer>
<VerInfo_Release>1</VerInfo_Release>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<Debugger_HostApplication>D:\ETHEA\MarkdownShellExtensions\Debug\Preview Handlers\OpenDialog\OpenDialogTest.exe</Debugger_HostApplication>
Expand Down
Binary file modified Source/MDShellExtensions.res
Binary file not shown.
3 changes: 2 additions & 1 deletion Source/MDShellExtensions32.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<Icon_MainIcon>..\Icons\logo.ico</Icon_MainIcon>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<VerInfo_Locale>1040</VerInfo_Locale>
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=MarkDown Shell Extensions 32bit;FileVersion=1.5.0.0;InternalName=;LegalCopyright=Copyright © 2021-2023 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=MarkDown Shell Extensions 32bit;ProductVersion=1.5;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=MarkDown Shell Extensions 32bit;FileVersion=1.5.1.0;InternalName=;LegalCopyright=Copyright © 2021-2023 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=MarkDown Shell Extensions 32bit;ProductVersion=1.5;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>
<DCC_UsePackage>rtl;vcl;vclx;vclactnband;xmlrtl;VclSmp;vclimg;svnui;svn;bdertl;TeeUI;TeeDB;Tee;vcldb;dbrtl;vcldbx;vcltouch;dsnap;dsnapcon;vclib;ibxpress;adortl;IndyCore;IndySystem;IndyProtocols;inet;intrawebdb_110_150;Intraweb_110_150;vclie;websnap;webdsnap;inetdb;inetdbbde;inetdbxpress;soaprtl;vclribbon;dbexpress;DbxCommonDriver;DataSnapIndy10ServerTransport;DataSnapProviderClient;DbxClientDriver;DataSnapClient;dbxcds;DataSnapServer;AzureCloud;DBXInterBaseDriver;DBXMySQLDriver;DBXFirebirdDriver;DBXSybaseASEDriver;DBXSybaseASADriver;DBXOracleDriver;DBXMSSQLDriver;DBXInformixDriver;DBXDb2Driver;Hydra_Core_D15;SynEdit_RXE;mbColorLibDXE;JclDeveloperTools;Jcl;JclVcl;JclContainers;JvCore;JvSystem;JvStdCtrls;JvAppFrm;JvBands;JvDB;JvDlgs;JvBDE;JvControls;JvCmp;JvCrypt;JvCustom;JvDocking;JvDotNetCtrls;JvGlobus;JvHMI;JvJans;JvManagedThreads;JvMM;JvNet;JvPageComps;JvPascalInterpreter;JvPluginSystem;JvPrintPreview;JvRuntimeDesign;JvTimeFramework;JvWizards;JvXPCtrls;WinSkinDXE;bsfd2011;IceTabSet;$(DCC_UsePackage)</DCC_UsePackage>
<DCC_DcuOutput>..\Dcu\$(Platform)\$(Config)</DCC_DcuOutput>
Expand All @@ -68,6 +68,7 @@
<DCC_ExeOutput>..\Bin32</DCC_ExeOutput>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_MinorVer>5</VerInfo_MinorVer>
<VerInfo_Release>1</VerInfo_Release>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<Debugger_HostApplication>D:\ETHEA\FExplorer\Debug\Preview Handlers\OpenDialog\OpenDialogTest.exe</Debugger_HostApplication>
Expand Down
Binary file modified Source/MDShellExtensions32.res
Binary file not shown.
3 changes: 2 additions & 1 deletion Source/MDTextEditor.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<Icon_MainIcon>..\Icons\logo.ico</Icon_MainIcon>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<VerInfo_Locale>1040</VerInfo_Locale>
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=Markdown files Editor;FileVersion=1.5.0.0;InternalName=;LegalCopyright=Copyright © 2021-2023 - Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=Markdown files Editor;ProductVersion=1.5;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=Markdown files Editor;FileVersion=1.5.1.0;InternalName=;LegalCopyright=Copyright © 2021-2023 - Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=Markdown files Editor;ProductVersion=1.5;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>
<DCC_DebugInformation>0</DCC_DebugInformation>
<DCC_ImportedDataReferences>false</DCC_ImportedDataReferences>
Expand All @@ -76,6 +76,7 @@
<DCC_DcuOutput>..\Dcu\$(Platform)\$(Config)</DCC_DcuOutput>
<DCC_DependencyCheckOutputName>..\..\exe\InstantXMLEditor.exe</DCC_DependencyCheckOutputName>
<VerInfo_MinorVer>5</VerInfo_MinorVer>
<VerInfo_Release>1</VerInfo_Release>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
Expand Down
Binary file modified Source/MDTextEditor.res
Binary file not shown.

0 comments on commit 1b2898d

Please sign in to comment.