Skip to content

Commit

Permalink
refactor: Changed some function's names
Browse files Browse the repository at this point in the history
Fiddling with the syntax highlighter's colors:
- Numbers is clGreen
- Strings is clFuchsia
  • Loading branch information
gcarreno committed Mar 11, 2021
1 parent c530349 commit 86a07c3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/application/ljv.application.version.pas
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface
cVersionMajor = 0;
cVersionMinor = 1;
cVersionRevision = 9;
cVersionBuild = 34;
cVersionBuild = 35;

implementation

Expand Down
2 changes: 2 additions & 0 deletions src/forms/ljv.forms.main.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,8 @@ object frmMain: TfrmMain
end
object SynJScriptSyn: TSynJScriptSyn
Enabled = False
NumberAttri.Foreground = clGreen
StringAttri.Foreground = clFuchsia
Left = 88
Top = 448
end
Expand Down
23 changes: 13 additions & 10 deletions src/forms/ljv.forms.main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ TfrmMain = class(TForm)
procedure ClearTree;
function FormatBytes(ABytes: Int64): String;

procedure SetupPropStorage;
procedure ShutdownPropStorage;
procedure OpenPropStorage;
procedure ClosePropStorage;

procedure ClearLabels;
procedure CorrectPSCursor;
procedure CorrectPairSplitterCursor;
procedure ProcessParams;
procedure UpdateFileList;
procedure LoadFile(const AFilename: String);
Expand Down Expand Up @@ -179,13 +179,13 @@ implementation

procedure TfrmMain.FormCreate(Sender: TObject);
begin
SetupPropStorage;
OpenPropStorage;
SetupShortcuts;
Caption:= Format(rsFormCaption, [cVersion]);
lblValue.Caption:= rsCaptionValue;
pcMain.ActivePageIndex:= 0;
ClearLabels;
CorrectPSCursor;
CorrectPairSplitterCursor;
ProcessParams;
UpdateFileList;
{
Expand Down Expand Up @@ -216,7 +216,7 @@ procedure TfrmMain.FormDestroy(Sender: TObject);
begin
FJSON.Free;
end;
ShutdownPropStorage;
ClosePropStorage;
end;

procedure TfrmMain.FormDropFiles(Sender: TObject;
Expand Down Expand Up @@ -247,7 +247,10 @@ procedure TfrmMain.lbFilesSelectionChange(Sender: TObject; User: boolean);
ClearLabels;
for index:=0 to pred(panValue.ComponentCount) do
begin
panValue.Components[index].Free;
if Assigned(panValue.Components[index]) then
begin
panValue.Components[index].Free;
end;
end;
LoadFile(FFileList[lbFiles.ItemIndex]);
UpdateTree;
Expand Down Expand Up @@ -608,7 +611,7 @@ procedure TfrmMain.ClearTree;
end;
end;

procedure TfrmMain.SetupPropStorage;
procedure TfrmMain.OpenPropStorage;
begin
if not DirectoryExists(GetAppConfigDir(False)) then
begin
Expand All @@ -619,12 +622,12 @@ procedure TfrmMain.SetupPropStorage;
JSONPropStorage.Active:= True;
end;

procedure TfrmMain.ShutdownPropStorage;
procedure TfrmMain.ClosePropStorage;
begin
JSONPropStorage.Active:= False;
end;

procedure TfrmMain.CorrectPSCursor;
procedure TfrmMain.CorrectPairSplitterCursor;
begin
psMain.Cursor:= crHSplit;
pssTree.Cursor:= crDefault;
Expand Down
2 changes: 1 addition & 1 deletion src/lazJSONViewer.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<UseVersionInfo Value="True"/>
<MinorVersionNr Value="1"/>
<RevisionNr Value="9"/>
<BuildNr Value="34"/>
<BuildNr Value="35"/>
<Language Value="0809"/>
</VersionInfo>
<BuildModes Count="3">
Expand Down

0 comments on commit 86a07c3

Please sign in to comment.