|
3 | 3 | * v. 2.0. If a copy of the MPL was not distributed with this file, You can |
4 | 4 | * obtain one at https://mozilla.org/MPL/2.0/ |
5 | 5 | * |
6 | | - * Copyright (C) 2005-2021, Peter Johnson (gravatar.com/delphidabbler). |
| 6 | + * Copyright (C) 2005-2024, Peter Johnson (gravatar.com/delphidabbler). |
7 | 7 | * |
8 | 8 | * Class that provides information about the application. |
9 | 9 | } |
@@ -36,12 +36,6 @@ TAppInfo = class(TNoConstructObject) |
36 | 36 | const ProgramName = 'CodeSnip-p'; |
37 | 37 | {$ENDIF} |
38 | 38 | {Name of program} |
39 | | - {$IFNDEF PORTABLE} |
40 | | - const ProgramCaption = 'CodeSnip 4'; |
41 | | - {$ELSE} |
42 | | - const ProgramCaption = 'CodeSnip 4 (Portable Edition)'; |
43 | | - {$ENDIF} |
44 | | - {Name of program displayed in main window and task bar caption} |
45 | 39 | const FullProgramName = CompanyName + ' ' + ProgramName; |
46 | 40 | {Full name of program, including company name} |
47 | 41 | const ProgramID = 'codesnip'; |
@@ -107,6 +101,10 @@ TAppInfo = class(TNoConstructObject) |
107 | 101 | {Gets version number of program's executable file. |
108 | 102 | @return Version number as dotted quad. |
109 | 103 | } |
| 104 | + class function ProgramCaption: string; |
| 105 | + {Gets the program caption to be displayed in main window, |
| 106 | + @return Required caption, |
| 107 | + } |
110 | 108 | end; |
111 | 109 |
|
112 | 110 |
|
@@ -214,6 +212,19 @@ class function TAppInfo.HelpFileName: string; |
214 | 212 | Result := AppExeDir + '\CodeSnip.chm'; |
215 | 213 | end; |
216 | 214 |
|
| 215 | +class function TAppInfo.ProgramCaption: string; |
| 216 | +var |
| 217 | + ProductVer: TVersionNumber; |
| 218 | +begin |
| 219 | + ProductVer := TVersionInfo.ProductVerNum; |
| 220 | + Result := Format( |
| 221 | + 'CodeSnip v%d.%d.%d', [ProductVer.V1, ProductVer.V2, ProductVer.V3] |
| 222 | + ); |
| 223 | + {$IFDEF PORTABLE} |
| 224 | + Result := Result + ' (Portable Edition)' |
| 225 | + {$ENDIF} |
| 226 | +end; |
| 227 | + |
217 | 228 | class function TAppInfo.ProgramFileVersion: string; |
218 | 229 | {Gets version number of program's executable file. |
219 | 230 | @return Version number as dotted quad. |
|
0 commit comments