Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 02bad50

Browse files
Merge branch 'release/v4.23.0'
Release v4.23.0
2 parents 90cc0bb + 9c2e46a commit 02bad50

26 files changed

+242
-133
lines changed

‎CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ Releases are listed in reverse version number order.
66

77
> Note that _CodeSnip_ v4 was developed in parallel with v3 for a while. As a consequence some v3 releases have later release dates than early v4 releases.
88
9+
## Release v4.23.0 of 02 April 2024
10+
11+
* Removed marketing names (e.g. "Athens" or "Rio") from Delphi compiler names to save space when the compiler names are displayed in the UI [issue #125].
12+
* Added new `'` entity to REML markup language and boosted REML version to v6 as a consequence [issue #99].
13+
* Refactored class helper code by splitting a single monolithic unit into three more specialised units [issue #90].
14+
* Updated documentation and related help topic re change to REML v6.
15+
916
## Release v4.22.0 of 08 November 2023
1017

1118
* Added support for test compiling snippets with Delphi 12 Athens [issue #121].

‎Docs/Design/FileFormats/export.html‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
66
* obtain one at https://mozilla.org/MPL/2.0/
77
*
8-
* Copyright (C) 2012-2023, Peter Johnson (gravatar.com/delphidabbler).
8+
* Copyright (C) 2012-2024, Peter Johnson (gravatar.com/delphidabbler).
99
*
1010
* CodeSnip File Format Documentation: Export
1111
-->
@@ -300,9 +300,13 @@ <h2>
300300
encoded in REML markup. REML v4 is supported.
301301
</li>
302302
<li>
303-
<span class="highlight">version 7.3 and later:</span> Content is formatted text
303+
<span class="highlight">version 7.3 and 7.4:</span> Content is formatted text
304304
encoded in REML markup. REML v5 is supported.
305305
</li>
306+
<li>
307+
<span class="highlight">version 7.5 and later:</span> Content is formatted text
308+
encoded in REML markup. REML v6 is supported.
309+
</li>
306310
</ul>
307311
</dd>
308312

@@ -447,7 +451,10 @@ <h2>
447451
<span class="highlight">versions 5 to 7.2:</span> supports REML v4.
448452
</li>
449453
<li>
450-
<span class="highlight">version 7.3 &amp; later:</span> supports REML v5.
454+
<span class="highlight">version 7.3 &amp; 7.4:</span> supports REML v5.
455+
</li>
456+
<li>
457+
<span class="highlight">version 7.5 &amp; later:</span> supports REML v6.
451458
</li>
452459
</ul>
453460
</li>
@@ -993,6 +1000,12 @@ <h2>
9931000
<dd>
9941001
Updated in time for CodeSnip v4.22.0 to add support for Delphi 12 Athens.
9951002
</dd>
1003+
<dt>
1004+
<em>Version 7.5 - 2 April 2014</em>
1005+
</dt>
1006+
<dd>
1007+
Added support for REML v6, which is backward compatible with REML v4.
1008+
</dd>
9961009
</dl>
9971010
</dd>
9981011
</dl>
@@ -1042,7 +1055,7 @@ <h2>
10421055
</p>
10431056

10441057
<p>
1045-
Readers of v2 files and later can parse REML as v5, since all versions of REML up to v5 are backwards compatible.
1058+
Readers of v2 files and later can parse REML as v6, since all versions of REML up to v6 are backwards compatible.
10461059
</p>
10471060

10481061
</section>

‎Docs/Design/FileFormats/main-db.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
66
* obtain one at https://mozilla.org/MPL/2.0/
77
*
8-
* Copyright (C) 2012-2023, Peter Johnson (gravatar.com/delphidabbler).
8+
* Copyright (C) 2012-2024, Peter Johnson (gravatar.com/delphidabbler).
99
*
1010
* CodeSnip File Format Documentation: Main Database
1111
-->
@@ -928,7 +928,7 @@ <h2>
928928
<ol>
929929
<li id="footnote-1">
930930
<p>
931-
REML is a text markup language used to format text. REML version 5 is supported. The REML format is documented <a href="../reml.html">here</a>.
931+
REML is a text markup language used to format text. REML version 6 is supported. The REML format is documented <a href="../reml.html">here</a>.
932932
</p>
933933
</li>
934934
<li id="footnote-2">

‎Docs/Design/FileFormats/user-db.html‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
66
* obtain one at https://mozilla.org/MPL/2.0/
77
*
8-
* Copyright (C) 2012-2023, Peter Johnson (gravatar.com/delphidabbler).
8+
* Copyright (C) 2012-2024, Peter Johnson (gravatar.com/delphidabbler).
99
*
1010
* CodeSnip File Format Documentation: User Database
1111
-->
@@ -325,9 +325,13 @@ <h3 id="xml-file">
325325
encoded in REML markup. REML v4 is supported.
326326
</li>
327327
<li>
328-
<span class="highlight">version 6.11 &amp; later:</span> Content is formatted text
328+
<span class="highlight">version 6.11 &amp; 6.12:</span> Content is formatted text
329329
encoded in REML markup. REML v5 is supported.
330330
</li>
331+
<li>
332+
<span class="highlight">version 6.13 &amp; later:</span> Content is formatted text
333+
encoded in REML markup. REML v6 is supported.
334+
</li>
331335
</ul>
332336
</dd>
333337

@@ -472,7 +476,10 @@ <h3 id="xml-file">
472476
<span class="highlight">versions 5 &amp; 6.10:</span> supports REML v4.
473477
</li>
474478
<li>
475-
<span class="highlight">version 6.11 &amp; later:</span> supports REML v5.
479+
<span class="highlight">version 6.11 &amp; 6.12:</span> supports REML v5.
480+
</li>
481+
<li>
482+
<span class="highlight">version 6.13 &amp; later:</span> supports REML v6.
476483
</li>
477484
</ul>
478485
</li>
@@ -1029,6 +1036,12 @@ <h2>
10291036
<dd>
10301037
Updated in time for CodeSnip v4.22.0 to add support for Delphi 12 Athens.
10311038
</dd>
1039+
<dt>
1040+
<em>Version 6.13 - 2 April 2024</em>
1041+
</dt>
1042+
<dd>
1043+
Updated with CodeSnip v4.23.0 to add support for REML v6, which is backwards compatible with REML v4.
1044+
</dd>
10321045
</dl>
10331046
</dd>
10341047
</dl>
@@ -1087,7 +1100,7 @@ <h3>
10871100
</ul>
10881101

10891102
<p>
1090-
Readers of v2 and later files may parse REML from any file version as if it were REML v5, since all versions of REML up to v5 are compatible.
1103+
Readers of v2 and later files may parse REML from any file version as if it were REML v6, since all versions of REML up to v6 are compatible.
10911104
</p>
10921105

10931106
<h3>

‎Docs/Design/reml.html‎

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22

33
<!--
4-
* This file copyright (C) 2020-2023, Peter Johnson (gravatar.com/delphidabbler) and
4+
* This file copyright (C) 2020-2024, Peter Johnson (gravatar.com/delphidabbler) and
55
* is licensed under the MIT License: https://opensource.org/licenses/MIT
66
*
77
* DelphiDabbler Code Snippets Database Documentation: REML markup language
@@ -251,7 +251,7 @@ <h1>
251251
The REML language is a SGML language similar to a greatly simplified XHTML. The are a small number of tags and character entities that can be used.
252252
</p>
253253
<aside>
254-
<strong>Note:</strong> The language described here is REML v5. v4 is still in regular use in CodeSnip up to v4.20.x. Earlier versions are obsolete.
254+
<strong>Note:</strong> The language described here is REML v6. v4 is still in regular use in CodeSnip up to v4.20.x. Earlier versions are obsolete.
255255
</aside>
256256

257257
</section>
@@ -524,6 +524,10 @@ <h1>
524524
<td><code>&amp;deg;</code></td>
525525
<td>°</td>
526526
</tr>
527+
<tr>
528+
<td><code>&amp;cent;</code></td>
529+
<td>¢</td>
530+
</tr>
527531
<tr>
528532
<td><code>&amp;laquo;</code></td>
529533
<td>«</td>
@@ -536,6 +540,10 @@ <h1>
536540
<td><code>&amp;iquest;</code></td>
537541
<td>¿</td>
538542
</tr>
543+
<tr>
544+
<td><code>&amp;apos;</code></td>
545+
<td>'</td>
546+
</tr>
539547
</tbody>
540548
</table>
541549

@@ -644,8 +652,21 @@ <h1>Change Log</h1>
644652
</li>
645653
</ul>
646654

647-
</section>
655+
<p>
656+
<strong>v6 of 2024年04月02日</strong>
657+
</p>
658+
659+
<p>
660+
Introduced in CodeSnip v4.23.0
661+
</p>
648662

663+
<ul>
664+
<li>
665+
Added entity: <code class="value">&amp;apos;</code>.
666+
</li>
667+
</ul>
668+
669+
</section>
649670

650671
</body>
651672

‎Docs/License.html‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22

33
<!--
4-
* Copyright (C) 2012-2023, Peter Johnson (gravatar.com/delphidabbler).
4+
* Copyright (C) 2012-2024, Peter Johnson (gravatar.com/delphidabbler).
55
*
66
* CodeSnip license.
77
*
@@ -231,7 +231,7 @@ <h2>
231231
Executable Program
232232
</h2>
233233
<p>
234-
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2023 by <a
234+
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2024 by <a
235235
href="https://gravatar.com/delphidabbler"
236236
>Peter D Johnson</a>.
237237
</p>
@@ -1801,7 +1801,7 @@ <h2 id="ddab-exclusive">
18011801
</h2>
18021802

18031803
<p>
1804-
Files covered by this license are original work, copyright &copy; 2012-2023, <a href="https://gravatar.com/delphidabbler">Peter D Johnson</a>.
1804+
Files covered by this license are original work, copyright &copy; 2012-2024, <a href="https://gravatar.com/delphidabbler">Peter D Johnson</a>.
18051805
</p>
18061806

18071807
<p>

‎Src/ClassHelpers.UActions.pas‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
* This Source Code Form is subject to the terms of the Mozilla Public License,
3+
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
4+
* obtain one at https://mozilla.org/MPL/2.0/
5+
*
6+
* Copyright (C) 2012-2024, Peter Johnson (gravatar.com/delphidabbler).
7+
*
8+
* Class helper for TCustomActionList
9+
*
10+
* Extracted in 2024 from original UClassHelpers unit (2012-2021)
11+
}
12+
13+
unit ClassHelpers.UActions;
14+
15+
interface
16+
17+
uses
18+
// Delphi
19+
ActnList;
20+
21+
type
22+
/// <summary>Class helper that adds a method to TCustomActionList that can
23+
/// update all the actions in the list.</summary>
24+
TActionListHelper = class helper for TCustomActionList
25+
public
26+
/// <summary>Updates all actions in the action list by calling their Update
27+
/// methods.</summary>
28+
procedure Update;
29+
end;
30+
31+
implementation
32+
33+
{ TActionListHelper }
34+
35+
procedure TActionListHelper.Update;
36+
var
37+
Action: TContainedAction; // each action in list
38+
begin
39+
for Action in Self do
40+
Action.Update;
41+
end;
42+
43+
end.

‎Src/ClassHelpers.UControls.pas‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
* This Source Code Form is subject to the terms of the Mozilla Public License,
3+
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
4+
* obtain one at https://mozilla.org/MPL/2.0/
5+
*
6+
* Copyright (C) 2012-2024, Peter Johnson (gravatar.com/delphidabbler).
7+
*
8+
* Class helper for TControl.
9+
*
10+
* Extracted in 2024 from original UClassHelpers unit (2012-2021).
11+
}
12+
13+
unit ClassHelpers.UControls;
14+
15+
interface
16+
17+
uses
18+
// Delphi
19+
Controls, Menus;
20+
21+
type
22+
/// <summary>Class helper that adds functionality to TControl.</summary>
23+
TControlHelper = class helper for TControl
24+
public
25+
/// <summary>Gets reference to pop-up menu assigned to protected PopupMenu
26+
/// property.</summary>
27+
function GetPopupMenu: TPopupMenu;
28+
/// <summary>Checks if protected PopupMenu property is assigned.</summary>
29+
function HasPopupMenu: Boolean;
30+
/// <summary>Refreshes control's action. Any changes in action that affect
31+
/// state of control are reflected in control.</summary>
32+
procedure RefreshAction;
33+
/// <summary>Refreshes all owned controls to reflect any changes in their
34+
/// associated actions.</summary>
35+
procedure RefreshActions;
36+
end;
37+
38+
implementation
39+
40+
{ TControlHelper }
41+
42+
function TControlHelper.GetPopupMenu: TPopupMenu;
43+
begin
44+
Result := PopupMenu;
45+
end;
46+
47+
function TControlHelper.HasPopupMenu: Boolean;
48+
begin
49+
Result := Assigned(PopupMenu);
50+
end;
51+
52+
procedure TControlHelper.RefreshAction;
53+
begin
54+
if Assigned(Action) then
55+
ActionChange(Action, False);
56+
end;
57+
58+
procedure TControlHelper.RefreshActions;
59+
var
60+
Idx: Integer; // loops through all controls
61+
begin
62+
for Idx := 0 to Pred(ComponentCount) do
63+
if Components[Idx] is TControl then
64+
(Components[Idx] as TControl).RefreshAction;
65+
end;
66+
67+
end.
68+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /