Skip to content

Commit d5477e1

Browse files
author
delphidabbler
committed
Renamed Web.UInfo unit as UUrl and TWebInfo as TURL.
Changed all affected units.
1 parent 0448277 commit d5477e1

10 files changed

+26
-31
lines changed

Src/CodeSnip.dpr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ uses
356356
UUnitAnalyser in 'UUnitAnalyser.pas',
357357
UUnitsChkListMgr in 'UUnitsChkListMgr.pas',
358358
UURIEncode in 'UURIEncode.pas',
359+
UUrl in 'UUrl.pas',
359360
UUrlMonEx in 'UUrlMonEx.pas',
360361
UUserDBBackup in 'UUserDBBackup.pas',
361362
UUserDBMgr in 'UUserDBMgr.pas',
@@ -375,8 +376,7 @@ uses
375376
UWindowSettings in 'UWindowSettings.pas',
376377
UXMLDocConsts in 'UXMLDocConsts.pas',
377378
UXMLDocHelper in 'UXMLDocHelper.pas',
378-
UXMLDocumentEx in 'UXMLDocumentEx.pas',
379-
Web.UInfo in 'Web.UInfo.pas';
379+
UXMLDocumentEx in 'UXMLDocumentEx.pas';
380380

381381
// Include resources
382382
{$Resource ExternalObj.tlb} // Type library file

Src/CodeSnip.dproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@
557557
<DCCReference Include="UUnitAnalyser.pas"/>
558558
<DCCReference Include="UUnitsChkListMgr.pas"/>
559559
<DCCReference Include="UURIEncode.pas"/>
560+
<DCCReference Include="UUrl.pas"/>
560561
<DCCReference Include="UUrlMonEx.pas"/>
561562
<DCCReference Include="UUserDBBackup.pas"/>
562563
<DCCReference Include="UUserDBMgr.pas"/>
@@ -577,7 +578,6 @@
577578
<DCCReference Include="UXMLDocConsts.pas"/>
578579
<DCCReference Include="UXMLDocHelper.pas"/>
579580
<DCCReference Include="UXMLDocumentEx.pas"/>
580-
<DCCReference Include="Web.UInfo.pas"/>
581581
<None Include="CodeSnip.todo"/>
582582
<BuildConfiguration Include="Base">
583583
<Key>Base</Key>

Src/FmBugReportBaseDlg.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ implementation
5555
// Delphi
5656
ExtActns,
5757
// Project
58-
UColours, UCtrlArranger, UFontHelper, Web.UInfo;
58+
UColours, UCtrlArranger, UFontHelper, UUrl;
5959

6060

6161
{$R *.dfm}
@@ -100,7 +100,7 @@ procedure TBugReportBaseDlg.GoToTracker;
100100
// must be able to override this method.
101101
with TBrowseURL.Create(nil) do
102102
try
103-
URL := TWebInfo.BugTrackerURL;
103+
URL := TURL.BugTrackerURL;
104104
Execute;
105105
finally
106106
Free;

Src/FmDBUpdateDlg.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ implementation
173173
UMessageBox,
174174
UStructs,
175175
UStrUtils,
176-
Web.UInfo;
176+
UUrl;
177177

178178
{$R *.dfm}
179179

@@ -272,7 +272,7 @@ procedure TDBUpdateDlg.ConfigForm;
272272
begin
273273
Tplt.ResolvePlaceholderText(
274274
'CSDBReleaseURL',
275-
TWebInfo.CSDBReleaseURL
275+
TURL.CSDBReleaseURL
276276
);
277277
end
278278
);

Src/FmMain.pas

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,8 @@ implementation
574574
UCopySourceMgr, UDatabaseLoader, UDatabaseLoaderUI, UDetailTabAction,
575575
UEditSnippetAction, UExceptions, UHelpMgr, UHistoryMenus, UKeysHelper,
576576
UMessageBox, UNotifier, UNulDropTarget, UPrintMgr, UQuery, USaveSnippetMgr,
577-
USaveUnitMgr, USelectionIOMgr, UShowPrefsPageAction, UUserDBMgr, UView,
578-
UViewItemAction, UWBExternal, Web.UInfo;
577+
USaveUnitMgr, USelectionIOMgr, UShowPrefsPageAction, UUrl, UUserDBMgr, UView,
578+
UViewItemAction, UWBExternal;
579579

580580

581581
{$R *.dfm}
@@ -1337,9 +1337,9 @@ procedure TMainForm.InitForm;
13371337

13381338
// Initialise actions
13391339
// Browse actions have to have URLs set dynamically
1340-
actGitHubHome.URL := TWebInfo.GitHubURL;
1341-
actFAQs.URL := TWebInfo.FAQsURL;
1342-
actBlog.URL := TWebInfo.BlogURL;
1340+
actGitHubHome.URL := TURL.GitHubURL;
1341+
actFAQs.URL := TURL.FAQsURL;
1342+
actBlog.URL := TURL.BlogURL;
13431343
// Tree control actions need shortcuts adding dynamically, and state stored
13441344
// in Tag property
13451345
actExpandNode.ShortCut := ShortCut(VK_ADD, [ssCtrl]);

Src/FmSWAGImportDlg.pas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ implementation
260260
UHTMLTemplate,
261261
UMessageBox,
262262
UStrUtils,
263-
UWaitForThreadUI,
264-
Web.UInfo;
263+
UUrl,
264+
UWaitForThreadUI;
265265

266266
{$R *.dfm}
267267

@@ -482,7 +482,7 @@ procedure TSWAGImportDlg.ConfigForm;
482482
begin
483483
Tplt.ResolvePlaceholderText(
484484
'SWAGReleaseURL',
485-
TWebInfo.SWAGReleaseURL
485+
TURL.SWAGReleaseURL
486486
);
487487
end
488488
);

Src/UPaypalDonateAction.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ implementation
4444
// Delphi
4545
SysUtils, ExtActns,
4646
// Project
47-
Web.UInfo;
47+
UUrl;
4848

4949

5050
{ TPaypalDonateAction }
@@ -61,7 +61,7 @@ function TPaypalDonateAction.Execute: Boolean;
6161
// use a TBrowseAction to access URL
6262
BrowseAction := TBrowseURL.Create(nil);
6363
try
64-
BrowseAction.URL := TWebInfo.DonateURL;
64+
BrowseAction.URL := TURL.DonateURL;
6565
BrowseAction.Execute;
6666
finally
6767
FreeAndNil(BrowseAction);

Src/USaveUnitMgr.pas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ implementation
9696
// Delphi
9797
SysUtils,
9898
// Project
99-
UAppInfo, UUtils, Web.UInfo;
99+
UAppInfo, UUrl, UUtils;
100100

101101
// TODO -cDatabase: get license info from database rather than use literal text.
102102

@@ -150,7 +150,7 @@ function TSaveUnitMgr.CreateHeaderComments: IStringList;
150150
// Result used for units that contain at snippet(s) from main database
151151
Result.Add(Format(sLicense, [FormatDateTime('YYYY', Now)]));
152152
Result.Add('');
153-
Result.Add(Format(sMainDescription, [TWebInfo.DatabaseURL]));
153+
Result.Add(Format(sMainDescription, [TURL.DatabaseURL]));
154154
Result.Add('');
155155
Result.Add(Format(sGenerated, [RFC1123DateStamp]));
156156
Result.Add(
@@ -160,7 +160,7 @@ function TSaveUnitMgr.CreateHeaderComments: IStringList;
160160
);
161161
Result.Add('');
162162
Result.Add(
163-
Format(sAdvert, [TAppInfo.ProgramName, TWebInfo.GitHubURL])
163+
Format(sAdvert, [TAppInfo.ProgramName, TURL.GitHubURL])
164164
);
165165
end
166166
else

Src/USnippetDoc.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ implementation
111111
// Delphi
112112
SysUtils,
113113
// Project
114-
Compilers.UCompilers, DB.UMain, DB.USnippetKind, UStrUtils, Web.UInfo;
114+
Compilers.UCompilers, DB.UMain, DB.USnippetKind, UStrUtils, UUrl;
115115

116116

117117
{ TSnippetDoc }
@@ -180,7 +180,7 @@ function TSnippetDoc.Generate(const Snippet: TSnippet): TEncodedData;
180180
RenderExtra(Snippet.Extra);
181181
if not Snippet.UserDefined then
182182
// database info written only if snippet is from main database
183-
RenderDBInfo(Format(sMainDatabaseInfo, [TWebInfo.DatabaseURL]));
183+
RenderDBInfo(Format(sMainDatabaseInfo, [TURL.DatabaseURL]));
184184
Result := FinaliseDoc;
185185
end;
186186

Src/Web.UInfo.pas renamed to Src/UUrl.pas

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,16 @@
1010
}
1111

1212

13-
unit Web.UInfo;
13+
unit UUrl;
1414

1515

1616
interface
1717

1818

19-
uses
20-
// Project
21-
UBaseObjects;
22-
23-
2419
type
25-
/// <summary>Static class that provides information about URLs and any proxy
26-
/// server used by CodeSnip.</summary>
27-
TWebInfo = class(TNoConstructObject)
20+
/// <summary>Advanced record that provides various URLs used by the program.
21+
/// </summary>
22+
TURL = record
2823
strict private
2924
const
3025
/// <summary>Name of server that hosts tested and released web services

0 commit comments

Comments
 (0)