Skip to content

Commit bd1cc99

Browse files
ver.1.2.1
Fixed Context-Menu
1 parent 330a1a7 commit bd1cc99

10 files changed

+41
-46
lines changed
-944 Bytes
Binary file not shown.

Setup/SVGShellExtensions.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; Script generated by the Inno Setup Script Wizard.
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33
#define MyAppName 'SVG Shell Extensions and Text Editor'
4-
#define MyAppVersion '1.2.0'
4+
#define MyAppVersion '1.2.1'
55

66
[Setup]
77
UsePreviousLanguage=no

Source/SVGShellExtensions.dproj

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,23 @@
5858
<Icon_MainIcon>..\Icons\logo.ico</Icon_MainIcon>
5959
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
6060
<VerInfo_Locale>1033</VerInfo_Locale>
61-
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=SVG Shell Extensions 64bit;FileVersion=1.2.0.0;InternalName=;LegalCopyright=Copyright © 2021 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=SVG Shell Extensions 64bit;ProductVersion=1.2;Comments=</VerInfo_Keys>
61+
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=SVG Shell Extensions 64bit;FileVersion=1.2.1.0;InternalName=;LegalCopyright=Copyright © 2021 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=SVG Shell Extensions 64bit;ProductVersion=1.2;Comments=</VerInfo_Keys>
6262
<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;Flat UI Light|VCLSTYLE|$(BDSCOMMONDIR)\Styles\FlatUILight.vsf&quot;;&quot;Windows10 BlackPearl|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10BlackPearl.vsf&quot;;&quot;Windows10 Blue Whale|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10BlueWhale.vsf&quot;;&quot;Windows10 Blue Whale LE|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10BlueWhaleLE.vsf&quot;;&quot;Windows10 Clear Day|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10ClearDay.vsf&quot;;&quot;Windows10 Malibu|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Malibu.vsf&quot;</Custom_Styles>
6363
<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>
6464
<DCC_DcuOutput>.\$(Config)\$(Platform)</DCC_DcuOutput>
6565
<GenDll>true</GenDll>
6666
<DCC_ImageBase>00400000</DCC_ImageBase>
6767
<DCC_UnitSearchPath>..\Ext\SynEdit\Source;..\Ext\SVGIconImageList\Source;..\Ext\SVGIconImageList\SVG;..\Ext\VCLStyleUtils\Common;..\Ext\VCLStyleUtils\DDetours\Source;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
6868
<DCC_ExeOutput>..\Bin64</DCC_ExeOutput>
69-
<DCC_Define>NO_UEDITOR;$(DCC_Define)</DCC_Define>
7069
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
7170
<VerInfo_MinorVer>2</VerInfo_MinorVer>
71+
<VerInfo_Release>1</VerInfo_Release>
7272
</PropertyGroup>
7373
<PropertyGroup Condition="'$(Base_Win32)'!=''">
7474
<Debugger_HostApplication>D:\ETHEA\SVGShellExtensions\Debug\Preview Handlers\OpenDialog\OpenDialogTest.exe</Debugger_HostApplication>
7575
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
7676
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
7777
<BT_BuildType>Debug</BT_BuildType>
78-
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
79-
<VerInfo_MinorVer>0</VerInfo_MinorVer>
80-
<VerInfo_Release>0</VerInfo_Release>
8178
</PropertyGroup>
8279
<PropertyGroup Condition="'$(Base_Win64)'!=''">
8380
<Debugger_HostApplication>D:\ETHEA\SVGShellExtensions\Debug\Preview Handlers\PreviewHandler Host\Bin\PreviewHost.exe</Debugger_HostApplication>
@@ -98,9 +95,6 @@
9895
<Debugger_CWD>c:\Windows\SysWoW64</Debugger_CWD>
9996
<DCC_RemoteDebug>false</DCC_RemoteDebug>
10097
<Debugger_RunParams>D:\ETHEA\SVGShellExtensions\SVGShellExtensions.dll</Debugger_RunParams>
101-
<VerInfo_MinorVer>0</VerInfo_MinorVer>
102-
<VerInfo_Release>0</VerInfo_Release>
103-
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
10498
</PropertyGroup>
10599
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
106100
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
@@ -113,9 +107,6 @@
113107
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
114108
<DCC_MapFile>3</DCC_MapFile>
115109
<DCC_LocalDebugSymbols>true</DCC_LocalDebugSymbols>
116-
<VerInfo_MinorVer>0</VerInfo_MinorVer>
117-
<VerInfo_Release>0</VerInfo_Release>
118-
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
119110
<Debugger_HostApplication>D:\ETHEA\SVGShellExtensions\Debug\Preview Handlers\OpenDialog\OpenDialogTest.exe</Debugger_HostApplication>
120111
</PropertyGroup>
121112
<ItemGroup>

Source/SVGShellExtensions.res

0 Bytes
Binary file not shown.

Source/SVGShellExtensions32.dproj

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<Icon_MainIcon>..\Icons\logo.ico</Icon_MainIcon>
5959
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
6060
<VerInfo_Locale>1033</VerInfo_Locale>
61-
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=SVG Shell Extensions 32bit;FileVersion=1.2.0.0;InternalName=;LegalCopyright=Copyright © 2021 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=SVG Shell Extensions 32bit;ProductVersion=1.2;Comments=</VerInfo_Keys>
61+
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=SVG Shell Extensions 32bit;FileVersion=1.2.1.0;InternalName=;LegalCopyright=Copyright © 2021 Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=SVG Shell Extensions 32bit;ProductVersion=1.2;Comments=</VerInfo_Keys>
6262
<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;Flat UI Light|VCLSTYLE|$(BDSCOMMONDIR)\Styles\FlatUILight.vsf&quot;;&quot;Windows10 BlackPearl|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10BlackPearl.vsf&quot;;&quot;Windows10 Blue Whale|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10BlueWhale.vsf&quot;;&quot;Windows10 Blue Whale LE|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10BlueWhaleLE.vsf&quot;;&quot;Windows10 Clear Day|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10ClearDay.vsf&quot;;&quot;Windows10 Malibu|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Malibu.vsf&quot;</Custom_Styles>
6363
<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>
6464
<DCC_DcuOutput>.\$(Config)\$(Platform)</DCC_DcuOutput>
@@ -68,15 +68,13 @@
6868
<DCC_ExeOutput>..\Bin32</DCC_ExeOutput>
6969
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
7070
<VerInfo_MinorVer>2</VerInfo_MinorVer>
71+
<VerInfo_Release>1</VerInfo_Release>
7172
</PropertyGroup>
7273
<PropertyGroup Condition="'$(Base_Win32)'!=''">
7374
<Debugger_HostApplication>D:\ETHEA\SVGShellExtensions\Debug\Preview Handlers\OpenDialog\OpenDialogTest.exe</Debugger_HostApplication>
7475
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
7576
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
7677
<BT_BuildType>Debug</BT_BuildType>
77-
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
78-
<VerInfo_MinorVer>0</VerInfo_MinorVer>
79-
<VerInfo_Release>0</VerInfo_Release>
8078
</PropertyGroup>
8179
<PropertyGroup Condition="'$(Base_Win64)'!=''">
8280
<Debugger_HostApplication>D:\ETHEA\SVGShellExtensions\Debug\Preview Handlers\PreviewHandler Host\Bin\PreviewHost.exe</Debugger_HostApplication>
@@ -97,9 +95,6 @@
9795
<Debugger_CWD>c:\Windows\SysWoW64</Debugger_CWD>
9896
<DCC_RemoteDebug>false</DCC_RemoteDebug>
9997
<Debugger_RunParams>D:\ETHEA\SVGShellExtensions\SVGShellExtensions.dll</Debugger_RunParams>
100-
<VerInfo_MinorVer>0</VerInfo_MinorVer>
101-
<VerInfo_Release>0</VerInfo_Release>
102-
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
10398
</PropertyGroup>
10499
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
105100
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
@@ -112,8 +107,6 @@
112107
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
113108
<DCC_MapFile>3</DCC_MapFile>
114109
<DCC_LocalDebugSymbols>true</DCC_LocalDebugSymbols>
115-
<VerInfo_MinorVer>0</VerInfo_MinorVer>
116-
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
117110
<Debugger_HostApplication>D:\ETHEA\SVGShellExtensions\Debug\Preview Handlers\OpenDialog\OpenDialogTest.exe</Debugger_HostApplication>
118111
</PropertyGroup>
119112
<ItemGroup>

Source/SVGShellExtensions32.res

68 Bytes
Binary file not shown.

Source/SVGTextEditor.dproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
<Icon_MainIcon>..\Icons\logo.ico</Icon_MainIcon>
6969
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
7070
<VerInfo_Locale>1033</VerInfo_Locale>
71-
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=SVG Text Editor;FileVersion=1.2.0.0;InternalName=;LegalCopyright=Copyright © 2021 - Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=SVG Text Editor;ProductVersion=1.1;Comments=</VerInfo_Keys>
71+
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=SVG Text Editor;FileVersion=1.2.1.0;InternalName=;LegalCopyright=Copyright © 2021 - Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=SVG Text Editor;ProductVersion=1.2;Comments=</VerInfo_Keys>
7272
<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;Flat UI Light|VCLSTYLE|$(BDSCOMMONDIR)\Styles\FlatUILight.vsf&quot;;&quot;Windows10 BlackPearl|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10BlackPearl.vsf&quot;;&quot;Windows10 Blue Whale|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10BlueWhale.vsf&quot;;&quot;Windows10 Blue Whale LE|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10BlueWhaleLE.vsf&quot;;&quot;Windows10 Clear Day|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10ClearDay.vsf&quot;;&quot;Windows10 Malibu|VCLSTYLE|$(BDSCOMMONDIR)\Styles\Windows10Malibu.vsf&quot;</Custom_Styles>
7373
<DCC_DebugInformation>0</DCC_DebugInformation>
7474
<DCC_ImportedDataReferences>false</DCC_ImportedDataReferences>
@@ -77,6 +77,7 @@
7777
<DCC_DcuOutput>..\Dcu\D10_4</DCC_DcuOutput>
7878
<DCC_DependencyCheckOutputName>..\..\exe\InstantXMLEditor.exe</DCC_DependencyCheckOutputName>
7979
<DCC_Define>NO_VCLSTYLEUTILS;$(DCC_Define)</DCC_Define>
80+
<VerInfo_Release>1</VerInfo_Release>
8081
</PropertyGroup>
8182
<PropertyGroup Condition="'$(Base_Win32)'!=''">
8283
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Bde;$(DCC_Namespace)</DCC_Namespace>

Source/SVGTextEditor.res

0 Bytes
Binary file not shown.

Source/uSVGContextMenuHandler.pas

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@
3232
interface
3333

3434
uses
35-
Winapi.Windows, ActiveX, ComObj, ShlObj, ShellApi;
35+
Winapi.Windows
36+
, ActiveX
37+
, ComObj
38+
, ShlObj
39+
, ShellApi
40+
, SVGInterfaces;
3641

3742
const
3843
MENU_ITEM_OPEN_WITH_EDITOR = 0;
@@ -79,20 +84,21 @@ TSVGContextMenuFactory = class (TComObjectFactory)
7984
implementation
8085

8186
uses
82-
Vcl.Graphics,
83-
ComServ,
84-
Messages,
85-
SysUtils,
86-
Registry,
87-
uLogExcept,
88-
System.Classes,
89-
uSVGSettings,
87+
Vcl.Graphics
88+
, System.Types
89+
, ComServ
90+
, Messages
91+
, SysUtils
92+
, Registry
93+
, uLogExcept
94+
, System.Classes
95+
, uSVGSettings
9096
{$IFNDEF DISABLE_STYLES}
91-
Vcl.Themes,
97+
, Vcl.Themes
9298
{$ENDIF}
93-
dlgExportPNG,
94-
DResources,
95-
SVGInterfaces;
99+
, dlgExportPNG
100+
, DResources
101+
, SVGIconUtils;
96102

97103
// IShellExtInit method
98104
function TSVGContextMenu.InitShellExt(pidlFolder: PItemIDList;
@@ -245,14 +251,14 @@ function TSVGContextMenu.HandleMenuMsg(uMsg: UINT; WParam: WPARAM; LParam: LPARA
245251
var
246252
res: Winapi.Windows.LPARAM;
247253
begin
248-
//log('HandleMenuMsg');
254+
TLogPreview.Add('HandleMenuMsg: HandleMenuMsg');
249255
Result:=MenuMessageHandler ( uMsg, wParam, lParam, res);
250256
end;
251257
252258
//IContextMenu3
253259
function TSVGContextMenu.HandleMenuMsg2(uMsg: UINT; wParam: WPARAM; lParam: LPARAM; var lpResult: LRESULT): HResult; stdcall;
254260
begin
255-
//log('HandleMenuMsg2');
261+
TLogPreview.Add('HandleMenuMsg: HandleMenuMsg2');
256262
Result:= MenuMessageHandler( uMsg, wParam, lParam, lpResult);
257263
end;
258264
@@ -270,6 +276,7 @@ function TSVGContextMenu.MenuMessageHandler(uMsg: UINT; wParam: WPARAM; lParam:
270276
FSVG: ISVG;
271277
Found: Boolean;
272278
begin
279+
TLogPreview.Add('HandleMenuMsg: MenuMessageHandler');
273280
try
274281
case uMsg of
275282
WM_DRAWITEM:
@@ -314,21 +321,26 @@ procedure TSVGContextMenuFactory.UpdateRegistry(Register: Boolean);
314321
begin
315322
//New registration only for .svg files
316323
{$IFDEF WIN64}
317-
if Reg.OpenKey('\.svg\ShellEx\ContextMenuHandlers\SVGContextMenu', True) then
324+
if Reg.OpenKey('\*\ShellEx\ContextMenuHandlers\SVGContextMenu', True) then
318325
Reg.WriteString('', GUIDToString(MyClass_SVGContextMenu_64))
319326
{$ELSE}
320-
if Reg.OpenKey('\.svg\ShellEx\ContextMenuHandlers\SVGContextMenu32', True) then
327+
if Reg.OpenKey('\*\ShellEx\ContextMenuHandlers\SVGContextMenu32', True) then
321328
Reg.WriteString('', GUIDToString(MyClass_SVGContextMenu_32))
322329
{$ENDIF}
323330
end
324331
else
325332
begin
326333
//Old registration
327334
if Reg.OpenKey('\*\ShellEx\ContextMenuHandlers\SVGContextMenu', False) then
328-
Reg.DeleteKey ('\*\ShellEx\ContextMenuHandlers\SVGContextMenu');
335+
Reg.DeleteKey('\*\ShellEx\ContextMenuHandlers\SVGContextMenu');
329336
//New registration only for .svg files
330-
if Reg.OpenKey('\.svg\ShellEx\ContextMenuHandlers\SVGContextMenu32', False) then
331-
Reg.DeleteKey ('\.svg\ShellEx\ContextMenuHandlers\SVGContextMenu32');
337+
{$IFDEF WIN64}
338+
if Reg.OpenKey('\*\ShellEx\ContextMenuHandlers\SVGContextMenu', True) then
339+
Reg.DeleteKey('\*\ShellEx\ContextMenuHandlers\SVGContextMenu');
340+
{$ELSE}
341+
if Reg.OpenKey('\*\ShellEx\ContextMenuHandlers\SVGContextMenu32', False) then
342+
Reg.DeleteKey('\*\ShellEx\ContextMenuHandlers\SVGContextMenu32');
343+
{$ENDIF}
332344
end;
333345
finally
334346
Reg.CloseKey;

Source/uSVGThumbnailHandler.pas

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ implementation
9797
uStreamAdapter,
9898
WinAPI.GDIPObj,
9999
WinAPI.GDIPApi,
100-
uThumbnailHandlerRegister;
100+
uThumbnailHandlerRegister,
101+
SVGIconUtils;
101102

102103
{ TComSVGThumbnailProvider }
103104

@@ -132,9 +133,6 @@ function TComSVGThumbnailProvider.GetThumbnail(cx: uint; out hBitmap: HBITMAP;
132133
LAntiAliasColor := clWebDarkSlategray;
133134
LBitmap.Canvas.Brush.Color := ColorToRGB(LAntiAliasColor);
134135
LBitmap.SetSize(cx, cx);
135-
{$IFDEF IgnoreAntiAliasedColor}
136-
MakeTransparent(LBitmap.Canvas.Handle);
137-
{$ENDIF}
138136
TLogPreview.Add('TComSVGThumbnailProvider.PaintTo start');
139137
FSVG.PaintTo(LBitmap.Canvas.Handle, TRectF.Create(0, 0, cx, cx));
140138
TLogPreview.Add('TComSVGThumbnailProvider.PaintTo end');

0 commit comments

Comments
 (0)