Skip to content

Commit 497b61f

Browse files
committed
CodeSnip version 4.13.1
1 parent 7684f1b commit 497b61f

File tree

12 files changed

+298
-192
lines changed

12 files changed

+298
-192
lines changed

Docs/ChangeLogs/ChangeLog-v4.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@
33
; v. 2.0. If a copy of the MPL was not distributed with this file, You can
44
; obtain one at http://mozilla.org/MPL/2.0/
55
;
6-
; Copyright (C) 2012-2014, Peter Johnson (www.delphidabbler.com).
6+
; Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
77
;
88
; $Rev$
99
; $Date$
1010
;
1111
; Change Log for CodeSnip Release 4
1212
; ------------------------------------------------------------------------------
1313

14+
Release v4.13.1 of 29 September 2015
15+
+ Improved operating system detection to detect Windows 10.
16+
+ Modified program's manifest to declare it compatible with Windows 8 to 10.
17+
+ Code that determines which system font to use no longer depends on OS version but simply on font availability.
18+
+ Updated copyright date in program license as displayed in help, about box, installer and documentation.
19+
1420
Release v4.13.0 of 5 September 2015
1521
+ Added support for test compilation with, and detection of, Delphi 10 Seattle compiler.
1622
+ Made some minor changes to method used to build required type library to remove dependency on the MS MIDL compiler, greatly simplifying build process.

Docs/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ This Source Code Form is subject to the terms of the Mozilla Public
55
License, v. 2.0. If a copy of the MPL was not distributed with this
66
file, You can obtain one at http://mozilla.org/MPL/2.0/.
77

8-
All files are copyright (C) 2012-2014, Peter Johnson (www.delphidabbler.com).
8+
All files are copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).

Docs/License.html

+2-2
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 http://mozilla.org/MPL/2.0/
77
*
8-
* Copyright (C) 2012-2014, Peter Johnson (www.delphidabbler.com).
8+
* Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
99
*
1010
* $Rev$
1111
* $Date$
@@ -228,7 +228,7 @@ <h2>
228228
Executable Program
229229
</h2>
230230
<p>
231-
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2014 by Peter D
231+
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2015 by Peter D
232232
Johnson, <a
233233
href="http://www.delphidabbler.com"
234234
>http://www.delphidabbler.com</a>.

Src/3rdParty/PJSysInfo.pas

+214-115
Large diffs are not rendered by default.

Src/Help/HTML/license.htm

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
55
* obtain one at http://mozilla.org/MPL/2.0/
66
*
7-
* Copyright (C) 2012-2014, Peter Johnson (www.delphidabbler.com).
7+
* Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
88
*
99
* $Rev$
1010
* $Date$
@@ -30,7 +30,7 @@ <h1>
3030
<a name="license"></a>Summary of End User License Agreement
3131
</h1>
3232
<p>
33-
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2014 by Peter D
33+
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2015 by Peter D
3434
Johnson, <a
3535
href="http://delphidabbler.com"
3636
class="weblink"

Src/Install/Assets/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ This Source Code Form is subject to the terms of the Mozilla Public
55
License, v. 2.0. If a copy of the MPL was not distributed with this
66
file, You can obtain one at http://mozilla.org/MPL/2.0/.
77

8-
All files are copyright (C) 2012-2014, Peter Johnson (www.delphidabbler.com).
8+
All files are copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).

Src/Install/Assets/License.rtf

-33 Bytes
Binary file not shown.

Src/Res/HTML/dlg-about-program-tplt.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
1010
* obtain one at http://mozilla.org/MPL/2.0/
1111
*
12-
* Copyright (C) 2005-2014, Peter Johnson (www.delphidabbler.com).
12+
* Copyright (C) 2005-2015, Peter Johnson (www.delphidabbler.com).
1313
*
1414
* $Rev$
1515
* $Date$
@@ -50,7 +50,7 @@
5050
<body>
5151

5252
<p>
53-
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2014 by Peter D
53+
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2015 by Peter D
5454
Johnson, <a
5555
class="external-link"
5656
href="http://delphidabbler.com"

Src/Res/Misc/CodeSnip.manifest

+22-11
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@
55
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
66
* obtain one at http://mozilla.org/MPL/2.0/
77
*
8-
* Copyright (C) 2012-2014, Peter Johnson (www.delphidabbler.com).
8+
* Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
99
*
1010
* $Rev$
1111
* $Date$
1212
*
13-
* CodeSnip's Windows manifest file.
14-
*
15-
* GUIDs used in compatibility section taken from
16-
* http://msdn.microsoft.com/en-us/library/windows/desktop/dn481241.aspx
13+
* Application manifest file.
1714
-->
1815

19-
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
16+
<assembly
17+
manifestVersion="1.0"
18+
xmlns="urn:schemas-microsoft-com:asm.v1"
19+
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"
20+
>
2021
<assemblyIdentity
2122
type="win32"
2223
name="CodeSnip"
@@ -31,21 +32,31 @@
3132
version="6.0.0.0"
3233
publicKeyToken="6595b64144ccf1df"
3334
language="*"
34-
processorArchitecture="*"/>
35+
processorArchitecture="*"
36+
/>
3537
</dependentAssembly>
3638
</dependency>
37-
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
39+
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
3840
<security>
3941
<requestedPrivileges>
40-
<requestedExecutionLevel level="asInvoker" />
42+
<requestedExecutionLevel
43+
level="asInvoker"
44+
uiAccess="false"
45+
/>
4146
</requestedPrivileges>
4247
</security>
4348
</trustInfo>
4449
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
4550
<application>
46-
<!-- App has been tested on Windows 7 -->
51+
<!-- Windows 10 -->
52+
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
53+
<!-- Windows 8.1 -->
54+
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
55+
<!-- Windows 8 -->
56+
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
57+
<!-- Windows 7 -->
4758
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
48-
<!-- App has been tested on Windows Vista -->
59+
<!-- Windows Vista -->
4960
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
5061
</application>
5162
</compatibility>

Src/UFontHelper.pas

+43-53
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
44
* obtain one at http://mozilla.org/MPL/2.0/
55
*
6-
* Copyright (C) 2006-2014, Peter Johnson (www.delphidabbler.com).
6+
* Copyright (C) 2006-2015, Peter Johnson (www.delphidabbler.com).
77
*
88
* $Rev$
99
* $Date$
@@ -80,25 +80,21 @@ TFontHelper = class(TNoConstructObject)
8080
}
8181
strict private
8282
const
83-
DefaultFontName = 'Arial'; // Default font name
84-
DefaultFontSize = 8; // Default font size
83+
FallbackFontName = 'Arial'; // Fallback font name
84+
FallbackFontSize = 8; // Fallback font size
8585

86-
DefaultContentFontName = DefaultFontName; // Default content font name
87-
DefaultContentFontSize = DefaultFontSize; // Default content font size
86+
VistaFontName = 'Segoe UI'; // Vista default font name
87+
VistaFontSize = 9; // Vista default font size
88+
VistaContentFontName = 'Calibri'; // Vista content font name
89+
VistaContentFontSize = 10; // Vista content font size
8890

89-
VistaFontName = 'Segoe UI'; // Vista default font name
90-
VistaFontSize = 9; // Vista default font size
91-
VistaContentFontName = 'Calibri'; // Vista content font name
92-
VistaContentFontSize = 10; // Vista content font size
91+
XPFontName = 'Tahoma'; // XP default font name
92+
XPFontSize = FallbackFontSize; // XP default font size
93+
XPContentFontName = 'Verdana'; // XP content font name
94+
XPContentFontSize = FallbackFontSize; // XP content font size
9395

94-
XPFontName = 'Tahoma'; // XP default font name
95-
XPFontSize = DefaultFontSize; // XP default font size
96-
XPContentFontName = 'Verdana'; // XP content font name
97-
XPContentFontSize // XP content font size
98-
= DefaultContentFontSize;
99-
100-
DefaultMonoFontName = 'Courier New'; // Default mono font name
101-
DefaultMonoFontSize = 8; // Default mono font size
96+
DefaultMonoFontName = 'Courier New'; // Default mono font name
97+
DefaultMonoFontSize = 8; // Default mono font size
10298
end;
10399

104100

@@ -109,7 +105,7 @@ implementation
109105
// Delphi
110106
SysUtils, Windows, Forms,
111107
// Project
112-
UGraphicUtils, UStrUtils, USystemInfo;
108+
UGraphicUtils, UStrUtils;
113109

114110

115111
{ TFontHelper }
@@ -193,28 +189,25 @@ class procedure TFontHelper.SetContentFont(const Font: TFont);
193189
@param Font [in] Font to be set.
194190
}
195191
begin
196-
// Set default content font, size and style
197-
Font.Name := DefaultContentFontName;
198-
Font.Size := DefaultContentFontSize;
199-
Font.Style := [];
200-
if TOSInfo.IsReallyWindowsVistaOrGreater then
192+
// Try Vista & later content font. If that fails try XP/Win2k font. One of the
193+
// two should always work, but in case fonts have been uninstalled, use a
194+
// fallback font.
195+
if FontExists(VistaContentFontName) then
201196
begin
202-
// We have Vista or later - use Calibri if installed
203-
if FontExists(VistaContentFontName) then
204-
begin
205-
Font.Name := VistaContentFontName;
206-
Font.Size := VistaContentFontSize;
207-
end;
197+
Font.Name := VistaContentFontName;
198+
Font.Size := VistaContentFontSize;
199+
end
200+
else if FontExists(XPContentFontName) then
201+
begin
202+
Font.Name := XPContentFontName;
203+
Font.Size := XPContentFontSize;
208204
end
209205
else
210206
begin
211-
// Earlier OS than Vista (i.e. 2000 or XP)
212-
if FontExists(XPContentFontName) then
213-
begin
214-
Font.Name := XPContentFontName;
215-
Font.Size := XPContentFontSize;
216-
end;
207+
Font.Name := FallbackFontName;
208+
Font.Size := FallbackFontSize;
217209
end;
210+
Font.Style := [];
218211
end;
219212

220213
class procedure TFontHelper.SetDefaultBaseFont(const BaseFont: TFont);
@@ -233,7 +226,7 @@ class procedure TFontHelper.SetDefaultBaseFont(const BaseFont: TFont);
233226
SetDefaultFont(DefaultFont);
234227
// font delta is difference between normal default font size and that used
235228
// on a specific OS (e.g. Vista uses Segoe UI 9 rather than MS Sans Serif 8)
236-
FontDelta := DefaultFont.Size - DefaultFontSize;
229+
FontDelta := DefaultFont.Size - FallbackFontSize;
237230
// change base font name and size as required
238231
BaseFont.Name := DefaultFont.Name;
239232
BaseFont.Size := BaseFont.Size + FontDelta;
@@ -255,28 +248,25 @@ class procedure TFontHelper.SetDefaultFont(const Font: TFont);
255248
@param Font [in] Font to be set.
256249
}
257250
begin
258-
// Set default font, size and style
259-
Font.Name := DefaultFontName;
260-
Font.Size := DefaultFontSize;
261-
Font.Style := [];
262-
if TOSInfo.IsReallyWindowsVistaOrGreater then
251+
// Try Vista & later default font. If that fails try XP/Win2k font. One of the
252+
// two should always work, but in case fonts have been uninstalled, use a
253+
// fallback font.
254+
if FontExists(VistaFontName) then
255+
begin
256+
Font.Name := VistaFontName;
257+
Font.Size := VistaFontSize;
258+
end
259+
else if FontExists(XPFontName) then
263260
begin
264-
// Vista or later
265-
if FontExists(VistaFontName) then
266-
begin
267-
Font.Name := VistaFontName;
268-
Font.Size := VistaFontSize;
269-
end;
261+
Font.Name := XPFontName;
262+
Font.Size := XPFontSize;
270263
end
271264
else
272265
begin
273-
// Earlier OS than Vista (i.e. 2000 or XP)
274-
if FontExists(XPFontName) then
275-
begin
276-
Font.Name := XPFontName;
277-
Font.Size := XPFontSize;
278-
end;
266+
Font.Name := FallbackFontName;
267+
Font.Size := FallbackFontSize;
279268
end;
269+
Font.Style := [];
280270
end;
281271

282272
class procedure TFontHelper.SetDefaultFonts(const Fonts: array of TFont);

Src/VCodeSnip.vi

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212

1313
[Fixed File Info]
14-
File Version #=4, 13, 0, 251
15-
Product Version #=4, 13, 0, 0
14+
File Version #=4, 13, 1, 252
15+
Product Version #=4, 13, 1, 0
1616
File OS=4
1717
File Type=1
1818
File Sub-Type=0

Src/VCodeSnipPortable.vi

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212

1313
[Fixed File Info]
14-
File Version #=4, 13, 0, 251
15-
Product Version #=4, 13, 0, 0
14+
File Version #=4, 13, 1, 252
15+
Product Version #=4, 13, 1, 0
1616
File OS=4
1717
File Type=1
1818
File Sub-Type=0

0 commit comments

Comments
 (0)