Skip to content

Commit e1a997a

Browse files
ver. 1.5.2
- Fixed loading images with "spaces" in the filename - Fixed immediate-loading of new images when editing the file - During loading of remote images, user can stop loading pressing "Esc" - Updated Copyright for the Editor
1 parent 1b2898d commit e1a997a

10 files changed

+55
-61
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Markdown Editor and Shell Extensions [![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0)
22

3-
**Latest Version 1.5.1 - 26 Jun 2023**
3+
**Latest Version 1.5.2 - 29 Jun 2023**
44

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

@@ -59,6 +59,12 @@ To manually install the SVGShellExtensions.dll follow these steps:
5959

6060
## Release Notes ##
6161

62+
29 Jun 2023: ver. 1.5.2
63+
- Fixed loading images with "spaces" in the filename
64+
- Fixed immediate-loading of new images when editing the file
65+
- During loading of remote images, user can stop loading pressing "Esc"
66+
- Updated Copyright for the Editor
67+
6268
26 Jun 2023: ver. 1.5.1
6369
- Fixed Preview of Markdown files with extensions different from .markdown
6470

Setup/MDShellExtensions.iss

Lines changed: 2 additions & 2 deletions
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 'MarkDown Shell Extensions and Editor'
4-
#define MyAppVersion '1.5.1'
4+
#define MyAppVersion '1.5.2'
55

66
[Setup]
77
AppName={#MyAppName}
@@ -60,7 +60,7 @@ Source: "..\Bin64\ssleay32.dll"; DestDir: {app}; Components: ShellExtensions; Fl
6060

6161
[Icons]
6262
Name: "{group}\MDTextEditor"; Filename: "{app}\MDTextEditor.exe"; WorkingDir: "{app}"; IconFilename: "{app}\MDTextEditor.exe"; Components: Editor
63-
Name: "{commondesktop}\LottieTextEditor"; Filename: "{app}\MDTextEditor.exe"; Tasks: desktopicon; Components: Editor
63+
Name: "{commondesktop}\MarkdownTextEditor"; Filename: "{app}\MDTextEditor.exe"; Tasks: desktopicon; Components: Editor
6464

6565
[Run]
6666
Filename: {app}\MDTextEditor.exe; Description: {cm:LaunchProgram,'MD Text Editor'}; Flags: nowait postinstall skipifsilent; Components: Editor

Source/MDShellEx.Resources.pas

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ procedure TdmResources.HtmlViewerImageRequest(Sender: TObject;
209209
AStream := nil;
210210

211211
// is "fullName" a local file, if not aquire file from internet
212-
If FileExists(ASource) then
213-
LFullName := ASource
214-
else
212+
// replace %20 spaces to normal spaces
213+
LFullName := StringReplace(ASource,'%20',' ',[rfReplaceAll]);
214+
If not FileExists(LFullName) then
215215
begin
216-
LFullName := IncludeTrailingPathDelimiter(LHtmlViewer.ServerRoot)+ASource;
216+
LFullName := IncludeTrailingPathDelimiter(LHtmlViewer.ServerRoot)+LFullName;
217217
If not FileExists(LFullName) then
218218
LFullName := ASource;
219219
end;

Source/MDTextEditor.ViewerMainForm.dfm

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ object frmMain: TfrmMain
1111
Font.Height = -12
1212
Font.Name = 'Segoe UI'
1313
Font.Style = []
14+
KeyPreview = True
1415
Position = poScreenCenter
1516
ShowHint = True
1617
OnAfterMonitorDpiChanged = FormAfterMonitorDpiChanged
1718
OnBeforeMonitorDpiChanged = FormBeforeMonitorDpiChanged
1819
OnClose = FormClose
1920
OnCreate = FormCreate
2021
OnDestroy = FormDestroy
22+
OnKeyPress = FormKeyPress
2123
OnMouseWheelDown = FormMouseWheelDown
2224
OnMouseWheelUp = FormMouseWheelUp
2325
OnResize = FormResize
@@ -234,7 +236,7 @@ object frmMain: TfrmMain
234236
36)
235237
object lblTitle: TLabel
236238
AlignWithMargins = True
237-
Left = 41
239+
Left = 40
238240
Top = 3
239241
Width = 116
240242
Height = 30
@@ -245,7 +247,7 @@ object frmMain: TfrmMain
245247
ExplicitHeight = 15
246248
end
247249
object ProcessorDialectLabel: TLabel
248-
Left = 427
250+
Left = 423
249251
Top = 11
250252
Width = 83
251253
Height = 15
@@ -316,7 +318,7 @@ object frmMain: TfrmMain
316318
AlignWithMargins = True
317319
Left = 3
318320
Top = 3
319-
Width = 32
321+
Width = 31
320322
Height = 30
321323
Align = alLeft
322324
AutoSize = True
@@ -339,7 +341,7 @@ object frmMain: TfrmMain
339341
end
340342
end
341343
object ProcessorDialectComboBox: TComboBox
342-
Left = 513
344+
Left = 509
343345
Top = 8
344346
Width = 170
345347
Height = 23
@@ -1086,4 +1088,10 @@ object frmMain: TfrmMain
10861088
Left = 448
10871089
Top = 368
10881090
end
1091+
object LoadTimer: TTimer
1092+
Enabled = False
1093+
OnTimer = LoadTimerTimer
1094+
Left = 272
1095+
Top = 352
1096+
end
10891097
end

Source/MDTextEditor.ViewerMainForm.pas

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ TfrmMain = class(TForm, IDragDrop)
197197
VirtualImageList20: TVirtualImageList;
198198
PanelCloseButton: TPanel;
199199
SVGIconImageCloseButton: TSVGIconImage;
200+
LoadTimer: TTimer;
200201
procedure WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); message WM_GETMINMAXINFO;
201202
procedure acOpenFileExecute(Sender: TObject);
202203
procedure acSaveExecute(Sender: TObject);
@@ -274,7 +275,10 @@ TfrmMain = class(TForm, IDragDrop)
274275
procedure PageControlMouseEnter(Sender: TObject);
275276
procedure PageControlMouseLeave(Sender: TObject);
276277
procedure SVGIconImageCloseButtonClick(Sender: TObject);
278+
procedure FormKeyPress(Sender: TObject; var Key: Char);
279+
procedure LoadTimerTimer(Sender: TObject);
277280
private
281+
FEditingInProgress: Boolean;
278282
FirstAction: Boolean;
279283
MinFormWidth, MinFormHeight, MaxFormWidth, MaxFormHeight: Integer;
280284
FProcessingFiles: Boolean;
@@ -631,6 +635,12 @@ procedure TfrmMain.FormDestroy(Sender: TObject);
631635
inherited;
632636
end;
633637

638+
procedure TfrmMain.FormKeyPress(Sender: TObject; var Key: Char);
639+
begin
640+
if Key = Chr(27) then
641+
dmResources.StopLoadingImages(True);
642+
end;
643+
634644
procedure TfrmMain.FormMouseWheelDown(Sender: TObject; Shift: TShiftState;
635645
MousePos: TPoint; var Handled: Boolean);
636646
begin
@@ -889,6 +899,16 @@ procedure TfrmMain.LoadOpenedFiles;
889899
UpdateMDViewer(True);
890900
end;
891901

902+
procedure TfrmMain.LoadTimerTimer(Sender: TObject);
903+
begin
904+
if FEditingInProgress then
905+
begin
906+
FEditingInProgress := False;
907+
dmResources.StopLoadingImages(False);
908+
UpdateMDViewer(True);
909+
end;
910+
end;
911+
892912
procedure TfrmMain.FormCreate(Sender: TObject);
893913
var
894914
FileVersionStr: string;
@@ -1012,6 +1032,8 @@ procedure TfrmMain.SynEditChange(Sender: TObject);
10121032
begin
10131033
if Sender = CurrentEditor then
10141034
begin
1035+
FEditingInProgress := True;
1036+
LoadTimer.Enabled := False;
10151037
dmResources.StopLoadingImages(True);
10161038
UpdateMDViewer(False);
10171039
end;
@@ -1260,6 +1282,8 @@ procedure TfrmMain.RemoveEditingFile(EditingFile: TEditingFile);
12601282
//Confirm save changes
12611283
ConfirmChanges(EditingFile);
12621284

1285+
PanelCloseButton.Visible := False;
1286+
12631287
//Rimuovo il riferimento
12641288
if FMDFile = EditingFile then
12651289
FMDFile := nil;
@@ -1287,6 +1311,7 @@ procedure TfrmMain.acCloseAllExecute(Sender: TObject);
12871311
begin
12881312
FProcessingFiles := True;
12891313
try
1314+
PanelCloseButton.Visible := False;
12901315
while EditFileList.Count > 0 do
12911316
RemoveEditingFile(TEditingFile(EditFileList.items[0]));
12921317
finally
@@ -1755,6 +1780,7 @@ procedure TfrmMain.ActionListUpdate(Action: TBasicAction;
17551780
OpenDialog.InitialDir := InitialDir;
17561781
SaveDialog.InitialDir := InitialDir;
17571782
end;
1783+
LoadTimer.Enabled := True;
17581784
end;
17591785

17601786
procedure TfrmMain.actMenuExecute(Sender: TObject);

Source/MDTextEditor.dpr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ uses
6161
begin
6262
Application.Initialize;
6363
Application.MainFormOnTaskBar := True;
64-
Application.Title := Title_MDViewer+'- © 2021-2022 Ethea S.r.l.';
64+
Application.ActionUpdateDelay := 50;
65+
Application.Title := Title_MDViewer+'- © 2021-2023 Ethea S.r.l.';
6566
with TSplashForm.Create(nil) do
6667
Try
6768
Show;

Source/MDTextEditor.dproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<Icon_MainIcon>..\Icons\logo.ico</Icon_MainIcon>
6868
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
6969
<VerInfo_Locale>1040</VerInfo_Locale>
70-
<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>
70+
<VerInfo_Keys>CompanyName=Ethea S.r.l.;FileDescription=Markdown files Editor;FileVersion=1.5.2.0;InternalName=;LegalCopyright=Copyright © 2021-2023 - Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProductName=Markdown files Editor;ProductVersion=1.5;Comments=</VerInfo_Keys>
7171
<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>
7272
<DCC_DebugInformation>0</DCC_DebugInformation>
7373
<DCC_ImportedDataReferences>false</DCC_ImportedDataReferences>
@@ -76,7 +76,7 @@
7676
<DCC_DcuOutput>..\Dcu\$(Platform)\$(Config)</DCC_DcuOutput>
7777
<DCC_DependencyCheckOutputName>..\..\exe\InstantXMLEditor.exe</DCC_DependencyCheckOutputName>
7878
<VerInfo_MinorVer>5</VerInfo_MinorVer>
79-
<VerInfo_Release>1</VerInfo_Release>
79+
<VerInfo_Release>2</VerInfo_Release>
8080
</PropertyGroup>
8181
<PropertyGroup Condition="'$(Base_Win32)'!=''">
8282
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
@@ -130,7 +130,6 @@
130130
<DCC_MapFile>3</DCC_MapFile>
131131
<DCC_DebugInformation>2</DCC_DebugInformation>
132132
<DCC_IntegerOverflowCheck>true</DCC_IntegerOverflowCheck>
133-
<Debugger_RunParams>D:\ETHEA\GitHub_EtheaDev\InstantObjects\InstantObjects.wiki\Home.md</Debugger_RunParams>
134133
</PropertyGroup>
135134
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
136135
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>

Source/MDTextEditor.res

0 Bytes
Binary file not shown.

Test/MarkDown Support Test.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

Test/markdownlogo.png

-1.07 KB
Binary file not shown.

0 commit comments

Comments
 (0)