From 1763c8f93e80943db7958f7157029a48cc3c35ff Mon Sep 17 00:00:00 2001 From: DelphiDabbler Date: Wed, 13 Jul 2016 10:44:56 +0100 Subject: [PATCH 001/714] Added support for compiling with Delphi 10.1 Berlin compiler. --- Src/Compilers.UBDS.pas | 28 +++++++++++++++++----------- Src/Compilers.UGlobals.pas | 5 +++-- Src/DBIO.UIniDataReader.pas | 5 +++-- Src/FirstRun.UConfigFile.pas | 3 ++- Src/FrCodeGenPrefs.pas | 3 ++- Src/UXMLDocConsts.pas | 4 ++-- 6 files changed, 29 insertions(+), 19 deletions(-) diff --git a/Src/Compilers.UBDS.pas b/Src/Compilers.UBDS.pas index b26c7882e..7011b61b6 100644 --- a/Src/Compilers.UBDS.pas +++ b/Src/Compilers.UBDS.pas @@ -3,7 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2015, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2006-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ @@ -145,6 +145,8 @@ function TBDSCompiler.GetIDString: string; Result := 'DXE8'; ciD10S: Result := 'D10S'; + ciD101B: + Result := 'D101B'; else raise EBug.Create(ClassName + '.GetIDString: Invalid ID'); end; @@ -152,16 +154,17 @@ function TBDSCompiler.GetIDString: string; function TBDSCompiler.GetName: string; resourcestring - sCompilerName = 'Delphi %d'; // template for name of compiler - sDelphiXE = 'Delphi XE'; // name of Delphi XE compiler - sDelphiXE2 = 'Delphi XE2'; // name of Delphi XE2 compiler - sDelphiXE3 = 'Delphi XE3'; // name of Delphi XE3 compiler - sDelphiXE4 = 'Delphi XE4'; // name of Delphi XE4 compiler - sDelphiXE5 = 'Delphi XE5'; // name of Delphi XE5 compiler - sDelphiXE6 = 'Delphi XE6'; // name of Delphi XE6 compiler - sDelphiXE7 = 'Delphi XE7'; // name of Delphi XE7 compiler - sDelphiXE8 = 'Delphi XE8'; // name of Delphi XE8 compiler - sDelphi10S = 'Delphi 10 Seattle'; // name of Delphi 10 compiler + sCompilerName = 'Delphi %d'; // template for name of compiler + sDelphiXE = 'Delphi XE'; // name of Delphi XE compiler + sDelphiXE2 = 'Delphi XE2'; // name of Delphi XE2 compiler + sDelphiXE3 = 'Delphi XE3'; // name of Delphi XE3 compiler + sDelphiXE4 = 'Delphi XE4'; // name of Delphi XE4 compiler + sDelphiXE5 = 'Delphi XE5'; // name of Delphi XE5 compiler + sDelphiXE6 = 'Delphi XE6'; // name of Delphi XE6 compiler + sDelphiXE7 = 'Delphi XE7'; // name of Delphi XE7 compiler + sDelphiXE8 = 'Delphi XE8'; // name of Delphi XE8 compiler + sDelphi10S = 'Delphi 10 Seattle'; // name of Delphi 10 compiler + sDelphi101B = 'Delphi 10.1 Berlin'; // name of Delphi 10.1 compiler begin case GetID of ciDXE: @@ -182,6 +185,8 @@ function TBDSCompiler.GetName: string; Result := sDelphiXE8; ciD10S: Result := sDelphi10S; + ciD101B: + Result := sDelphi101B; else Result := Format(sCompilerName, [ProductVersion]); end; @@ -211,6 +216,7 @@ function TBDSCompiler.InstallationRegKey: string; ciDXE7 : Result := '\Software\Embarcadero\BDS\15.0'; ciDXE8 : Result := '\Software\Embarcadero\BDS\16.0'; ciD10S : Result := '\Software\Embarcadero\BDS\17.0'; + ciD101B : Result := '\Software\Embarcadero\BDS\18.0'; else raise EBug.Create(ClassName + '.InstallationRegKey: Invalid ID'); end; end; diff --git a/Src/Compilers.UGlobals.pas b/Src/Compilers.UGlobals.pas index f21abf1be..c28053548 100644 --- a/Src/Compilers.UGlobals.pas +++ b/Src/Compilers.UGlobals.pas @@ -3,7 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2015, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ @@ -42,6 +42,7 @@ interface ciDXE7, // Delphi XE7 ciDXE8, // Delphi XE8 ciD10S, // Delphi 10 Seattle + ciD101B, // Delphi 10.1 Berlin ciFPC // Free Pascal ); @@ -54,7 +55,7 @@ interface /// compilers. cBDSCompilers = [ ciD2005w32, ciD2006w32, ciD2007, ciD2009w32, ciD2010, ciDXE, ciDXE2, - ciDXE3, ciDXE4, ciDXE5, ciDXE6, ciDXE7, ciDXE8, ciD10S + ciDXE3, ciDXE4, ciDXE5, ciDXE6, ciDXE7, ciDXE8, ciD10S, ciD101B ]; const diff --git a/Src/DBIO.UIniDataReader.pas b/Src/DBIO.UIniDataReader.pas index bb61b2b39..bf6689ce7 100644 --- a/Src/DBIO.UIniDataReader.pas +++ b/Src/DBIO.UIniDataReader.pas @@ -3,7 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2015, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ @@ -237,7 +237,8 @@ implementation 'Delphi2', 'Delphi3', 'Delphi4', 'Delphi5', 'Delphi6', 'Delphi7', 'Delphi2005Win32', 'Delphi2006Win32', 'Delphi2007', 'Delphi2009Win32', 'Delphi2010', 'DelphiXE', 'DelphiXE2', 'DelphiXE3', 'DelphiXE4', - 'DelphiXE5', 'DelphiXE6', 'DelphiXE7', 'DelphiXE8', 'Delphi10S', 'FPC' + 'DelphiXE5', 'DelphiXE6', 'DelphiXE7', 'DelphiXE8', 'Delphi10S', + 'Delphi101B', 'FPC' ); { TIniDataReader } diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index 20e20b308..3e5f347c1 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -3,7 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2015, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2007-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ @@ -483,6 +483,7 @@ procedure TUserConfigFileUpdater.UpdateNamespaces; UpdateForCompiler('DXE7'); UpdateForCompiler('DXE8'); UpdateForCompiler('D10S'); + UpdateForCompiler('D101B'); end; { TCommonConfigFileUpdater } diff --git a/Src/FrCodeGenPrefs.pas b/Src/FrCodeGenPrefs.pas index 7f07a64e8..0205bd006 100644 --- a/Src/FrCodeGenPrefs.pas +++ b/Src/FrCodeGenPrefs.pas @@ -3,7 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2015, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2010-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ @@ -681,6 +681,7 @@ procedure TCodeGenPrefsFrame.PopulatePreDefCompilerMenu; AddMenuItem('Delphi XE7', 28.0); AddMenuItem('Delphi XE8', 29.0); AddMenuItem('Delphi 10 Seattle', 30.0); + AddMenuItem('Delphi 10.1 Berlin', 31.0); end; procedure TCodeGenPrefsFrame.PreDefCompilerMenuClick(Sender: TObject); diff --git a/Src/UXMLDocConsts.pas b/Src/UXMLDocConsts.pas index 8fc039a68..f8b96a050 100644 --- a/Src/UXMLDocConsts.pas +++ b/Src/UXMLDocConsts.pas @@ -3,7 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2015, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2008-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ @@ -74,7 +74,7 @@ interface 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd2005', 'd2006', 'd2007', 'd2009', 'd2010', 'dXE', 'dXE2', 'dXE3', 'dDX4' {error, but in use}, - 'dXE5', 'dXE6', 'dXE7', 'dXE8', 'd10s', + 'dXE5', 'dXE6', 'dXE7', 'dXE8', 'd10s', 'd101b', 'fpc' ); From f33cc7e92e8905a4dc4f5f525c825f1d03683bed Mon Sep 17 00:00:00 2001 From: DelphiDabbler Date: Wed, 13 Jul 2016 10:46:04 +0100 Subject: [PATCH 002/714] Widened compiler list box to accommodate width of Delphi 10.1 Berlin compiler name. --- Src/FmCompilersDlg.dfm | 67 +++++++++++++++++++++++++++--------------- Src/FmCompilersDlg.pas | 2 +- 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/Src/FmCompilersDlg.dfm b/Src/FmCompilersDlg.dfm index 80eb26dbb..81e5534d8 100644 --- a/Src/FmCompilersDlg.dfm +++ b/Src/FmCompilersDlg.dfm @@ -3,16 +3,16 @@ inherited CompilersDlg: TCompilersDlg ClientHeight = 381 ClientWidth = 524 ExplicitWidth = 530 - ExplicitHeight = 409 + ExplicitHeight = 410 PixelsPerInch = 96 TextHeight = 13 inherited pnlBody: TPanel - Width = 497 - ExplicitWidth = 497 + Width = 505 + ExplicitWidth = 505 object pbBanner: TPaintBox - Left = 128 + Left = 135 Top = 0 - Width = 369 + Width = 370 Height = 23 Color = clActiveCaption Font.Charset = DEFAULT_CHARSET @@ -26,7 +26,7 @@ inherited CompilersDlg: TCompilersDlg object lbCompilers: TListBox Left = 0 Top = 0 - Width = 121 + Width = 129 Height = 292 Style = lbOwnerDrawFixed Ctl3D = True @@ -36,7 +36,7 @@ inherited CompilersDlg: TCompilersDlg TabOrder = 0 end object pcCompiler: TPageControl - Left = 127 + Left = 135 Top = 29 Width = 370 Height = 263 @@ -45,8 +45,6 @@ inherited CompilersDlg: TCompilersDlg OnMouseDown = pcCompilerMouseDown object tsCompiler: TTabSheet Caption = 'Compiler' - ExplicitWidth = 313 - ExplicitHeight = 199 inline frmCompiler: TCompilersDlgCompilerFrame Left = 0 Top = 0 @@ -54,14 +52,11 @@ inherited CompilersDlg: TCompilersDlg Height = 235 Align = alClient TabOrder = 0 - ExplicitHeight = 199 end end object tsSwitches: TTabSheet Caption = 'Switches' ImageIndex = 2 - ExplicitWidth = 313 - ExplicitHeight = 199 inline frmSwitches: TCompilersDlgSwitchesFrame Left = 0 Top = 0 @@ -69,14 +64,23 @@ inherited CompilersDlg: TCompilersDlg Height = 235 Align = alClient TabOrder = 0 - ExplicitHeight = 199 + inherited btnDefSwitches: TButton + ExplicitLeft = 293 + end + inherited btnAdd: TButton + ExplicitLeft = 222 + end + inherited btnReplace: TButton + ExplicitLeft = 293 + end + inherited btnDelete: TButton + ExplicitLeft = 222 + end end end object tsNamespaces: TTabSheet Caption = 'Namespaces' ImageIndex = 4 - ExplicitWidth = 313 - ExplicitHeight = 199 inline frmNamespaces: TCompilersDlgNamespacesFrame Left = 0 Top = 0 @@ -84,15 +88,23 @@ inherited CompilersDlg: TCompilersDlg Height = 235 Align = alClient TabOrder = 0 - ExplicitWidth = 313 - ExplicitHeight = 199 + inherited btnDefSwitches: TButton + ExplicitLeft = 293 + end + inherited btnAdd: TButton + ExplicitLeft = 222 + end + inherited btnReplace: TButton + ExplicitLeft = 293 + end + inherited btnDelete: TButton + ExplicitLeft = 222 + end end end object tsSearchDirs: TTabSheet Caption = 'Search Paths' ImageIndex = 3 - ExplicitWidth = 313 - ExplicitHeight = 199 inline frmSearchDirs: TCompilersDlgSearchDirsFrame Left = 0 Top = 0 @@ -100,14 +112,21 @@ inherited CompilersDlg: TCompilersDlg Height = 235 Align = alClient TabOrder = 0 - ExplicitHeight = 199 + inherited edPath: TEdit + ExplicitWidth = 322 + end + inherited btnBrowse: TButton + ExplicitLeft = 331 + end end end object tsLog: TTabSheet Caption = 'Output Log' ImageIndex = 1 - ExplicitWidth = 313 - ExplicitHeight = 199 + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 inline frmLog: TCompilersDlgLogFrame Left = 0 Top = 0 @@ -115,7 +134,9 @@ inherited CompilersDlg: TCompilersDlg Height = 235 Align = alClient TabOrder = 0 - ExplicitHeight = 199 + inherited vleLogPrefixes: TValueListEditor + ExplicitWidth = 354 + end end end end diff --git a/Src/FmCompilersDlg.pas b/Src/FmCompilersDlg.pas index 244420263..a984ff6e6 100644 --- a/Src/FmCompilersDlg.pas +++ b/Src/FmCompilersDlg.pas @@ -3,7 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ From 8d5821afaccd24c7f41b69a664d4d90631e9f498 Mon Sep 17 00:00:00 2001 From: DelphiDabbler Date: Wed, 13 Jul 2016 10:46:29 +0100 Subject: [PATCH 003/714] Updated help topics re support for Delphi 10.1 Berlin --- Src/Help/HTML/about_compiler_checks.htm | 4 ++-- Src/Help/HTML/dlg_configcompilers.htm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/Help/HTML/about_compiler_checks.htm b/Src/Help/HTML/about_compiler_checks.htm index 29844b5e9..8592a6966 100644 --- a/Src/Help/HTML/about_compiler_checks.htm +++ b/Src/Help/HTML/about_compiler_checks.htm @@ -4,7 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2015, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ @@ -37,7 +37,7 @@

The supported compilers are the Win32 Delphi compilers from Delphi 2 to - Delphi 10 Seattle and Free Pascal. + Delphi 10.1 Berlin and Free Pascal.

Configuring CodeSnip diff --git a/Src/Help/HTML/dlg_configcompilers.htm b/Src/Help/HTML/dlg_configcompilers.htm index 4244fbafa..1bf6b60eb 100644 --- a/Src/Help/HTML/dlg_configcompilers.htm +++ b/Src/Help/HTML/dlg_configcompilers.htm @@ -281,7 +281,7 @@

CodeSnip can automatically detect the presence of Win 32 Delphi - compilers from Delphi 2 to Delphi 10 Seattle. Click the Detect Delphi + compilers from Delphi 2 to Delphi 10.1 Berlin. Click the Detect Delphi Compilers button to do this. Any supported installed version of Delphi will be recorded. This can save considerable time and avoid errors. From 6d4d86bc5a62d576ed759ebd0d411bfc14ebfdc3 Mon Sep 17 00:00:00 2001 From: DelphiDabbler Date: Wed, 13 Jul 2016 10:47:37 +0100 Subject: [PATCH 004/714] Updated file format documentation with changes re support for Delphi 10.1 Berlin --- Docs/Design/FileFormats/config.html | 11 ++++++++++- Docs/Design/FileFormats/export.html | 5 ++++- Docs/Design/FileFormats/main-db.html | 6 +++++- Docs/Design/FileFormats/user-db.html | 5 ++++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index 8d3a9f12a..fe3d248ae 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -5,7 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ @@ -294,6 +294,9 @@

  • D10S – Delphi 10 Seattle
  • +
  • + D101B – Delphi 10.1 Berlin +
  • FPC – Free Pascal
  • @@ -594,6 +597,12 @@

    Indicates whether Delphi 10 Seattle was included in search.
    +
    + D101B (Boolean) +
    +
    + Indicates whether Delphi 10.1 Berlin was included in search. +
    FPC (Boolean)
    diff --git a/Docs/Design/FileFormats/export.html b/Docs/Design/FileFormats/export.html index 0559b76a1..142439124 100644 --- a/Docs/Design/FileFormats/export.html +++ b/Docs/Design/FileFormats/export.html @@ -5,7 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ @@ -518,6 +518,9 @@

  • d10s – Delphi 10 Seattle compiler
  • +
  • + d101b – Delphi 10.1 Berlin compiler +
  • fpc – Free Pascal compiler
  • diff --git a/Docs/Design/FileFormats/main-db.html b/Docs/Design/FileFormats/main-db.html index 426c55b28..09b38fcfa 100644 --- a/Docs/Design/FileFormats/main-db.html +++ b/Docs/Design/FileFormats/main-db.html @@ -5,7 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ @@ -157,6 +157,7 @@

    DelphiXE7=<Y|N|Q|W> DelphiXE8=<Y|N|Q|W> Delphi10S=<Y|N|Q|W> +Delphi101B=<Y|N|Q|W> FPC=<Y|N|Q|W> Extra=<extra-info-REML> StandardFormat=<0|1> @@ -347,6 +348,9 @@

  • Delphi10S – Delphi 10 Seattle compiler
  • +
  • + Delphi101B – Delphi 10.1 Berlin compiler +
  • FPC – Free Pascal compiler
  • diff --git a/Docs/Design/FileFormats/user-db.html b/Docs/Design/FileFormats/user-db.html index d4b7cc103..b479002a8 100644 --- a/Docs/Design/FileFormats/user-db.html +++ b/Docs/Design/FileFormats/user-db.html @@ -5,7 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). * * $Rev$ * $Date$ @@ -568,6 +568,9 @@

  • d10s – Delphi 10 Seattle compiler
  • +
  • + d101b – Delphi 10.1 Berlin compiler +
  • fpc – Free Pascal compiler
  • From 4e25458b7d8f0917e84d056d50cf06dc096f63ba Mon Sep 17 00:00:00 2001 From: DelphiDabbler Date: Wed, 13 Jul 2016 10:47:58 +0100 Subject: [PATCH 005/714] Updated read-me file re support for Delphi 10.1 Berlin --- Docs/ReadMe.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt index 5d2e7948c..82c2b9ca1 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe.txt @@ -14,7 +14,7 @@ online DelphiDabbler Code Snippets database as well as maintain a database of user-defined snippets. It displays details of each snippet in the database and can test-compile them -with each installed Win32 version of Delphi from Delphi 2 to Delphi 10 Seattle +with each installed Win32 version of Delphi from Delphi 2 to Delphi 10.1 Berlin along with Free Pascal. Compilable Pascal units can be created that contain selected snippets. @@ -225,7 +225,7 @@ dialogue" in the help file index). Each user can configure compilers differently. -Delphi XE2 to XE8 and Delphi 10 Seattle may need to be configured to search for +Delphi XE2 to XE8 and Delphi 10.1 Berlin may need to be configured to search for required units in the correct namespaces. This is explained in the Add/Edit Snippet Dialogue Box help topic and in the FAQ at http://delphidabbler.com/url/codesnip-and-xe2. From 6593580f4d3ccd05a3cbe7c7fd37221f70030b6c Mon Sep 17 00:00:00 2001 From: DelphiDabbler Date: Wed, 13 Jul 2016 10:56:03 +0100 Subject: [PATCH 006/714] Bumped version number to 4.15.0 build 255 --- Src/VCodeSnip.vi | 4 ++-- Src/VCodeSnipPortable.vi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/VCodeSnip.vi b/Src/VCodeSnip.vi index 2b231a4ef..47f5fc0c7 100644 --- a/Src/VCodeSnip.vi +++ b/Src/VCodeSnip.vi @@ -11,8 +11,8 @@ [Fixed File Info] -File Version #=4, 14, 0, 254 -Product Version #=4, 14, 0, 0 +File Version #=4, 15, 0, 255 +Product Version #=4, 15, 0, 0 File OS=4 File Type=1 File Sub-Type=0 diff --git a/Src/VCodeSnipPortable.vi b/Src/VCodeSnipPortable.vi index 5f085b3e7..f4065eaf4 100644 --- a/Src/VCodeSnipPortable.vi +++ b/Src/VCodeSnipPortable.vi @@ -11,8 +11,8 @@ [Fixed File Info] -File Version #=4, 14, 0, 254 -Product Version #=4, 14, 0, 0 +File Version #=4, 15, 0, 255 +Product Version #=4, 15, 0, 0 File OS=4 File Type=1 File Sub-Type=0 From 4772539e5b56873a3053f2d6eb22f3ea513cf8cc Mon Sep 17 00:00:00 2001 From: DelphiDabbler Date: Wed, 13 Jul 2016 10:59:21 +0100 Subject: [PATCH 007/714] Updated change log re CodeSnip v4.15.0. --- Docs/ChangeLogs/ChangeLog-v4.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Docs/ChangeLogs/ChangeLog-v4.txt b/Docs/ChangeLogs/ChangeLog-v4.txt index 58bf04a27..5d2e1010f 100644 --- a/Docs/ChangeLogs/ChangeLog-v4.txt +++ b/Docs/ChangeLogs/ChangeLog-v4.txt @@ -11,6 +11,12 @@ ; Change Log for CodeSnip Release 4 ; ------------------------------------------------------------------------------ +Release v4.15.0 of 13 July 2016 ++ Added support for test compilation with, and detection of, Delphi 10.1 Berlin compiler. ++ Tweaked size of compiler list in Configure Compilers dialogue box to accommodate length of Delphi 10.1 Berline compiler name! ++ Updated documentation re changes. ++ Updated help file re changes. + Release v4.14.0 of 19 March 2016 + Changes to About Box's "Paths" tab: - Added new buttons to display the contents of the system and per-user config files. From da3e4328e2d9178237dd672e7086a09330d05c4c Mon Sep 17 00:00:00 2001 From: DelphiDabbler Date: Thu, 22 Sep 2016 03:36:18 +0100 Subject: [PATCH 008/714] Updated DelphiDabbler System Information Unit to latest 5.3.0 version. This adds support for Windows 10 Anniversary Update (version 1607) and tech previews of Windows 2016 Server. --- Src/3rdParty/PJSysInfo.pas | 110 +++++++++++++++++++++++++++---------- 1 file changed, 82 insertions(+), 28 deletions(-) diff --git a/Src/3rdParty/PJSysInfo.pas b/Src/3rdParty/PJSysInfo.pas index 478bb94b5..65f74044b 100644 --- a/Src/3rdParty/PJSysInfo.pas +++ b/Src/3rdParty/PJSysInfo.pas @@ -3,10 +3,10 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2001-2015, Peter Johnson (@delphidabbler). + * Copyright (C) 2001-2016, Peter Johnson (@delphidabbler). * - * $Rev: 2002 $ - * $Date: 2015-11-30 14:45:35 +0000 (Mon, 30 Nov 2015) $ + * $Rev: 2015 $ + * $Date: 2016-09-12 00:47:45 +0100 (Mon, 12 Sep 2016) $ * * This unit contains various static classes, constants, type definitions and * global variables for use in providing information about the host computer and @@ -443,8 +443,7 @@ interface osWin8Point1, // Windows 8.1 osWinSvr2012R2, // Windows Server 2012 R2 osWin10, // Windows 10 - // TODO: Update following comment to correct name once released - osWin10Svr // Windows 10 Server Technical Preview + osWin10Svr // Windows 2016 Server ); type @@ -582,7 +581,7 @@ TPJOSInfo = class(TObject) /// /// Windows has added significant OS updates that bump the build /// number but do not declare themselves as service packs: e.g. the Windows - /// 10 TH2 update. + /// 10 TH2 update, aka Version 1511. /// This method is used to report such updates in addition to /// updates that declare themselves as service packs, while the ServicePack /// method only reports declared 'official' service packs. @@ -1498,10 +1497,16 @@ procedure InitPlatformIdEx; WinVistaBaseBuild = 6000; Win7BaseBuild = 7600; // for Win 8 onwards we just use the build numbers as is - Win8Build = 9200; - Win8Point1Build = 9600; - Win10TH1Build = 10240; - Win10TH2Build = 10586; + Win8Build = 9200; // Only build number used for Win 8 / Svr 2012 + Win8Point1Build = 9600; // Only build number used for Win 8.1 / Svr 2012 R2 + Win10TH1Build = 10240; // Initial Windows 10 release (not Server 2016) + Win10TH2Build = 10586; // Windows 10 TH2 (shared with Win 2016 TP4 - below) + Win10RS1Build = 14393; // Windows 10 RS1 + Win2016TP1Build = 9841; // Windows 2016 Server Technical Preview 1 + Win2016TP2Build = 10074; // Windows 2016 Server Technical Preview 2 + Win2016TP3Build = 10514; // Windows 2016 Server Technical Preview 3 + Win2016TP4Build = 10586; // Windows 2016 Server Technical Preview 4 + Win2016TP5Build = 14300; // Windows 2016 Server Technical Preview 5 begin // Load version query functions used externally to this routine VerSetConditionMask := LoadKernelFunc('VerSetConditionMask'); @@ -1530,6 +1535,15 @@ procedure InitPlatformIdEx; InternalMajorVersion, InternalMinorVersion, Win32ServicePackMajor, Win32ServicePackMinor ); + // Test possible product types to see which one we have + if IsWindowsProductType(VER_NT_WORKSTATION) then + Win32ProductType := VER_NT_WORKSTATION + else if IsWindowsProductType(VER_NT_DOMAIN_CONTROLLER) then + Win32ProductType := VER_NT_DOMAIN_CONTROLLER + else if IsWindowsProductType(VER_NT_SERVER) then + Win32ProductType := VER_NT_SERVER + else + Win32ProductType := 0; // NOTE: It's going to be very slow to test for all possible build numbers, // so I've just narrowed the search down using the information at // http://en.wikipedia.org/wiki/Windows_NT @@ -1551,7 +1565,14 @@ procedure InitPlatformIdEx; // Windows 8.1 (no known SPs) if Win32ServicePackMajor = 0 then InternalBuildNumber := Win8Point1Build; - + 4: + if (Win32ProductType = VER_NT_DOMAIN_CONTROLLER) + or (Win32ProductType = VER_NT_SERVER) then + begin + // Windows 2016 Server tech preview 1 + InternalBuildNumber := Win2016TP1Build; + InternalExtraUpdateInfo := 'Technical Preview 6'; + end; end; if Win32ServicePackMajor > 0 then // ** Tried to read this info from registry, but for some weird @@ -1567,9 +1588,9 @@ procedure InitPlatformIdEx; begin case InternalMinorVersion of 0: + if (Win32ProductType <> VER_NT_DOMAIN_CONTROLLER) + and (Win32ProductType <> VER_NT_SERVER) then begin - // TODO: Revist when server version released to check if same build - // number(s) // Windows 10 TH1 branch release if IsBuildNumber(Win10TH1Build) then InternalBuildNumber := Win10TH1Build @@ -1577,8 +1598,42 @@ procedure InitPlatformIdEx; else if IsBuildNumber(Win10TH2Build) then begin InternalBuildNumber := Win10TH2Build; - InternalExtraUpdateInfo := 'TH2: November Update'; + InternalExtraUpdateInfo := 'Version 1511'; + end + else if IsBuildNumber(Win10RS1Build) then + begin + InternalBuildNumber := Win10RS1Build; + InternalExtraUpdateInfo := 'Version 1607'; end; + end + else + begin + { TODO: Revisit when Windows 2016 Server is released to add its + build number } + // Check for Technical previews. We don't check for TP1 here because + // that reported version 6.4, not version 10! + // Source of these build numbers: + // https://en.wikipedia.org/wiki/Windows_Server_2016#Version_history + if IsBuildNumber(Win2016TP2Build) then + begin + InternalBuildNumber := Win2016TP2Build; + InternalExtraUpdateInfo := 'Technical Preview 2'; + end + else if IsBuildNumber(Win2016TP3Build) then + begin + InternalBuildNumber := Win2016TP3Build; + InternalExtraUpdateInfo := 'Technical Preview 3'; + end + else if IsBuildNumber(Win2016TP4Build) then + begin + InternalBuildNumber := Win2016TP4Build; + InternalExtraUpdateInfo := 'Technical Preview 4'; + end + else if IsBuildNumber(Win2016TP5Build) then + begin + InternalBuildNumber := Win2016TP5Build; + InternalExtraUpdateInfo := 'Technical Preview 5'; + end end; end; end; @@ -1591,17 +1646,10 @@ procedure InitPlatformIdEx; // 10586 ! // So we must now consider a build number of 0 as indicating an unknown // build number. + // But note that some users report that their registry is returning + // correct value. I really hate Windows!!! // ** Seems like more registry spoofing (see above). - // Test possible product types to see which one we have - if IsWindowsProductType(VER_NT_WORKSTATION) then - Win32ProductType := VER_NT_WORKSTATION - else if IsWindowsProductType(VER_NT_DOMAIN_CONTROLLER) then - Win32ProductType := VER_NT_DOMAIN_CONTROLLER - else if IsWindowsProductType(VER_NT_SERVER) then - Win32ProductType := VER_NT_SERVER - else - Win32ProductType := 0; end else begin @@ -1702,14 +1750,14 @@ class function TPJOSInfo.Description: string; // For NT3/4 append version number after product AppendToResult(Format('%d.%d', [MajorVersion, MinorVersion])); AppendToResult(Edition); - AppendToResult(ServicePack); // does nothing if no service pack + AppendToResult(ServicePackEx); // does nothing if no service pack etc AppendToResult(Format('(Build %d)', [BuildNumber])); end else begin // Windows 2000 and later: don't include version number AppendToResult(Edition); - AppendToResult(ServicePack); // does nothing if no service pack + AppendToResult(ServicePackEx); // does nothing if no service pack AppendToResult(Format('(Build %d)', [BuildNumber])); end; end; @@ -2242,6 +2290,13 @@ class function TPJOSInfo.Product: TPJOSProduct; Result := osWin8Point1 else Result := osWinSvr2012R2; + 4: + // Version 6.4 was used for Windows 2016 server tech preview 1. + // This version *may* only be detected by Windows if the + // application is "manifested" for the correct Windows version. + // See http://bit.ly/MJSO8Q. + if IsServer then + Result := osWin10Svr; else // Higher minor version: must be an unknown later OS Result := osWinLater @@ -2305,8 +2360,7 @@ class function TPJOSInfo.ProductName: string; osWin8Point1: Result := 'Windows 8.1'; osWinSvr2012R2: Result := 'Windows Server 2012 R2'; osWin10: Result := 'Windows 10'; - // TODO: Update osWin10Svr description once OS is released and named - osWin10Svr: Result := 'Windows Server Technical Preview'; + osWin10Svr: Result := 'Windows Server 2016'; else raise EPJSysInfo.Create(sUnknownProduct); end; @@ -2337,7 +2391,7 @@ class function TPJOSInfo.RegisteredOwner: string; class function TPJOSInfo.ServicePack: string; begin - // Assume to service pack + // Assume no service pack Result := ''; case Platform of ospWin9x: From d6d05871a8cab54eea6d32e2be102ff2ff24eeb2 Mon Sep 17 00:00:00 2001 From: DelphiDabbler Date: Thu, 22 Sep 2016 03:46:12 +0100 Subject: [PATCH 009/714] Updated file and product version numbers to 4.15.1 build 256 --- Src/VCodeSnip.vi | 4 ++-- Src/VCodeSnipPortable.vi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/VCodeSnip.vi b/Src/VCodeSnip.vi index 47f5fc0c7..15a2e6a54 100644 --- a/Src/VCodeSnip.vi +++ b/Src/VCodeSnip.vi @@ -11,8 +11,8 @@ [Fixed File Info] -File Version #=4, 15, 0, 255 -Product Version #=4, 15, 0, 0 +File Version #=4, 15, 1, 256 +Product Version #=4, 15, 1, 0 File OS=4 File Type=1 File Sub-Type=0 diff --git a/Src/VCodeSnipPortable.vi b/Src/VCodeSnipPortable.vi index f4065eaf4..041a452d0 100644 --- a/Src/VCodeSnipPortable.vi +++ b/Src/VCodeSnipPortable.vi @@ -11,8 +11,8 @@ [Fixed File Info] -File Version #=4, 15, 0, 255 -Product Version #=4, 15, 0, 0 +File Version #=4, 15, 1, 256 +Product Version #=4, 15, 1, 0 File OS=4 File Type=1 File Sub-Type=0 From 10fae713bc10090f16868f858b0e95ae727cc7a8 Mon Sep 17 00:00:00 2001 From: DelphiDabbler Date: Thu, 22 Sep 2016 03:52:18 +0100 Subject: [PATCH 010/714] Updated change log re CodeSnip v4.15.1. --- Docs/ChangeLogs/ChangeLog-v4.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Docs/ChangeLogs/ChangeLog-v4.txt b/Docs/ChangeLogs/ChangeLog-v4.txt index 5d2e1010f..b4079b83d 100644 --- a/Docs/ChangeLogs/ChangeLog-v4.txt +++ b/Docs/ChangeLogs/ChangeLog-v4.txt @@ -11,6 +11,9 @@ ; Change Log for CodeSnip Release 4 ; ------------------------------------------------------------------------------ +Release v4.15.1 of 22 September 2016 ++ Updated OS detection code to detect Windows 10 Version 1607 (Anniversary update) and all technical previews of Windows 2016 Server to date. + Release v4.15.0 of 13 July 2016 + Added support for test compilation with, and detection of, Delphi 10.1 Berlin compiler. + Tweaked size of compiler list in Configure Compilers dialogue box to accommodate length of Delphi 10.1 Berline compiler name! From 7183822fbc6261a2cad41925220a081b85ec47d7 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 19 Oct 2018 01:01:34 +0100 Subject: [PATCH 011/714] Update README.md Removed reference to deleted Google+ page --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 5639ca79f..0ca3b9976 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,6 @@ There's quite a lot of support available for CodeSnip: * An [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppUsing). * A [discussion group](https://sourceforge.net/p/codesnip/discussion) on SourceForge (albeit barely used!). * An [RSS news feed](http://delphidabbler.com/feeds/site-news-feed?id=codesnip). This can also be accessed via the program. -* A [Google+ page](https://plus.google.com/u/0/b/108251259814638768561/108251259814638768561/posts). * A [Blog](http://codesnip-app.blogspot.co.uk/). * A [privacy statement](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/Privacy.txt)* that provides information about any personal information stored by the program and what info is transmitted over the net. From a03768ee00f4d8ccc6d1fc0163f8209e793a3f00 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sat, 18 Jan 2020 11:38:47 +0000 Subject: [PATCH 012/714] Update README.md Modified re planned closure of delphidabbler.com and end of support / development. --- README.md | 65 +++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 0ca3b9976..57baf832f 100644 --- a/README.md +++ b/README.md @@ -4,47 +4,46 @@ A code bank designed with Pascal in mind. * [Overview](#overview) * [Installation](#installation) -* [Bugs & Feature Requests](#bugs--feature-requests) * [Support](#support) * [Source Code](#source-code) * [Change Log](#change-log) -* [CodeSnip 5 Development](#codesnip-5-development) -* [Donate](#donate) +* [CodeSnip 5 Development](#codesnip-5-development) -- **frozen** ## Overview +> **CodeSnip Is No Longer Being Supported**. + +> Bugs can no longer be reported and requests for new features are no longer being accepted. + +> It is hoped to produce one final version that removes the program's dependency on the delphidabbler.com webserver that is due to close 15th June 2020, but no guarantees. + CodeSnip is an open source code bank for storing and viewing your code snippets. While it can manage snippets in any source language, it is focussed mainly on Pascal and Delphi code for which additional features are available. -CodeSnip also provides offline access to the DelphiDabbler [Code Snippets Database](http://snippets.delphidabbler.com/). +CodeSnip also provides offline access to the DelphiDabbler [Code Snippets Database](http://snippets.delphidabbler.com/) -- *deprecated* † ‡. The program is available in both standard and portable editions. -For more information see [http://codesnip.delphidabbler.com/features](http://codesnip.delphidabbler.com/features). +For more information see [http://codesnip.delphidabbler.com/features](http://codesnip.delphidabbler.com/features) -- *deprecated*. CodeSnip requires Windows 2000 or later and Internet Explorer 6 or later, although XP and IE 8 and later are preferred. -## Installation - -CodeSnip is installed and removed using a standard Windows installer. Administrator privileges are required for installation. - -## Bugs & Feature Requests + DelphiDabbler.com is due to close down on 15 June 2020. After this time these links will no longer work. -Bugs can be reported using the [Bug Tracker](https://sourceforge.net/p/codesnip/bugs/) on SourceForge. Info on how best to report bugs is provided on the tracker. + It is hoped to move the Code Snippets Database to GitHub before DelphiDabbler.com closes down. -Feature requests can be made on the [Feature Request Tracker](https://sourceforge.net/p/codesnip/feature-requests/) on SourceForge. Once again info on how to proceed is provided. +## Installation -> In time the bug and feature request trackers will be moved to GitHub. +CodeSnip is installed and removed using a standard Windows installer. Administrator privileges are required for installation. ## Support -There's quite a lot of support available for CodeSnip: +The following support is available for CodeSnip: * A comprehensive help file. -* A [read-me file](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/ReadMe.txt)* that discusses installation, configuration, updating and known issues. -* A dedicated set of [web pages](http://delphidabbler.com/url/codesnip-home). -* An [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppUsing). -* A [discussion group](https://sourceforge.net/p/codesnip/discussion) on SourceForge (albeit barely used!). -* An [RSS news feed](http://delphidabbler.com/feeds/site-news-feed?id=codesnip). This can also be accessed via the program. +* A [read-me file](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/ReadMe.txt) * that discusses installation, configuration, updating and known issues. +* A dedicated set of [web pages](http://codesnip.delphidabbler.com/) -- *deprecated*. +* An [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppUsing) -- *deprecated* † ‡. +* An [RSS news feed](http://delphidabbler.com/feeds/site-news-feed?id=codesnip) -- *deprecated*. This can also be accessed via the program. * A [Blog](http://codesnip-app.blogspot.co.uk/). * A [privacy statement](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/Privacy.txt)* that provides information about any personal information stored by the program and what info is transmitted over the net. @@ -52,27 +51,29 @@ There's also plenty of info available on how to compile CodeSnip from source - s * These links take you to the most recent version of the documents -- they can change from release to release. + These features are **deprecated** -- they are dependent on the delphidabbler.com web server which is due to close down on 15th June 2020. + + This feature may be moved to GitHub -- no promises! + ## Source Code Up to and including release 4.13.1 the project's source code was maintained in a Subversion repository on [SourceForge](https://sourceforge.net/p/codesnip/code/). The Subversion repo was converted to Git on 21 5 October 2015 and imported to GitHub. All releases from v3.0.0 are marked by tags in the form `version-x.x.x` where `x.x.x` is the version number. > Note that any branches that were created and deleted in the Subversion repo are missing from the Git history. So, for full details of the the project's history from v3.0.0 to v4.13.1 please refer to the old Subversion repo on SourceForge. -Following tag `version-4.13.1` the [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) methodology was adopted, with the exception that development work on CodeSnip v5 exists outside Git Flow in the `pagoda` branch (See below for details). +Following tag `version-4.13.1` the [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) methodology was adopted. The exception is the `pagoda` branch that sits outside Git Flow. This branch was originally planned to be the CodeSnip v5 development branch (see [below](#codesnip-5-development) for details). Up to and including release 4.13.1, `master` is simply a copy of the old Subversion `trunk` and, as such, contains various development commits along with numerous commits related to management of Subversion. After release 4.13.1, and the addition of this read-me file, `master` contains only commits relating to an actual release. ### Contributions -Contributions are welcome. Just fork the repo and create a feature branch off the `develop` branch. Commit your changes to your feature branch then submit a pull request when ready. - -If you are contributing to CodeSnip 5 development please create your feature branch off the `pagoda` branch instead. +Contributions are no longer accepted for this repo. If you wish to take over development, please fork the repo and take it where you wish. ### Compiling `master` and each branch will have a file in the root directory named `Build.html` that gives detailed information about how to compile CodeSnip. -There is also a [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppSource). +There is also an [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppSource) -- *deprecated* (see [Support](#support) above). ## Change Log @@ -88,16 +89,14 @@ The [CodeSnip Compiling & Source Code FAQ](http://wiki.delphidabbler.com/index.p ## CodeSnip 5 Development -Following a false start back in 2013/4 in the `parsnip` branch, development of CodeSnip 5 has restarted. The code can be found in the `pagoda` branch, which picks up where `parsnip` left off. (Don't ask where those names came from!) +Following a false start back in 2013/4 in the `parsnip` branch, development of CodeSnip 5 restarted in the `pagoda` branch, which picked up where `parsnip` left off. (Don't ask where those names came from!) -At present the direction CodeSnip is being taken is to: +Unfortunately `pagoda` has also been abandoned now. The branch has been left in place in case anyone else wants to continue development. -1. Generalise it to be a code bank for several different languages instead of just Pascal, while still providing some additional support for test-compiling Pascal code. -2. Increase the focus on the user's own code while downplaying the importance of code downloaded from the DelphiDabbler [Code Snippets database](http://snippets.delphidabbler.com/). This will still be available but will be very much an add on, like [SWAG](http://swag.delphidabbler.com/) is at present. -3. Remove the program's dependency on web services provided by [DelphiDabbler.com](http://delphidabbler.com) given the current uncertainty over that websites future. - -Comments on these ideas are welcome - just create a [feature request](https://sourceforge.net/p/codesnip/feature-requests/) and select the `v5 (pagoda)` milestone. +The idea behind v5 was to: -## Donate +1. Generalise CodeSnip to be a code bank for several different languages instead of just Pascal, while still providing some additional support for test-compiling Pascal code. +2. Increase the focus on the user's own code while downplaying the importance of code downloaded from the DelphiDabbler [Code Snippets database](http://snippets.delphidabbler.com/), like [SWAG](http://swag.delphidabbler.com/) is at present. +3. Remove the program's dependency on web services provided by [DelphiDabbler.com](http://delphidabbler.com) given the current uncertainty over that websites future. -If you've found the program useful please consider making a donation to help cover costs. Donations are accepted by [PayPal](http://delphidabbler.com/url/donate-cs) in British Pounds (GBP) -- [see common exchange rates](http://www.xe.com/currency/gbp-british-pound). + It is hoped to move the Code Snippets database to GitHub before DelphiDabbler closes down on 15 June 2020. From ac4c81b64dae953f381ff9f4f5c6dbefb7b4be78 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Tue, 4 Feb 2020 10:45:58 +0000 Subject: [PATCH 013/714] Update README.md Updated with current work in progress on new CodeSnip before DelphiDabbler.com closes. Also info about new code-snippets GitHub repo. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 57baf832f..607ea72c0 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,11 @@ A code bank designed with Pascal in mind. ## Overview -> **CodeSnip Is No Longer Being Supported**. +> **CodeSnip 4 Is No Longer Being Supported**. -> Bugs can no longer be reported and requests for new features are no longer being accepted. +> Bugs can no longer be reported and requests for new features in CodeSnip 4 are no longer being accepted. -> It is hoped to produce one final version that removes the program's dependency on the delphidabbler.com webserver that is due to close 15th June 2020, but no guarantees. +> It is hoped to produce one final version that removes the program's dependency on the delphidabbler.com webserver that is due to close 15th June 2020, but no guarantees. Work started late Jan 2020. CodeSnip is an open source code bank for storing and viewing your code snippets. While it can manage snippets in any source language, it is focussed mainly on Pascal and Delphi code for which additional features are available. @@ -29,7 +29,7 @@ CodeSnip requires Windows 2000 or later and Internet Explorer 6 or later, althou DelphiDabbler.com is due to close down on 15 June 2020. After this time these links will no longer work. - It is hoped to move the Code Snippets Database to GitHub before DelphiDabbler.com closes down. + The Code Snippets Database has been imported to GitHub: it's a work in progress. [See the repo](https://github.com/delphidabbler/code-snippets). ## Installation From fc898cd167a7597445b0878db9db920042d80a58 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 5 Feb 2020 01:37:32 +0000 Subject: [PATCH 014/714] Updated .gitignore --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ad252c726..34885dadb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# .gitignore file for CodeSnip project +# .gitignore file for CodeSnip project # Delphi generated temporary files and directories *.local @@ -15,3 +15,5 @@ Exe Release Src/CodeSnip.cfg Src/AutoGen/IntfExternalObj.pas +Src/Portable/CodeSnipPortable.cfg +Src/Main/AutoGen/IntfExternalObj.pas From a7f03bd1ebf529e624ae619d86087c11a7d7f276 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 5 Feb 2020 02:13:09 +0000 Subject: [PATCH 015/714] Removed all program registration code . Removed Web.URegistrar and FmRegistrationDlg unit from project. Removed all UI widgets and dialogues that that were used in accessing registration code. Removed code that recorded and read registration state and user name in settings. Modified code that depended on registration key and user name. Removed code to detect loss of registration info in first run code --- Src/CodeSnip.dpr | 2 - Src/CodeSnip.dproj | 4 - Src/FirstRun.FmV4ConfigDlg.dfm | 20 ++ Src/FirstRun.FmV4ConfigDlg.pas | 3 - Src/FirstRun.UMain.pas | 2 - Src/FmAboutDlg.dfm | 15 - Src/FmAboutDlg.pas | 68 +---- Src/FmMain.dfm | 14 - Src/FmMain.pas | 31 -- Src/FmRegistrationDlg.dfm | 151 ---------- Src/FmRegistrationDlg.pas | 344 ----------------------- Src/Res/HTML/dlg-about-program-tplt.html | 4 - Src/UAppInfo.pas | 63 ----- Src/UDialogMgr.pas | 12 +- Src/UUserDetailsPersist.pas | 2 - Src/Web.URegistrar.pas | 130 --------- 16 files changed, 26 insertions(+), 839 deletions(-) delete mode 100644 Src/FmRegistrationDlg.dfm delete mode 100644 Src/FmRegistrationDlg.pas delete mode 100644 Src/Web.URegistrar.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 78c718ef7..0c91accf1 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -129,7 +129,6 @@ uses FmPrintDlg in 'FmPrintDlg.pas' {PrintDlg}, FmProgramUpdatesDlg in 'FmProgramUpdatesDlg.pas' {ProgramUpdatesDlg}, FmProxyServerDlg in 'FmProxyServerDlg.pas' {ProxyServerDlg}, - FmRegistrationDlg in 'FmRegistrationDlg.pas' {RegistrationDlg}, FmRenameCategoryDlg in 'FmRenameCategoryDlg.pas' {RenameCategoryDlg}, FmSelectionSearchDlg in 'FmSelectionSearchDlg.pas' {SelectionSearchDlg}, FmSnippetsEditorDlg in 'FmSnippetsEditorDlg.pas' {SnippetsEditorDlg}, @@ -405,7 +404,6 @@ uses Web.UHTTPEx in 'Web.UHTTPEx.pas', Web.UInfo in 'Web.UInfo.pas', Web.UProgramUpdateMgr in 'Web.UProgramUpdateMgr.pas', - Web.URegistrar in 'Web.URegistrar.pas', Web.UStdWebService in 'Web.UStdWebService.pas', Web.USWAGRESTMgr in 'Web.USWAGRESTMgr.pas', Web.UXMLRequestor in 'Web.UXMLRequestor.pas'; diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index cf4f0b87b..22f085a4c 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -219,9 +219,6 @@
    ProxyServerDlg
    - -
    RegistrationDlg
    -
    RenameCategoryDlg
    @@ -620,7 +617,6 @@ - diff --git a/Src/FirstRun.FmV4ConfigDlg.dfm b/Src/FirstRun.FmV4ConfigDlg.dfm index d5657e2d7..cfc977d4b 100644 --- a/Src/FirstRun.FmV4ConfigDlg.dfm +++ b/Src/FirstRun.FmV4ConfigDlg.dfm @@ -15,6 +15,10 @@ inherited V4ConfigDlg: TV4ConfigDlg object tsIntro: TTabSheet Caption = 'tsIntro' TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblIntro1: TLabel Left = 0 Top = 3 @@ -70,6 +74,10 @@ inherited V4ConfigDlg: TV4ConfigDlg Caption = 'tsConfigFile' ImageIndex = 1 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblCopyConfig: TLabel Left = 0 Top = 3 @@ -97,6 +105,10 @@ inherited V4ConfigDlg: TV4ConfigDlg Caption = 'tsUserDB' ImageIndex = 2 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblUserDB1: TLabel Left = 0 Top = 3 @@ -136,6 +148,10 @@ inherited V4ConfigDlg: TV4ConfigDlg Caption = 'tsSummary' ImageIndex = 3 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblSummaryPrefix: TLabel Left = 0 Top = 3 @@ -170,6 +186,10 @@ inherited V4ConfigDlg: TV4ConfigDlg Caption = 'tsFinish' ImageIndex = 4 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblFinish1: TLabel Left = 0 Top = 3 diff --git a/Src/FirstRun.FmV4ConfigDlg.pas b/Src/FirstRun.FmV4ConfigDlg.pas index 22086217e..1bbea7973 100644 --- a/Src/FirstRun.FmV4ConfigDlg.pas +++ b/Src/FirstRun.FmV4ConfigDlg.pas @@ -341,7 +341,6 @@ function TV4ConfigDlg.HeadingText(const PageIdx: Integer): string; procedure TV4ConfigDlg.ListChanges; resourcestring - sRegistration = 'Program registration information has been lost.'; sHiliter = 'Syntax highlighter customisations have been lost.'; sProxyPwd = 'Your proxy server password needs to be re-entered.'; sSourceFormat = 'Source code formatting preferences may have been lost.'; @@ -353,8 +352,6 @@ procedure TV4ConfigDlg.ListChanges; // there are changes to config file: show in bullet list lblFinish2.Visible := True; Changes := TIStringList.Create; - if frcRegistration in fCfgChanges then - Changes.Add(sRegistration); if frcHiliter in fCfgChanges then Changes.Add(sHiliter); if frcProxyPwd in fCfgChanges then diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index 9eeb14e4b..965707ed9 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -29,7 +29,6 @@ interface /// Enumeration of changes that can be made to brought forward /// config files that result in data loss. TFirstRunCfgChanges = ( - frcRegistration, // local registration record lost frcHiliter, // syntax highlighter customisation lost frcProxyPwd, // internet proxy password lost frcSourceFormat // source code output formatting lost @@ -219,7 +218,6 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); begin fUserConfigFile.UpdateFromOriginal; Include(Changes, frcHiliter); - Include(Changes, frcRegistration); Include(Changes, frcSourceFormat); end; piV1_9, piV2: diff --git a/Src/FmAboutDlg.dfm b/Src/FmAboutDlg.dfm index 63858166b..cfc0062f7 100644 --- a/Src/FmAboutDlg.dfm +++ b/Src/FmAboutDlg.dfm @@ -162,19 +162,4 @@ inherited AboutDlg: TAboutDlg end end end - inherited btnHelp: TButton - TabOrder = 3 - end - inherited btnClose: TButton - TabOrder = 2 - end - object btnRegister: TButton - Left = 8 - Top = 304 - Width = 113 - Height = 25 - Caption = '&Register CodeSnip...' - TabOrder = 1 - OnClick = btnRegisterClick - end end diff --git a/Src/FmAboutDlg.pas b/Src/FmAboutDlg.pas index 44e9d453f..48dcde61e 100644 --- a/Src/FmAboutDlg.pas +++ b/Src/FmAboutDlg.pas @@ -79,7 +79,6 @@ TPathInfoBox = class(TCustomGroupBox) the program's easter egg. } TAboutDlg = class(TGenericViewDlg) - btnRegister: TButton; bvlSeparator: TBevel; frmDatabase: THTMLTpltDlgFrame; frmProgram: THTMLTpltDlgFrame; @@ -91,7 +90,6 @@ TAboutDlg = class(TGenericViewDlg) tsPaths: TTabSheet; btnViewAppConfig: TButton; btnViewUserConfig: TButton; - procedure btnRegisterClick(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); ///
    Handles event triggered when user clicks on one of page @@ -113,10 +111,6 @@ TAboutDlg = class(TGenericViewDlg) @param Sender [in] Not used. @param EventInfo [in] Object providing information about the event. } - function RegistrationHTML: string; - {Builds HTML used to display registration information. - @return Required HTML. - } function ContribListHTML(const ContribClass: TContributorsClass): string; {Builds HTML used to display list of contributors or creates an error message if contributor list is not available. @@ -135,16 +129,12 @@ TAboutDlg = class(TGenericViewDlg) {Configures form by creating custom controls and initialising HTML frames. Called from ancestor class. } - procedure InitForm; override; - {Initialises form's controls. Called from ancestor class. - } procedure InitHTMLFrames; {Initialises HTML frames to use required template document with placeholders replaced by required values. } procedure ArrangeForm; override; - {Adjusts position of registration button on bottom button line. Called - from ancestor class. + {Arranges controls on form. } procedure UpdateTitleCSS(Sender: TObject; const CSSBuilder: TCSSBuilder); {Updates CSS used for HTML displayed in title frame. @@ -172,7 +162,7 @@ implementation // Delphi SysUtils, Graphics, Math, Windows, ShellAPI, IOUtils, // Project - FmEasterEgg, FmPreviewDlg, FmRegistrationDlg, UAppInfo, UColours, UConsts, + FmEasterEgg, FmPreviewDlg, UAppInfo, UColours, UConsts, UCSSUtils, UCtrlArranger, UEncodings, UFontHelper, UGraphicUtils, UHTMLUtils, UHTMLTemplate, UIOUtils, UMessageBox, UResourceUtils, UThemesEx; @@ -191,7 +181,6 @@ implementation <%Release%> program release number <%ResURL%> url of programs HTML resources - <%Registered%> info about whether program is registered <%ContribList%> list of program contributors <%TesterList%> list of program testers <%Year%> current year @@ -217,8 +206,7 @@ function ExploreFolder(const Folder: string): Boolean; { TAboutDlg } procedure TAboutDlg.ArrangeForm; - {Adjusts position of registration button on bottom button line. Called from - ancestor class. + {Arranges controls on form. } var PathTabHeight: Integer; @@ -245,17 +233,6 @@ procedure TAboutDlg.ArrangeForm; pnlBody.ClientHeight := pnlTitle.Height + bvlSeparator.Height + pcDetail.Height; inherited; - btnRegister.Left := pnlBody.Left; - btnRegister.Top := btnHelp.Top; -end; - -procedure TAboutDlg.btnRegisterClick(Sender: TObject); - {Displays registration wizard when "Register CodeSnip" button is clicked. - @param Sender [in] Not used. - } -begin - if TRegistrationDlg.Execute(Self) then - btnRegister.Hide; // hide registration button now that program registered OK end; procedure TAboutDlg.btnViewAppConfigClick(Sender: TObject); @@ -429,15 +406,6 @@ procedure TAboutDlg.HTMLEventHandler(Sender: TObject; end; end; -procedure TAboutDlg.InitForm; - {Initialises form's controls. - } -begin - inherited; - // Decide whether to display register button - btnRegister.Visible := not TAppInfo.IsRegistered; -end; - procedure TAboutDlg.InitHTMLFrames; {Initialises HTML frames to use required template document with placeholders replaced by required values. @@ -465,11 +433,12 @@ procedure TAboutDlg.InitHTMLFrames; } begin pcDetail.ActivePage := tsProgram; // display page to let browser load OK + // TODO -cRefactor: Change this frmProgram so it's no longer a HTML template frmProgram.Initialise( 'dlg-about-program-tplt.html', procedure(Tplt: THTMLTemplate) begin - Tplt.ResolvePlaceholderHTML('Registered', RegistrationHTML); + // Do nothing: no template placeholders now registration removed end ); end; @@ -510,33 +479,6 @@ procedure TAboutDlg.pcDetailMouseDown(Sender: TObject; Button: TMouseButton; pcDetail.SetFocus; end; -function TAboutDlg.RegistrationHTML: string; - {Builds HTML used to display registration information. - @return Required HTML. - } -resourcestring - // Registration messages - sRegisteredMessage = 'Registered to %0:s.'; - sUnregisteredMessage = 'Unregistered copy:'; - sRegistrationPrompt = 'Please click the button below to register CodeSnip.'; -var - SpanAttrs: IHTMLAttributes; // attributes of span tag -begin - if TAppInfo.IsRegistered then - Result := THTML.Entities( - Format(sRegisteredMessage, [TAppInfo.RegisteredUser]) - ) - else - begin - SpanAttrs := THTMLAttributes.Create('class', 'warning'); - Result := - THTML.CompoundTag( - 'span', SpanAttrs, THTML.Entities(sUnregisteredMessage) - ) + - THTML.Entities(' ' + sRegistrationPrompt); - end; -end; - procedure TAboutDlg.UpdateDetailCSS(Sender: TObject; const CSSBuilder: TCSSBuilder); {Updates CSS used for HTML displayed in detail (i.e. program and database) diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 2da24ce52..9b296be6a 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -536,13 +536,6 @@ inherited MainForm: TMainForm ImageIndex = 16 OnExecute = actPreferencesExecute end - object actRegister: TAction - Category = 'Tools' - Caption = '&Register CodeSnip...' - Hint = 'Register CodeSnip|Register CodeSnip online' - OnExecute = actRegisterExecute - OnUpdate = actRegisterUpdate - end object actLicense: TAction Category = 'Help' Caption = 'License' @@ -1204,13 +1197,6 @@ inherited MainForm: TMainForm object miReportBug: TMenuItem Action = actBugReport end - object miSpacer9: TMenuItem - Caption = '-' - end - object miRegister: TMenuItem - Action = actRegister - Default = True - end end object miHelp: TMenuItem Caption = 'Help' diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 6ddbae3a3..d3a94d351 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -82,7 +82,6 @@ TMainForm = class(THelpAwareForm) actPrivacy: TAction; actProgramUpdates: TAction; actProxyServer: TAction; - actRegister: TAction; actRenameCategory: TAction; actRestoreDatabase: TAction; actSaveDatabase: TAction; @@ -160,7 +159,6 @@ TMainForm = class(THelpAwareForm) miPrint: TMenuItem; miPrivacy: TMenuItem; miProxyServer: TMenuItem; - miRegister: TMenuItem; miRenameCategory: TMenuItem; miReportBug: TMenuItem; miRestoreDatabase: TMenuItem; @@ -181,7 +179,6 @@ TMainForm = class(THelpAwareForm) miSpacer6: TMenuItem; miSpacer7: TMenuItem; miSpacer8: TMenuItem; - miSpacer9: TMenuItem; miSpacer10: TMenuItem; miSpacer11: TMenuItem; miSpacer12: TMenuItem; @@ -394,13 +391,6 @@ TMainForm = class(THelpAwareForm) /// Displays the Proxy Server Configuration dialogue box that can /// be used to specify a proxy server to use for internet access. procedure actProxyServerExecute(Sender: TObject); - /// Displays the Registration Wizard that can be used to register - /// CodeSnip. - procedure actRegisterExecute(Sender: TObject); - /// Determines whether the Register action is visible. - /// The action is visible iff the program is not already - /// registered. - procedure actRegisterUpdate(Sender: TObject); /// Displays a dialogue box that can be used to rename a user /// defined category. procedure actRenameCategoryExecute(Sender: TObject); @@ -514,8 +504,6 @@ TMainForm = class(THelpAwareForm) var Accept: Boolean); strict private var - /// Flag denoting if application is registered. - fIsAppRegistered: Boolean; /// Object that notifies user-initiated events by triggering /// actions. fNotifier: INotifier; @@ -621,8 +609,6 @@ implementation procedure TMainForm.actAboutExecute(Sender: TObject); begin fDialogMgr.ShowAboutDlg; - if not fIsAppRegistered then - fIsAppRegistered := TAppInfo.IsRegistered; end; procedure TMainForm.actAddCategoryExecute(Sender: TObject); @@ -1013,21 +999,6 @@ procedure TMainForm.actProxyServerExecute(Sender: TObject); fDialogMgr.ExecProxyServerDlg; end; -procedure TMainForm.actRegisterExecute(Sender: TObject); -begin - if fDialogMgr.ExecRegistrationDlg then - fIsAppRegistered := True; -end; - -procedure TMainForm.actRegisterUpdate(Sender: TObject); -begin - with Sender as TAction do - begin - Visible := not fIsAppRegistered; - Enabled := True; - end; -end; - procedure TMainForm.actRenameCategoryExecute(Sender: TObject); begin TUserDBMgr.RenameACategory; @@ -1567,8 +1538,6 @@ procedure TMainForm.InitForm; // Create object to handle compilation and assoicated UI and dialogues fCompileMgr := TMainCompileMgr.Create(Self); // auto-freed - // Record if app is registered - fIsAppRegistered := TAppInfo.IsRegistered; // Set event handler for snippets database Database.AddChangeEventHandler(DBChangeHandler); diff --git a/Src/FmRegistrationDlg.dfm b/Src/FmRegistrationDlg.dfm deleted file mode 100644 index a2907c6b8..000000000 --- a/Src/FmRegistrationDlg.dfm +++ /dev/null @@ -1,151 +0,0 @@ -inherited RegistrationDlg: TRegistrationDlg - Caption = 'Registration Wizard' - ExplicitWidth = 565 - ExplicitHeight = 433 - PixelsPerInch = 96 - TextHeight = 13 - inherited pnlBody: TPanel - inherited pcWizard: TPageControl - ActivePage = tsAboutUser - object tsIntro: TTabSheet - Caption = 'tsIntro' - TabVisible = False - object lblIntro: TLabel - Left = 0 - Top = 8 - Width = 369 - Height = 13 - AutoSize = False - Caption = 'Thanks for deciding to register CodeSnip.' - end - object lblIntroExplain: TLabel - Left = 0 - Top = 33 - Width = 369 - Height = 40 - AutoSize = False - Caption = - 'This wizard collects some information from you and the operating' + - ' system then contacts the DelphiDabbler.com website to register ' + - 'the program.' - WordWrap = True - end - object lblInstructions: TLabel - Left = 0 - Top = 72 - Width = 369 - Height = 13 - AutoSize = False - Caption = 'Please click the Next button below to begin.' - end - end - object tsAboutUser: TTabSheet - Caption = 'tsAboutUser' - ImageIndex = 1 - TabVisible = False - object lblName: TLabel - Left = 0 - Top = 8 - Width = 369 - Height = 41 - AutoSize = False - Caption = - 'The only information about you that is required to complete regs' + - 'tration is your &name. You can use a nickname if your prefer. Pl' + - 'ease enter it below (maximum 48 characters):' - FocusControl = edName - WordWrap = True - end - object edName: TEdit - Left = 0 - Top = 55 - Width = 369 - Height = 21 - BevelInner = bvSpace - BevelKind = bkFlat - BevelOuter = bvRaised - BorderStyle = bsNone - MaxLength = 48 - TabOrder = 0 - end - end - object tsSubmit: TTabSheet - Caption = 'tsSubmit' - ImageIndex = 3 - TabVisible = False - object lblReport: TLabel - Left = 0 - Top = 8 - Width = 369 - Height = 26 - AutoSize = False - Caption = - 'You are now ready to submit the registration. Here is the inform' + - 'ation that will be sent:' - WordWrap = True - end - object lblSubmit: TLabel - Left = 0 - Top = 162 - Width = 369 - Height = 26 - AutoSize = False - Caption = - 'Please ensure you are connected to the internet and then click t' + - 'he Submit button to send the registration.' - WordWrap = True - end - object edReport: TMemo - Left = 0 - Top = 40 - Width = 369 - Height = 113 - TabStop = False - BevelInner = bvSpace - BevelKind = bkFlat - BevelOuter = bvRaised - BorderStyle = bsNone - ParentColor = True - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 0 - end - end - object tsFinish: TTabSheet - Caption = 'tsFinish' - ImageIndex = 4 - TabVisible = False - object lblThanks: TLabel - Left = 0 - Top = 8 - Width = 369 - Height = 13 - AutoSize = False - Caption = 'Your registration has been completed successfully - thankyou.' - WordWrap = True - end - object lblRegCode: TLabel - Left = 0 - Top = 40 - Width = 119 - Height = 13 - Caption = 'Your registration code is: ' - end - object edRegCode: TEdit - Left = 0 - Top = 59 - Width = 249 - Height = 21 - TabStop = False - BevelInner = bvSpace - BevelKind = bkFlat - BevelOuter = bvRaised - BorderStyle = bsNone - ParentColor = True - ReadOnly = True - TabOrder = 0 - end - end - end - end -end diff --git a/Src/FmRegistrationDlg.pas b/Src/FmRegistrationDlg.pas deleted file mode 100644 index 061e278aa..000000000 --- a/Src/FmRegistrationDlg.pas +++ /dev/null @@ -1,344 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a wizard style dialogue box that registers the program online. -} - - -unit FmRegistrationDlg; - - -interface - - -uses - // Delphi - StdCtrls, ComCtrls, Controls, ExtCtrls, Classes, - // Project - FmWizardDlg, UBaseObjects; - - -type - - { - TRegistrationDlg: - Wizard style dialog box that collects information and sends application - registration to web server. - } - TRegistrationDlg = class(TWizardDlg, INoPublicConstruct) - edName: TEdit; - edRegCode: TEdit; - edReport: TMemo; - lblInstructions: TLabel; - lblIntro: TLabel; - lblIntroExplain: TLabel; - lblName: TLabel; - lblRegCode: TLabel; - lblReport: TLabel; - lblSubmit: TLabel; - lblThanks: TLabel; - tsAboutUser: TTabSheet; - tsFinish: TTabSheet; - tsIntro: TTabSheet; - tsSubmit: TTabSheet; - strict private - fRegistered: Boolean; // Flag indicating whether program was registered - procedure BuildSubmission(const Report: TStrings); - {Builds registration submission as list of values in name=value format. - @param Report [in] Stores submission on completion. - } - procedure DoRegistration; - {Registers program and displays registration code. - } - function RegisterWithWebServer: string; - {Gathers required registration data, sends to web server and gets - registration code from it. - @return Registration code. - @except EWebError exception raised if there is a failure in interaction - with web service. - } - function ValidateUserInfo: Boolean; - {Validates data entered by user. Displays any error messages. - @return True if data valid, false if not. - } - strict protected - procedure ArrangeForm; override; - {Vertically arranges controls as required and sizes the tab sheets to be - able to display the longest page. - } - procedure ConfigForm; override; - {Sets font styles where necessary and initialises HTML frames. - } - procedure InitForm; override; - {Initialises controls. - } - procedure BeginPage(const PageIdx: Integer); override; - {Performs required initialisation when a page is displayed. - @param PageIdx [in] Index page to be initialised. - } - function HeadingText(const PageIdx: Integer): string; override; - {Gets text of heading of a wizard page. - @param PageIdx [in] Index of page for which heading is required. - @return Heading text. - } - procedure MoveForward(const PageIdx: Integer; - var CanMove: Boolean); override; - {Performs required processing on moving forward from pages. - @param PageIdx [in] Index of page we are leaving. - @param CanMove [in/out] Flag set to indicate whether can leave page. - Defaults to true. - } - procedure UpdateButtons(const PageIdx: Integer); override; - {Updates wizard buttons depending on page and state. - @param PageIdx [in] Index of current page. - } - public - class function Execute(const Owner: TComponent): Boolean; - {Displays dialog box. - @param Owner [in] Component that owns this dialog. - @return True if program was registered, false otherwise. - } - end; - - -implementation - - -uses - // Delphi - SysUtils, Forms, - // Project - UAppInfo, UFontHelper, UCtrlArranger, UMessageBox, UStrUtils, USystemInfo, - UUserDetails, UUserDetailsPersist, Web.URegistrar; - - -{$R *.dfm} - -const - // Index of wizard pages - cIntroPageIdx = 0; - cAboutUserPageIdx = 1; - cSubmitPageIdx = 2; - cFinishPageIdx = 3; - -resourcestring - // Pages headings - sIntroHeading = 'Register CodeSnip'; - sAboutUserHeading = 'About you'; - sSubmitHeading = 'Submit registration'; - sFinishHeading = 'Registration complete'; - // Submit button caption - sSubmitBtnCaption = '&Submit'; - // Error messages - sErrNameRequired = 'You need to provide your name or a nickname.'; - - -{ TRegistrationDlg } - -procedure TRegistrationDlg.ArrangeForm; - {Vertically arranges controls as required and sizes the tab sheets to be able - to display the longest page. - } -begin - // set heights of all labels with AutoSize = False - TCtrlArranger.SetLabelHeights(Self); - - // tsIntro tabsheet - lblIntroExplain.Top := TCtrlArranger.BottomOf(lblIntro, 8); - lblInstructions.Top := TCtrlArranger.BottomOf(lblIntroExplain, 8); - - // tsAboutUser tabsheet - edName.Top := TCtrlArranger.BottomOf(lblName, 8); - - // tsSubmit tabsheet - edReport.Top := TCtrlArranger.BottomOf(lblReport, 8); - lblSubmit.Top := TCtrlArranger.BottomOf(edReport, 8); - - // tsFinish tabsheet - lblRegCode.Top := TCtrlArranger.BottomOf(lblThanks, 8); - edRegCode.Top := TCtrlArranger.BottomOf(lblRegCode, 4); - - // set required height - pnlBody.ClientHeight := TCtrlArranger.MaxContainerHeight( - [tsAboutUser, tsFinish, tsIntro, tsSubmit] - ) + pnlBody.ClientHeight - tsAboutUser.Height; - - // Arrange inherited controls and size the form - inherited; -end; - -procedure TRegistrationDlg.BeginPage(const PageIdx: Integer); - {Performs required initialisation when a page is displayed. - @param PageIdx [in] Index page to be initialised. - } -begin - inherited; - case PageIdx of - cSubmitPageIdx: - // Create data to be sent to website ready for submission - BuildSubmission(edReport.Lines); - cAboutUserPageIdx: - // Focus first control on page - edName.SetFocus; - end; -end; - -procedure TRegistrationDlg.BuildSubmission(const Report: TStrings); - {Builds registration submission as list of values in name=value format. - @param Report [in] Stores submission on completion. - } -begin - Report.Clear; - Report.Values['ProgId'] := TAppInfo.ProgramID; - Report.Values['ProgName'] := TAppInfo.ProgramName; - Report.Values['ProgVer'] := TAppInfo.ProgramReleaseVersion; - Report.Values['ProgKey'] := TAppInfo.ProgramKey; - Report.Values['UserName'] := StrTrim(edName.Text); - Report.Values['OSDesc'] := - Format( - '%0:s. IE Version %1:d.', [TOSInfo.Description, TIEInfo.MajorVersion] - ); -end; - -procedure TRegistrationDlg.ConfigForm; - {Sets font styles where necessary and initialises HTML frames. - } -begin - inherited; - TFontHelper.SetDefaultMonoFont(edRegCode.Font); -end; - -procedure TRegistrationDlg.DoRegistration; - {Registers program and displays registration code. - } -var - UserDetails: TUserDetails; // information about user -begin - Screen.Cursor := crHourglass; - try - // register with server - edRegCode.Text := RegisterWithWebServer; - // record registration & user details - UserDetails := TUserDetails.Create(StrTrim(edName.Text), ''); - TAppInfo.RegisterProgram(edRegCode.Text, UserDetails.Name); - TUserDetailsPersist.Update(UserDetails); - fRegistered := True; - finally - Screen.Cursor := crDefault; - end; -end; - -class function TRegistrationDlg.Execute(const Owner: TComponent): Boolean; - {Displays dialog box. - @param Owner [in] Component that owns this dialog. - @return True if program was registered, false otherwise. - } -begin - with InternalCreate(Owner) do - try - ShowModal; - Result := fRegistered; - finally - Free; - end; -end; - -function TRegistrationDlg.HeadingText(const PageIdx: Integer): string; - {Gets text of heading of a wizard page. - @param PageIdx [in] Index of page for which heading is required. - @return Heading text. - } -const - // Map of page indexes to page heading - cPageHeadings: array[0..3] of string = ( - sIntroHeading, sAboutUserHeading, sSubmitHeading, sFinishHeading - ); -begin - Result := cPageHeadings[PageIdx]; -end; - -procedure TRegistrationDlg.InitForm; - {Initialises controls. - } -var - UserDetails: TUserDetails; // any known information about user -begin - inherited; - // Use user name if known - UserDetails := TUserDetailsPersist.Load; - edName.Text := UserDetails.Name; -end; - -procedure TRegistrationDlg.MoveForward(const PageIdx: Integer; - var CanMove: Boolean); - {Performs required processing on moving forward from pages. - @param PageIdx [in] Index of page we are leaving. - @param CanMove [in/out] Flag set to indicate whether can leave page. - Defaults to true. - } -begin - inherited; - case PageIdx of - cAboutUserPageIdx: - CanMove := ValidateUserInfo; - cSubmitPageIdx: - DoRegistration; - end; -end; - -function TRegistrationDlg.RegisterWithWebServer: string; - {Gathers required registration data, sends to web server and gets registration - code from it. - @return Registration code. - @except EWebError exception raised if there is a failure in interaction - with web service. - } -var - Reg: TRegistrar; // object that communicates with web server - PostData: TStringList; // list of data items to be sent to web server -begin - PostData := nil; - Reg := TRegistrar.Create; - try - PostData := TStringList.Create; - BuildSubmission(PostData); - Result := Reg.Submit(PostData); // raises exception on fail result - finally - FreeAndNil(PostData); - FreeAndNil(Reg); - end; -end; - -procedure TRegistrationDlg.UpdateButtons(const PageIdx: Integer); - {Updates wizard buttons depending on page and state. - @param PageIdx [in] Index of current page. - } -begin - inherited; - if PageIdx = cSubmitPageIdx then - btnNext.Caption := sSubmitBtnCaption; - btnCancel.Enabled := PageIdx <> cFinishPageIdx; -end; - -function TRegistrationDlg.ValidateUserInfo: Boolean; - {Validates data entered by user. Displays any error messages. - @return True if data valid, false if not. - } -begin - Result := True; - if StrTrim(edName.Text) = '' then - begin - Result := False; - TMessageBox.Error(Self, sErrNameRequired); - end; -end; - -end. - diff --git a/Src/Res/HTML/dlg-about-program-tplt.html b/Src/Res/HTML/dlg-about-program-tplt.html index 19a9aef2a..1ea073618 100644 --- a/Src/Res/HTML/dlg-about-program-tplt.html +++ b/Src/Res/HTML/dlg-about-program-tplt.html @@ -161,10 +161,6 @@ -

    - <%Registered%> -

    - diff --git a/Src/UAppInfo.pas b/Src/UAppInfo.pas index 1aea3b672..438c6dbfd 100644 --- a/Src/UAppInfo.pas +++ b/Src/UAppInfo.pas @@ -35,10 +35,6 @@ TAppInfo = class(TNoConstructObject) {Generates unique program key for application in deterministic way. @return Required key. } - class function RegistrationCode: string; - {Reads program's registration code from persistent storage. - @return Registration code or '' if not registered. - } public const CompanyName = 'DelphiDabbler'; {Name of "company" that owns this program} @@ -121,20 +117,6 @@ TAppInfo = class(TNoConstructObject) each installation. If key does not exist it is created. @return 32 digit key. } - class procedure RegisterProgram(const Code, Name: string); - {Registers program by storing registration code and user name in - persistent storage. - @param Code [in] Registration code. - @param Name [in] Registered user name. - } - class function IsRegistered: Boolean; - {Checks if program is registered. - @return True if program registered. - } - class function RegisteredUser: string; - {Reads name of registered user from persistent storage. - @return User name or '' if not registered. - } end; @@ -253,14 +235,6 @@ class function TAppInfo.HelpFileName: string; Result := AppExeDir + '\CodeSnip.chm'; end; -class function TAppInfo.IsRegistered: Boolean; - {Checks if program is registered. - @return True if program registered. - } -begin - Result := RegistrationCode <> ''; -end; - class function TAppInfo.ProgramFileVersion: string; {Gets version number of program's executable file. @return Version number as dotted quad. @@ -308,43 +282,6 @@ class function TAppInfo.ProgramReleaseVersion: string; Result := TVersionInfo.ProductVersionNumberStr; end; -class function TAppInfo.RegisteredUser: string; - {Reads name of registered user from persistent storage. - @return User name or '' if not registered. - } -var - Section: ISettingsSection; // persistent storage where name is recorded -begin - Section := Settings.ReadSection(ssApplication); - Result := Section.GetString('RegName'); -end; - -class procedure TAppInfo.RegisterProgram(const Code, Name: string); - {Registers program by storing registration code and user name in persistent - storage. - @param Code [in] Registration code. - @param Name [in] Registered user name. - } -var - Section: ISettingsSection; // persistent storage where code is to be recorded -begin - Section := Settings.ReadSection(ssApplication); - Section.SetString('RegCode', Code); - Section.SetString('RegName', Name); - Section.Save; -end; - -class function TAppInfo.RegistrationCode: string; - {Reads program's registration code from persistent storage. - @return Registration code or '' if not registered. - } -var - Section: ISettingsSection; // persistent storage where code is recorded -begin - Section := Settings.ReadSection(ssApplication); - Result := Section.GetString('RegCode'); -end; - class function TAppInfo.UserAppDir: string; {Gets the CodeSnip data directory stored within the user's application data directory. diff --git a/Src/UDialogMgr.pas b/Src/UDialogMgr.pas index 6ee39a33e..8e958fd36 100644 --- a/Src/UDialogMgr.pas +++ b/Src/UDialogMgr.pas @@ -90,11 +90,6 @@ TDialogMgr = class(TComponent) function ExecPreferencesDlg(const PageClassName: string; out UpdateUI: Boolean): Boolean; overload; - /// Displays Registration dialogue box. - /// Boolean. True if user OKd dialogue or False if user cancelled. - /// - function ExecRegistrationDlg: Boolean; - /// Displays Select Snippets dialogue box. /// TSnippetList [in] List of pre-selected /// snippets. @@ -170,7 +165,7 @@ implementation // Project FmAboutDlg, FmDBUpdateDlg, FmDependenciesDlg, FmDonateDlg, FmFindCompilerDlg, FmFindTextDlg, FmFindXRefsDlg, FmNewsDlg, FmPreferencesDlg, FmPrintDlg, - FmProgramUpdatesDlg, FmProxyServerDlg, FmRegistrationDlg, + FmProgramUpdatesDlg, FmProxyServerDlg, FmSelectionSearchDlg, FmSWAGImportDlg, FmTestCompileDlg, FmUserBugReportDlg, UTestUnitDlgMgr; @@ -221,11 +216,6 @@ function TDialogMgr.ExecProxyServerDlg: Boolean; Result := TProxyServerDlg.Execute(Owner); end; -function TDialogMgr.ExecRegistrationDlg: Boolean; -begin - Result := TRegistrationDlg.Execute(Owner); -end; - function TDialogMgr.ExecSelectionSearchDlg( const SelectedSnippets: TSnippetList; out ASearch: ISearch): Boolean; begin diff --git a/Src/UUserDetailsPersist.pas b/Src/UUserDetailsPersist.pas index 39e4c0ec9..b68e63bd5 100644 --- a/Src/UUserDetailsPersist.pas +++ b/Src/UUserDetailsPersist.pas @@ -63,8 +63,6 @@ class function TUserDetailsPersist.Load: TUserDetails; inherited; UserData := Settings.ReadSection(ssUserInfo); Name := StrTrim(UserData.GetString('Name')); - if Name = '' then - Name := StrTrim(TAppInfo.RegisteredUser); if Name = '' then Name := StrTrim(TComputerInfo.UserName); Email := StrTrim(UserData.GetString('Email')); diff --git a/Src/Web.URegistrar.pas b/Src/Web.URegistrar.pas deleted file mode 100644 index 7348e3575..000000000 --- a/Src/Web.URegistrar.pas +++ /dev/null @@ -1,130 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a class that interfaces with the DelphiDabbler program - * registration web service. -} - - -unit Web.URegistrar; - - -interface - - -uses - // Delphi - Classes, - // Project - Web.UStdWebService; - - -type - /// Provides an interface to the DelphiDabbler program registration - /// web service. - TRegistrar = class(TStdWebService) - public - /// Creates a new object instance with the correct URL and - /// suitable user agent for accessing the web service. - constructor Create; - /// Sends regisration data to the web service and interprets its - /// response. - /// TStrings [in] Registration information as a list of - /// Name=Value data items. - /// string. Program's registration key returned from the web - /// service. - function Submit(const Data: TStrings): string; - end; - - -implementation - - -uses - // Project - UStrUtils, UURIParams, Web.UInfo; - - -{ - Web service notes: register-app.php - ----------------------------------- - - This web service enables CodeSnip to register the application with the - DelphiDabbler website. - - The service accepts registration information as a series of name=value pairs - POSTed to it. The required and optional data is as follows. - - +--------------------------------------------------------------------+ - | Name | Required? | Description | - +-----------+-----------+--------------------------------------------+ - | ProgId | Yes | Program id code (string) | - +-----------+-----------+--------------------------------------------+ - | ProgName | No | Name of program (string) | - +-----------+-----------+--------------------------------------------+ - | ProgVer | No | Program version number (dotted quad) | - +-----------+-----------+--------------------------------------------+ - | ProgKey | Yes | Unique program key (32 hex digits) | - +-----------+-----------+--------------------------------------------+ - | UserName | Yes | Name of user registering program | - +-----------+-----------+--------------------------------------------+ - | MailList | No | Whether to join any mailing list (0 or 1) | - +-----------+-----------+--------------------------------------------+ - | UserEmail | No* | Email address of user joining mailing list | - | | | * required only if MailList=1 | - +-----------+-----------+--------------------------------------------+ - - Responses from the web service comprise a numeric success code on a line on - its own followed by some data, i.e. - CRLF - - If registration succeeds the success code is '0' and the data is the program's - registration key which is a string of 32 hex digits. - - If the registration fails the success code is a +ve error code and the data - is an error message. - - If the client application accessing web service does not supply the required - user agent then the service responds with a HTTP 403 (Forbidden) error. -} - - -const - // Web service info - cScriptURLTplt = 'http://%s/websvc/register-app'; - cUserAgent = 'DelphiDabbler-Registrar-v2'; - - -{ TRegistrar } - -constructor TRegistrar.Create; -begin - inherited Create(TWebServiceInfo.Create(cScriptURLTplt, cUserAgent)); -end; - -function TRegistrar.Submit(const Data: TStrings): string; -var - Response: TStringList; // response from server - Query: TURIParams; // query made from Name=Value pairs in Data -begin - Query := nil; - Response := TStringList.Create; - try - Query := TURIParams.Create(Data); - PostQuery(Query, Response); - Result := StrTrim(Response.Text); // registration key - finally - Query.Free; - Response.Free; - end; -end; - -end. - From 652c75a6be3757b6c10e52fde7e9340340086b3b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 5 Feb 2020 02:27:24 +0000 Subject: [PATCH 016/714] Modified first run code to remove unused registration info from config file. --- Src/FirstRun.UConfigFile.pas | 11 +++++++++++ Src/FirstRun.UMain.pas | 3 +++ 2 files changed, 14 insertions(+) diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index 3e5f347c1..60fec020f 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -137,6 +137,9 @@ TCommonConfigFileUpdater = class(TConfigFileUpdater) /// a different section to common config file, hence need for overridden /// methods. procedure Stamp; override; + /// Deletes program registration information from application + /// section. + procedure DeleteRegistrationInfo; end; @@ -488,6 +491,14 @@ procedure TUserConfigFileUpdater.UpdateNamespaces; { TCommonConfigFileUpdater } +procedure TCommonConfigFileUpdater.DeleteRegistrationInfo; +begin + if not TFile.Exists(CfgFileName, False) then + CreateNewFile; + DeleteIniKey('Application', 'RegCode', CfgFileName); + DeleteIniKey('Application', 'RegName', CfgFileName); +end; + class function TCommonConfigFileUpdater.GetFileVersion: Integer; begin Result := FileVersion; diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index 965707ed9..69ed3656b 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -260,6 +260,9 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); if fUserConfigFile.FileVer < 15 then fUserConfigFile.UpdateFindXRefs; + if fCommonConfigFile.FileVer < 7 then + fCommonConfigFile.DeleteRegistrationInfo; + fUserConfigFile.Stamp; // NOTE: strictly speaking we only need to stamp common config file in // portable version. Installer does this in normal version. However, it does From 320890fd2970e7faa65a420b3f82dab245f7b453 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 5 Feb 2020 02:52:29 +0000 Subject: [PATCH 017/714] Added some TODOs --- Src/CodeSnip.todo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index e69de29bb..07ebddfa1 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -0,0 +1,2 @@ +{TODO -cFirstRun : Update config file versions: common to 7 and user to 16} +{TODO -cPreRelease : Add correct CodeSnip version to Docs\Design\FileFormat\Config.html (currently flagged as 4.###)} From ed8394e257bca6d91cfba233fddbfd2e16091b5a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 5 Feb 2020 02:54:13 +0000 Subject: [PATCH 018/714] Removed help and other docs relating to program registration. --- Docs/Design/FileFormats/config.html | 23 ++---- Docs/Privacy.txt | 38 +--------- Src/Help/CodeSnip.hhp | 1 - Src/Help/HTML/dlg_about.htm | 9 --- Src/Help/HTML/dlg_firstrun.htm | 14 ---- Src/Help/HTML/dlg_register.htm | 105 ---------------------------- Src/Help/HTML/main_menu.htm | 2 +- Src/Help/HTML/menu_help.htm | 6 +- Src/Help/HTML/menu_tools.htm | 16 ----- Src/Help/HTML/privacy_statement.htm | 61 +--------------- Src/Help/Index.hhk | 4 -- 11 files changed, 10 insertions(+), 269 deletions(-) delete mode 100644 Src/Help/HTML/dlg_register.htm diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index fe3d248ae..1eb091cf3 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -122,9 +122,8 @@

    - There have been several versions of this file. The current one is version 6. - The change to version 6 came with CodeSnip v4 and the change to Unicode - encoding. + There have been several versions of this file. The current one is version 7. + The change to version 7 came with CodeSnip v4.### and the removal of DelphiDabbler web service support.

    @@ -150,20 +149,6 @@

    Unique application ID. String of 32 hex digits.
    -
    - RegCode (String) -
    -
    - Registration code. String of 32 hex digits. May be empty string or missing - if application not registered. -
    -
    - RegName (String) -
    -
    - Name of person who registered program. May be empty string or missing if - application not registered. -
    Version (String)
    @@ -214,8 +199,8 @@

    - There have been several versions of this file. The current one is version 15. -

    + There have been several versions of this file. The current one is version 16. The change to version 16 came with CodeSnip v4.### and the removal of DelphiDabbler web service support. +

    The file is in INI file format. It has the following sections. diff --git a/Docs/Privacy.txt b/Docs/Privacy.txt index 75fc551bc..529d26795 100644 --- a/Docs/Privacy.txt +++ b/Docs/Privacy.txt @@ -20,14 +20,9 @@ Common.config is located in the %ProgramData%\DelphiDabbler\CodeSnip.4 folder for the standard edition or in the AppData sub folder of the install directory for the portable edition. -The data that is stored in Common.config includes: - - * A unique 32 digit key based on attributes of your computer. - * A 32 digit registration key (registered programs only). - * The registered user name or nickname (registered programs only). - -The data that is used to create the hexidecimal keys cannot be recovered from -those keys. +The data that is stored in Common.config includes a unique 32 digit hexadecimal +key based on attributes of your computer. The data that is used to create the +hexadecimal key cannot be recovered from the key. User.config @@ -72,7 +67,6 @@ CodeSnip Online Activity CodeSnip may go online for several reasons. They are: 1. Updating the database. - 2. Registering the program. 3. Submitting code for inclusion in the main database. 4. Displaying the latest news in the "CodeSnip News" dialogue box. 5. Checking for program updates. @@ -127,36 +121,10 @@ This information is recorded in two places: operating systems and browser control versions currently in use. This information informs development of CodeSnip. -This information may also be used to update the registered program database. - None of these records store any information that can be tracked back to an individual. -Registering the Program --------------------------------------------------------------------------------- - -This activity is started when the user chooses to register CodeSnip. A wizard -appears that guides the user through the registration process. The wizard -displays the data that is to be sent to the registration web service. The data -is only sent if the user clicks the wizard's "Submit" button. The data is: - - * The program's id, name and version information. - * The unique 32 digit program key (see Common.config above for details). - * The user name or nickname. - * A description of the operating system and version of Internet Explorer - being used. - -The registration data is recorded in a database on the DelphiDabbler web server. -The data is only used to keep track of the number of people using the different -versions of the program and what operating systems are being used. The -registration web service returns a registration code to the program. CodeSnip -records this code, with the user name, in Common.config. - -Registration information may be updated when the user updates the database (see -"Updating the Database" above). - - Submitting code to the main database -------------------------------------------------------------------------------- diff --git a/Src/Help/CodeSnip.hhp b/Src/Help/CodeSnip.hhp index fdb87ef30..3b9804bf3 100644 --- a/Src/Help/CodeSnip.hhp +++ b/Src/Help/CodeSnip.hhp @@ -56,7 +56,6 @@ HTML\dlg_prefs_sourcecode.htm HTML\dlg_print.htm HTML\dlg_programupdates.htm HTML\dlg_proxyserver.htm -HTML\dlg_register.htm HTML\dlg_renamecategory.htm HTML\dlg_restore.htm HTML\dlg_saveselection.htm diff --git a/Src/Help/HTML/dlg_about.htm b/Src/Help/HTML/dlg_about.htm index 91cff10e0..d8619218e 100644 --- a/Src/Help/HTML/dlg_about.htm +++ b/Src/Help/HTML/dlg_about.htm @@ -37,12 +37,6 @@

    The program's version number is displayed in the heading of the dialogue box.

    -

    - If CodeSnip is unregistered then a Register CodeSnip - button will be displayed at the bottom left of the dialogue box. Clicking - this button displays the Registration - Wizard that can be used to register the program. -

    In addition the dialogue has three tabs, each of which is described below.

    @@ -59,9 +53,6 @@

  • Credits and Attributions.
  • -
  • - If the program has been registered. -
  • About The Database diff --git a/Src/Help/HTML/dlg_firstrun.htm b/Src/Help/HTML/dlg_firstrun.htm index a436b40f3..8863fb522 100644 --- a/Src/Help/HTML/dlg_firstrun.htm +++ b/Src/Help/HTML/dlg_firstrun.htm @@ -118,20 +118,6 @@

    >Preferences dialogue box. -
  • -
    - If you are updating from v1.8.11 or earlier and have registered - CodeSnip you registration information will have been lost. -
    -
    - You can check this by displaying the About dialogue box and checking the About The Program - tab. If it displays a Register CodeSnip button the program - is not registered. You can (re)register if you wish by clicking the - button. -
    -
  • Once you have decided whether to preserve preferences or not, click the diff --git a/Src/Help/HTML/dlg_register.htm b/Src/Help/HTML/dlg_register.htm deleted file mode 100644 index fa55b5b8e..000000000 --- a/Src/Help/HTML/dlg_register.htm +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - Registration Wizard - - - - - - - -

    - Registration Wizard -

    -

    - This dialogue box is used to register CodeSnip. -

    -

    - Note You do not have to register CodeSnip to - use it. However, the author hopes you will register so that he knows that - CodeSnip is being used and is worth maintaining. -

    -

    - The dialogue takes the form of a multi-page wizard that gathers - registration information and submits it online. You move through the - pages by clicking the Next button and can return to a previous - page using the Back button. The Cancel button closes - the wizard without registering the application. -

    -

    - First page -

    -

    - This page simply displays some introductory text. -

    -

    - Second page -

    -

    - You use this page to provide information about yourself. All you need to - provide is your name or a nickname. -

    -

    - Third page -

    -

    - Along with the information you have entered CodeSnip will have - collected some information about itself and your operating system that it - will send to the web server. All the information that will be sent is - displayed on this page. -

    -

    - If you are happy to send the information please make sure you are - connected to the internet and click the Submit button. -

    -

    - The program will now attempt to connect to delphidabbler.com and send the registration information. If the - report is sent successfully the wizard's final page will be displayed. - Should an error be detected an error message describing the problem will - be displayed. -

    -

    - If you have concerns about privacy, please read the privacy statement before submitting. -

    -

    - Fourth page -

    -

    - This page is shown when the registration has been successful. The - program's registration code will be displayed in a box. This value - is automatically stored by CodeSnip in its configuration file. -

    -

    - You can now close the dialogue box by clicking the Finish button. -

    -

    - Please note CodeSnip should be registered only once per computer, - regardless of the number of users. If other users wish to join the mailing - list they can do so using the Tools | Join Mailing List menu - option. -

    - - diff --git a/Src/Help/HTML/main_menu.htm b/Src/Help/HTML/main_menu.htm index ccd875d70..c0344d442 100644 --- a/Src/Help/HTML/main_menu.htm +++ b/Src/Help/HTML/main_menu.htm @@ -102,7 +102,7 @@

    Tools - Configruation, bug reporting and registration. + Configuration and bug reporting. diff --git a/Src/Help/HTML/menu_help.htm b/Src/Help/HTML/menu_help.htm index 980f685f1..1d1548d12 100644 --- a/Src/Help/HTML/menu_help.htm +++ b/Src/Help/HTML/menu_help.htm @@ -179,11 +179,7 @@

    About - Displays the about box that shows the - program's version number, copyright information and credits. It - also provides links to the full license for the program and shows if - the program has been registered. See if you can find the Easter - Egg! + Displays the about box that shows the program's version number, copyright information and credits. It also provides links to the full license for the program. See if you can find the Easter Egg! diff --git a/Src/Help/HTML/menu_tools.htm b/Src/Help/HTML/menu_tools.htm index a523e695d..d028092d9 100644 --- a/Src/Help/HTML/menu_tools.htm +++ b/Src/Help/HTML/menu_tools.htm @@ -109,22 +109,6 @@

    Box. This is used to access the CodeSnip bug tracker. - - -   - - - Register CodeSnip - - - Displays the Registration Wizard that enables the - program to be registered online. Registration is not compulsory, but - is appreciated.
    - Note: This menu item only appears if - CodeSnip has not been registered. - -

    Return to the directory for the portable edition.

    - The data that is stored in Common.config includes: -

    -
      -
    • - A unique 32 digit key based on attributes of your computer. -
    • -
    • - A 32 digit registration key (registered programs only). -
    • -
    • - The registered user name or nickname (registered programs only). -
    • -
    -

    - The data that is used to create the hexidecimal keys cannot be recovered - from those keys. + The data that is stored in Common.config includes a unique 32 digit hexadecimal key based on attributes of your computer. The data that is used to create the hexadecimal key cannot be recovered from the key.

    User.config @@ -122,9 +107,6 @@

  • Updating the database.
  • -
  • - Registering the program. -
  • Submitting code for inclusion in the main database.
  • @@ -224,51 +206,10 @@

    -

    - This information may also be used to update the registered program - database. -

    None of these records store any information that can be tracked back to an individual.

    -

    - Registering the Program -

    -

    - This activity is started when the user chooses to register - CodeSnip. A wizard appears that guides the user through the - registration process. The wizard displays the data that is to be sent to - the registration web service. The data is only sent if the user clicks - the wizard's "Submit" button. The data is: -

    -
      -
    • - The program's id, name and version information. -
    • -
    • - The unique 32 digit program key (see Common.config above for details). -
    • -
    • - The user name or nickname. -
    • -
    • - A description of the operating system and version of Internet Explorer - being used. -
    • -
    -

    - The registration data is recorded in a database on the DelphiDabbler web - server. The data is only used to keep track of the number of people using - the different versions of the program and what operating systems are being - used. The registration web service returns a registration code to the - program. CodeSnip records this code, with the user name, in - Common.config. -

    -

    - Registration information may be updated when the user updates the database - (see "Updating the Database" above). -

    Submitting code to the main database

    diff --git a/Src/Help/Index.hhk b/Src/Help/Index.hhk index a78b140c2..7d89d0608 100644 --- a/Src/Help/Index.hhk +++ b/Src/Help/Index.hhk @@ -331,10 +331,6 @@ -
  • - - -
  • From a92b24fe57b5bb987ecc1320e915e509e4b70858 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 5 Feb 2020 03:11:24 +0000 Subject: [PATCH 019/714] Changed bug report URL to access GitHub instead of SourceForge --- Src/Web.UInfo.pas | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Src/Web.UInfo.pas b/Src/Web.UInfo.pas index 70d9e6e2c..4b9c30e2d 100644 --- a/Src/Web.UInfo.pas +++ b/Src/Web.UInfo.pas @@ -93,6 +93,8 @@ TWebInfo = class(TNoConstructObject) class function Host: string; public const + /// URL of CodeSnip's GitHub page. + GitHubURL = 'https://github.com/delphidabbler/codesnip'; /// URL of home page on DelphiDabbler website. DelphiDabblerHomeURL = WebsiteURL + '/'; /// URL of home page of the CodeSnip project. @@ -103,14 +105,14 @@ TWebInfo = class(TNoConstructObject) /// /// This URL redirects to the correct page on PayPal. DonateURL = WebsiteURL + '/url/donate-cs'; - /// URL used to view and report CodeSnip bugs. - /// This URL will redirect to the actual bug tracker which may - /// be on an external site such as SourceForge or GitHub. - BugTrackerURL = WebsiteURL + '/url/codesnip-bugs'; + /// URL used to view and report CodeSnip bugs on GitHub. + /// + BugTrackerURL = GitHubURL + '/issues'; /// URL of CodeSnip's FAQ web page. /// This URL will redirect to the FAQ location which may be on /// an external site such as GitHub or SourceForge. FAQsURL = WebsiteURL + '/url/codesnip-faq'; + public /// Returns the name of the server that hosts web services used by /// CodeSnip when under testing. This server receives updated web services From 208228115ca40852bfbf5f1d64b21a9062ec2769 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 5 Feb 2020 03:12:02 +0000 Subject: [PATCH 020/714] Modified bug dialogue text re move of bug tracker to GitHub --- Src/FmTrappedBugReportDlg.dfm | 13 ++++++++----- Src/FmUserBugReportDlg.dfm | 6 ++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Src/FmTrappedBugReportDlg.dfm b/Src/FmTrappedBugReportDlg.dfm index 50f08005b..1451ff039 100644 --- a/Src/FmTrappedBugReportDlg.dfm +++ b/Src/FmTrappedBugReportDlg.dfm @@ -1,6 +1,6 @@ inherited TrappedBugReportDlg: TTrappedBugReportDlg Caption = 'Unexpected Error' - ExplicitHeight = 356 + ExplicitHeight = 375 PixelsPerInch = 96 TextHeight = 13 inherited pnlBody: TPanel @@ -46,7 +46,8 @@ inherited TrappedBugReportDlg: TTrappedBugReportDlg AutoSize = False Caption = 'It will be helpful if you can take the time to report this bug u' + - 'sing the online CodeSnip bug tracker.' + 'sing the online CodeSnip bug tracker on GitHub (GitHub account r' + + 'equired).' WordWrap = True end object lblInstruct2: TLabel [4] @@ -69,9 +70,11 @@ inherited TrappedBugReportDlg: TTrappedBugReportDlg Height = 38 AutoSize = False Caption = - 'CodeSnip has gathered some information about the bug that will b' + - 'e placed on the clipboard. When you are reporting the bug please' + - ' paste the information after your description of the problem.' + 'CodeSnip has gathered some data about the bug that will be place' + + 'd on the clipboard. When you are reporting the bug please paste ' + + 'the information after your description of the problem. Please do' + + ' write a description of what you were doing. The data on the cli' + + 'pboard is not sufficient on its own.' WordWrap = True end inherited lblBugTrackerKey: TLabel diff --git a/Src/FmUserBugReportDlg.dfm b/Src/FmUserBugReportDlg.dfm index 265c6b9ab..10cf1e19a 100644 --- a/Src/FmUserBugReportDlg.dfm +++ b/Src/FmUserBugReportDlg.dfm @@ -1,5 +1,6 @@ inherited UserBugReportDlg: TUserBugReportDlg Caption = 'Report Bug Online' + ExplicitHeight = 375 PixelsPerInch = 96 TextHeight = 13 inherited pnlBody: TPanel @@ -22,8 +23,9 @@ inherited UserBugReportDlg: TUserBugReportDlg AutoSize = False Caption = 'Please use the link below to display CodeSnip'#39's online bug track' + - 'er then review the existing bug reports to see if anything simil' + - 'ar has been reported already, or maybe even fixed.' + 'er on GitHub (GitHub account required). Please review the existi' + + 'ng bug reports to see if anything similar has been reported alre' + + 'ady, or maybe even fixed.' WordWrap = True end object lblInstruct3: TLabel From 50ab9c64e880d8e687f96d44faa50c6149c072b7 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 5 Feb 2020 03:31:04 +0000 Subject: [PATCH 021/714] Updated help and other docs re change of bug tracker to GitHub --- Docs/License.html | 3 +-- Docs/ReadMe.txt | 4 ++-- Src/Help/HTML/dlg_trappedbugreport.htm | 7 ++----- Src/Help/HTML/dlg_userbugreport.htm | 4 +--- Src/Help/HTML/menu_tools.htm | 3 +-- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Docs/License.html b/Docs/License.html index 97e6bda07..43f8c1b22 100644 --- a/Docs/License.html +++ b/Docs/License.html @@ -1552,8 +1552,7 @@

    Restrictions

    Limited warranty

    There is no warranty or other guarantee of fitness for this software, it is - provided solely "as is". Bug reports or fixes may be sent to the - Author, who may or may not act on them as he desires.

    + provided solely "as is". Bug reports or fixes may be submitted, but there is no guarantee they will be acted upon.

    LZW license

    diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt index 82c2b9ca1..ec8044966 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe.txt @@ -367,7 +367,7 @@ Bugs Please do report any bugs you find. Bugs are recorded in tracker software. View the reported and fixed bugs via -http://delphidabbler.com/url/codesnip-bugs (this redirects to the tracker page). +https://github.com/delphidabbler/codesnip/issues You can also access the bug tracker from CodeSnip by using the "Tools | Report Bug Online" menu option then following the link that appears in the resulting @@ -377,7 +377,7 @@ If you wish to report a bug, please check the current reports on the bug tracker. If your bug hasn't already been reported or fixed please add a report using the "Add new" link on Tracker. -Please note that versions 1 and 2 of CodeSnip are no longer supported, so don't +Please note that versions 1 to 3 of CodeSnip are no longer supported, so don't report bugs for those versions. You should update the program first and only report the bug if it is still present. diff --git a/Src/Help/HTML/dlg_trappedbugreport.htm b/Src/Help/HTML/dlg_trappedbugreport.htm index 429606e74..5fffa98ff 100644 --- a/Src/Help/HTML/dlg_trappedbugreport.htm +++ b/Src/Help/HTML/dlg_trappedbugreport.htm @@ -30,10 +30,7 @@

    Unexpected Error Dialogue Box

    - This dialogue box is displayed when CodeSnip encounters an - unexpected error. It invites you to report the error using the - CodeSnip online bug tracker which, at the time of writing, is - located on SourceForge.net.. + This dialogue box is displayed when CodeSnip encounters an unexpected error. It invites you to report the error using the online bug tracker which is located on GitHub. A GitHub account is required.

    The bug tracker is accessed by clicking the Go to the Bug Tracker @@ -68,7 +65,7 @@

    CodeSnip will have copied some information about the error onto the clipboard. Please paste this information into the - edit box where you described the error. + edit box where you described the error. Note that the pasted information is insufficient without additional information from you.

    diff --git a/Src/Help/HTML/dlg_userbugreport.htm b/Src/Help/HTML/dlg_userbugreport.htm index 091257f45..65f81563f 100644 --- a/Src/Help/HTML/dlg_userbugreport.htm +++ b/Src/Help/HTML/dlg_userbugreport.htm @@ -34,9 +34,7 @@

    choosing the Tools | Report Bug Online menu option.

    - Bugs are not reported directly from the dialogue box. They are reported - using the CodeSnip online bug tracker. At the time of writing the - bug tracker is located on SourceForge.net. + Bugs are not reported directly from the dialogue box. They are reported using CodeSnip's online bug tracker on GitHub (GitHub account required.

    The bug tracker is accessed by clicking the Go to the Bug Tracker diff --git a/Src/Help/HTML/menu_tools.htm b/Src/Help/HTML/menu_tools.htm index d028092d9..0eaae38a0 100644 --- a/Src/Help/HTML/menu_tools.htm +++ b/Src/Help/HTML/menu_tools.htm @@ -105,8 +105,7 @@

    Report Bug Online - Displays the Bug Report Dialogue - Box. This is used to access the CodeSnip bug tracker. + Displays the Bug Report Dialogue Box. This is used to access the CodeSnip online bug tracker. From f5b05389434ee96f4be326e2839e3ddf1484f794 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 01:32:15 +0000 Subject: [PATCH 022/714] Modified version info to flag current code as being in development Added TODO to remind to update version info before release. --- Src/CodeSnip.todo | 1 + Src/VCodeSnip.vi | 4 ++-- Src/VCodeSnipPortable.vi | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index 07ebddfa1..a35c44bea 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,2 +1,3 @@ {TODO -cFirstRun : Update config file versions: common to 7 and user to 16} {TODO -cPreRelease : Add correct CodeSnip version to Docs\Design\FileFormat\Config.html (currently flagged as 4.###)} +{TODO -cPreRelease : Remove -[**dev**] from product and file versions in .vi files before bumping release number} diff --git a/Src/VCodeSnip.vi b/Src/VCodeSnip.vi index 15a2e6a54..5db77d489 100644 --- a/Src/VCodeSnip.vi +++ b/Src/VCodeSnip.vi @@ -27,14 +27,14 @@ Character Set=1252 Comments=Released under the terms of the Mozilla Public License v2.0 (http://www.mozilla.org/MPL/2.0/) Company Name=DelphiDabbler File Description=CodeSnip Database Viewer -File Version=<#F1>.<#F2>.<#F3> build <#F4> +File Version=<#F1>.<#F2>.<#F3> build <#F4>-[**dev**] Internal Name= Legal Copyright=Copyright � P.D.Johnson, 2005-. Legal Trademark= Original File Name=CodeSnip.exe Private Build= Product Name=DelphiDabbler CodeSnip -Product Version=Release <#P1>.<#P2>.<#P3> +Product Version=Release <#P1>.<#P2>.<#P3>-[**dev**] Special Build= [Configuration Details] diff --git a/Src/VCodeSnipPortable.vi b/Src/VCodeSnipPortable.vi index 041a452d0..94a312f9f 100644 --- a/Src/VCodeSnipPortable.vi +++ b/Src/VCodeSnipPortable.vi @@ -27,14 +27,14 @@ Character Set=1252 Comments=Released under the terms of the Mozilla Public License v2.0 (http://www.mozilla.org/MPL/2.0/) Company Name=DelphiDabbler File Description=CodeSnip Database Viewer (Portable Edition) -File Version=<#F1>.<#F2>.<#F3> build <#F4> +File Version=<#F1>.<#F2>.<#F3> build <#F4>-[**dev**] Internal Name= Legal Copyright=Copyright � P.D.Johnson, 2005-. Legal Trademark= Original File Name=CodeSnip-p.exe Private Build= Product Name=DelphiDabbler CodeSnip -Product Version=Release <#P1>.<#P2>.<#P3> +Product Version=Release <#P1>.<#P2>.<#P3>-[**dev**] Special Build=Portable [Configuration Details] From 3368a87a2edc78016804b35514ee0ebf8246dd2a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 01:33:06 +0000 Subject: [PATCH 023/714] Bumped version number of app and per-user config file --- Src/FirstRun.UConfigFile.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index 60fec020f..a282077c8 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -77,7 +77,7 @@ TUserConfigFileUpdater = class(TConfigFileUpdater) strict private const /// Current user config file version. - FileVersion = 15; + FileVersion = 16; strict protected /// Returns current user config file version. class function GetFileVersion: Integer; override; @@ -126,7 +126,7 @@ TCommonConfigFileUpdater = class(TConfigFileUpdater) strict private const /// Current common config file version. - FileVersion = 6; + FileVersion = 7; strict protected /// Returns current common config file version. class function GetFileVersion: Integer; override; From b32493622cc59463b3a09a37d2a8cea43602d401 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 6 Feb 2020 05:53:02 +0000 Subject: [PATCH 024/714] Updated README Changed FAQ link to new GitHub FAQ project --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 607ea72c0..1d55db645 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ The following support is available for CodeSnip: * A comprehensive help file. * A [read-me file](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/ReadMe.txt) * that discusses installation, configuration, updating and known issues. * A dedicated set of [web pages](http://codesnip.delphidabbler.com/) -- *deprecated*. -* An [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppUsing) -- *deprecated* † ‡. +* An [FAQ](https://github.com/delphidabbler/codesnip-faq/blob/master/UsingCodeSnip.md) * An [RSS news feed](http://delphidabbler.com/feeds/site-news-feed?id=codesnip) -- *deprecated*. This can also be accessed via the program. * A [Blog](http://codesnip-app.blogspot.co.uk/). * A [privacy statement](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/Privacy.txt)* that provides information about any personal information stored by the program and what info is transmitted over the net. @@ -53,8 +53,6 @@ There's also plenty of info available on how to compile CodeSnip from source - s These features are **deprecated** -- they are dependent on the delphidabbler.com web server which is due to close down on 15th June 2020. - This feature may be moved to GitHub -- no promises! - ## Source Code Up to and including release 4.13.1 the project's source code was maintained in a Subversion repository on [SourceForge](https://sourceforge.net/p/codesnip/code/). The Subversion repo was converted to Git on 21 5 October 2015 and imported to GitHub. All releases from v3.0.0 are marked by tags in the form `version-x.x.x` where `x.x.x` is the version number. From 023b8ff39c41827b13272331cb2a50a31d3d5c52 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 10:32:27 +0000 Subject: [PATCH 025/714] Changed FAQ URL to address new FAQ on GitHub This was done to make Help | FAQs menu option work correctly after closure of DelphiDabbler.com --- Src/Web.UInfo.pas | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Src/Web.UInfo.pas b/Src/Web.UInfo.pas index 4b9c30e2d..f27895cdd 100644 --- a/Src/Web.UInfo.pas +++ b/Src/Web.UInfo.pas @@ -109,10 +109,9 @@ TWebInfo = class(TNoConstructObject) ///

    BugTrackerURL = GitHubURL + '/issues'; /// URL of CodeSnip's FAQ web page. - /// This URL will redirect to the FAQ location which may be on - /// an external site such as GitHub or SourceForge. - FAQsURL = WebsiteURL + '/url/codesnip-faq'; - + /// This is the CodeSnip FAQ project on GitHub. + FAQsURL = 'https://github.com/delphidabbler/codesnip-faq/' + + 'blob/master/README.md'; public /// Returns the name of the server that hosts web services used by /// CodeSnip when under testing. This server receives updated web services From 2b3c0b356a7f762cd282ff7796bd76d98d806ca4 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 10:46:09 +0000 Subject: [PATCH 026/714] Changed URL of PayPal donation page + modified Donate dialog. Changed URL of PayPal to access page directly instead of going through redirect on DelphiDabbler.com to safeguard against closure of DelphiDabbler,com Also reworded Donate dialogue box to specify what wording to expect on PayPal page. --- Src/Res/HTML/dlg-donate.html | 2 +- Src/Web.UInfo.pas | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Src/Res/HTML/dlg-donate.html b/Src/Res/HTML/dlg-donate.html index 6afc0f589..4bc8e77c3 100644 --- a/Src/Res/HTML/dlg-donate.html +++ b/Src/Res/HTML/dlg-donate.html @@ -52,7 +52,7 @@

    Make sure you are connected to the internet then click the Make Donation button. This will display the - DelphiDabbler PayPal™ donation page in your web browser. + a PayPal™ donation page in your web browser. This page will state the donation is to be made to aloysius.phogg@gmail.com and the purpose will be given as DelphiDabbler CodeSnip.

    diff --git a/Src/Web.UInfo.pas b/Src/Web.UInfo.pas index f27895cdd..e651d561e 100644 --- a/Src/Web.UInfo.pas +++ b/Src/Web.UInfo.pas @@ -104,7 +104,9 @@ TWebInfo = class(TNoConstructObject) ///

    URL used to make donations towards the CodeSnip project. /// /// This URL redirects to the correct page on PayPal. - DonateURL = WebsiteURL + '/url/donate-cs'; + DonateURL = 'https://www.paypal.com/donate/?' + + 'token=LYnh7_DXV-YqTmX3Bilr9rCPN89oANmBTZmRCdNHu_qFSk2jo_' + + 'WzTYTXCE165U9hXEmwq0&country.x=GB&locale.x=GB'; /// URL used to view and report CodeSnip bugs on GitHub. /// BugTrackerURL = GitHubURL + '/issues'; From 743a25a7d5ef99e2538af42987c1bd4594a04c58 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 15:08:41 +0000 Subject: [PATCH 027/714] Fixed FAQ links in relevant help topics --- Src/Help/HTML/faqs.htm | 2 +- Src/Help/HTML/menu_help.htm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Help/HTML/faqs.htm b/Src/Help/HTML/faqs.htm index 3b2815644..53fdccea6 100644 --- a/Src/Help/HTML/faqs.htm +++ b/Src/Help/HTML/faqs.htm @@ -34,7 +34,7 @@

    » Go to the FAQs diff --git a/Src/Help/HTML/menu_help.htm b/Src/Help/HTML/menu_help.htm index 1d1548d12..10feba130 100644 --- a/Src/Help/HTML/menu_help.htm +++ b/Src/Help/HTML/menu_help.htm @@ -102,7 +102,7 @@

    Displays the CodeSnip FAQs in the default web browser. From 9efab03a206889d59f4626dcfa9e6a8f5029ae20 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 15:14:20 +0000 Subject: [PATCH 028/714] Removed support for news RSS feed. Replaced with link to CodeSnip blog. Removed all web service code. Removed news dialogue box and associated frame. Removed new preferences pane from preferences dialogue box. Updated Help menu and associated actions to refer to Blog instead of News. Removed News button from Database Update dialogue box. Updated text of news link on welcome page. Removed various units made redundant by changes. --- Src/CodeSnip.dpr | 8 +- Src/CodeSnip.dproj | 14 - Src/FmDBUpdateDlg.dfm | 18 +- Src/FmDBUpdateDlg.pas | 14 +- Src/FmMain.dfm | 20 +- Src/FmMain.pas | 15 +- Src/FmNewsDlg.dfm | 117 ------- Src/FmNewsDlg.pas | 348 -------------------- Src/FrRSSNews.dfm | 17 - Src/FrRSSNews.pas | 155 --------- Src/Res/HTML/welcome-tplt.html | 2 +- Src/UDialogMgr.pas | 10 +- Src/URFC2822Date.pas | 352 -------------------- Src/URSS20.pas | 582 --------------------------------- Src/Web.UInfo.pas | 18 +- Src/Web.UXMLRequestor.pas | 147 --------- 16 files changed, 22 insertions(+), 1815 deletions(-) delete mode 100644 Src/FmNewsDlg.dfm delete mode 100644 Src/FmNewsDlg.pas delete mode 100644 Src/FrRSSNews.dfm delete mode 100644 Src/FrRSSNews.pas delete mode 100644 Src/URFC2822Date.pas delete mode 100644 Src/URSS20.pas delete mode 100644 Src/Web.UXMLRequestor.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 0c91accf1..c2e954bb9 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -123,7 +123,6 @@ uses FmHelpAware in 'FmHelpAware.pas' {HelpAwareForm}, FmMain in 'FmMain.pas' {MainForm}, FmNewHiliterNameDlg in 'FmNewHiliterNameDlg.pas' {NewHiliterNameDlg}, - FmNewsDlg in 'FmNewsDlg.pas' {NewsDlg}, FmPreferencesDlg in 'FmPreferencesDlg.pas' {PreferencesDlg}, FmPreviewDlg in 'FmPreviewDlg.pas' {PreviewDlg}, FmPrintDlg in 'FmPrintDlg.pas' {PrintDlg}, @@ -158,11 +157,9 @@ uses FrHTMLPreview in 'FrHTMLPreview.pas' {HTMLPreviewFrame: TFrame}, FrHTMLTpltDlg in 'FrHTMLTpltDlg.pas' {HTMLTpltDlgFrame: TFrame}, FrMemoPreview in 'FrMemoPreview.pas' {MemoPreviewFrame: TFrame}, - FrNewsPrefs in 'FrNewsPrefs.pas' {NewsPrefsFrame: TFrame}, FrOverview in 'FrOverview.pas' {OverviewFrame: TFrame}, FrPrefsBase in 'FrPrefsBase.pas' {PrefsBaseFrame: TFrame}, FrPrintingPrefs in 'FrPrintingPrefs.pas' {PrintingPrefsFrame: TFrame}, - FrRSSNews in 'FrRSSNews.pas' {RSSNewsFrame: TFrame}, FrRTFPreview in 'FrRTFPreview.pas' {RTFPreviewFrame: TFrame}, FrRTFShowCase in 'FrRTFShowCase.pas' {RTFShowCaseFrame: TFrame}, FrCheckedTV in 'FrCheckedTV.pas' {CheckedTVFrame: TFrame}, @@ -316,8 +313,6 @@ uses UREMLDataIO in 'UREMLDataIO.pas', UReservedCategories in 'UReservedCategories.pas', UResourceUtils in 'UResourceUtils.pas', - URFC2822Date in 'URFC2822Date.pas', - URSS20 in 'URSS20.pas', URTFBuilder in 'URTFBuilder.pas', URTFCategoryDoc in 'URTFCategoryDoc.pas', URTFSnippetDoc in 'URTFSnippetDoc.pas', @@ -405,8 +400,7 @@ uses Web.UInfo in 'Web.UInfo.pas', Web.UProgramUpdateMgr in 'Web.UProgramUpdateMgr.pas', Web.UStdWebService in 'Web.UStdWebService.pas', - Web.USWAGRESTMgr in 'Web.USWAGRESTMgr.pas', - Web.UXMLRequestor in 'Web.UXMLRequestor.pas'; + Web.USWAGRESTMgr in 'Web.USWAGRESTMgr.pas'; // Include resources {$Resource ExternalObj.tlb} // Type library file diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 22f085a4c..412315808 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -201,9 +201,6 @@
    NewHiliterNameDlg
    - -
    NewsDlg
    -
    PreferencesDlg
    @@ -323,10 +320,6 @@
    MemoPreviewFrame
    TFrame - -
    NewsPrefsFrame
    - TFrame -
    OverviewFrame
    TFrame @@ -339,10 +332,6 @@
    PrintingPrefsFrame
    TFrame
    - -
    RSSNewsFrame
    - TFrame -
    RTFPreviewFrame
    TFrame @@ -529,8 +518,6 @@ - - @@ -619,7 +606,6 @@ - Base diff --git a/Src/FmDBUpdateDlg.dfm b/Src/FmDBUpdateDlg.dfm index 842e489a7..27ee4208e 100644 --- a/Src/FmDBUpdateDlg.dfm +++ b/Src/FmDBUpdateDlg.dfm @@ -6,7 +6,7 @@ inherited DBUpdateDlg: TDBUpdateDlg ClientHeight = 344 OnCloseQuery = FormCloseQuery ExplicitWidth = 474 - ExplicitHeight = 372 + ExplicitHeight = 373 PixelsPerInch = 96 TextHeight = 13 inherited pnlBody: TPanel @@ -75,10 +75,7 @@ inherited DBUpdateDlg: TDBUpdateDlg end end inherited btnHelp: TButton - TabOrder = 4 - end - inherited btnClose: TButton - TabOrder = 2 + TabOrder = 3 end object btnCancel: TButton Left = 120 @@ -87,16 +84,7 @@ inherited DBUpdateDlg: TDBUpdateDlg Height = 25 Cancel = True Caption = 'Cancel Update' - TabOrder = 3 + TabOrder = 2 OnClick = btnCancelClick end - object btnNews: TButton - Left = 8 - Top = 304 - Width = 91 - Height = 25 - Caption = 'Latest &News...' - TabOrder = 1 - OnClick = btnNewsClick - end end diff --git a/Src/FmDBUpdateDlg.pas b/Src/FmDBUpdateDlg.pas index 7fdc67c65..90f899c47 100644 --- a/Src/FmDBUpdateDlg.pas +++ b/Src/FmDBUpdateDlg.pas @@ -37,7 +37,6 @@ TDBUpdateDlg = class(TGenericViewDlg, INoPublicConstruct) lblError: TLabel; edProgress: TMemo; lblHeadline: TLabel; - btnNews: TButton; /// Handles click on cancel button and cancels the update. /// procedure btnCancelClick(Sender: TObject); @@ -52,9 +51,6 @@ TDBUpdateDlg = class(TGenericViewDlg, INoPublicConstruct) procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); /// Tidies up on form destruction. procedure FormDestroy(Sender: TObject); - /// Handles click on News button by displaying News dialogue box. - /// - procedure btnNewsClick(Sender: TObject); strict private type /// Enumeration that specifies display style of 'headline' text @@ -162,7 +158,7 @@ implementation // Delphi SysUtils, // Project - FmNewsDlg, UAppInfo, UColours, UConsts, UCtrlArranger, UStrUtils, UUtils; + UAppInfo, UColours, UConsts, UCtrlArranger, UStrUtils, UUtils; {$R *.dfm} @@ -201,9 +197,6 @@ procedure TDBUpdateDlg.ArrangeForm; // Arrange additonal cancel button btnCancel.Left := btnClose.Left + btnClose.Width - btnCancel.Width; btnCancel.Top := btnClose.Top; - // Arrange "latest news" button - btnNews.Left := 8; - btnNews.Top := btnClose.Top; // Align error label lblError.Left := (pnlBody.Width - lblError.Width) div 2; end; @@ -274,11 +267,6 @@ procedure TDBUpdateDlg.btnDoUpdateClick(Sender: TObject); end; end; -procedure TDBUpdateDlg.btnNewsClick(Sender: TObject); -begin - TNewsDlg.Execute(Self); -end; - procedure TDBUpdateDlg.DownloadProgressHandler(Sender: TObject; const BytesReceived, BytesExpected: Int64; var Cancel: Boolean); begin diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 9b296be6a..f718e7d11 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -803,15 +803,6 @@ inherited MainForm: TMainForm OnExecute = actDeleteCategoryExecute OnUpdate = actDeleteCategoryUpdate end - object actNews: TAction - Category = 'Help' - Caption = 'CodeSnip News...' - Hint = - 'CodeSnip news|Display news about CodeSnip and the online databas' + - 'e' - ImageIndex = 36 - OnExecute = actNewsExecute - end object actNewDetailsTab: TAction Category = 'View' Caption = 'New Tab' @@ -927,6 +918,13 @@ inherited MainForm: TMainForm 'ser database from the online SWAG database' OnExecute = actSWAGImportExecute end + object actBlog: TBrowseURL + Category = 'Help' + Caption = 'CodeSnip News && Blog...' + Hint = + 'Display CodeSnip news blog|Display the CodeSnip News Blog in the' + + ' default web browser' + end end object mnuMain: TMainMenu Images = ilMain @@ -1230,8 +1228,8 @@ inherited MainForm: TMainForm object miSpacer5: TMenuItem Caption = '-' end - object miNews: TMenuItem - Action = actNews + object miBlog: TMenuItem + Action = actBlog end object miDonate: TMenuItem Action = actDonate diff --git a/Src/FmMain.pas b/Src/FmMain.pas index d3a94d351..ec0afaf28 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -75,7 +75,6 @@ TMainForm = class(THelpAwareForm) actMoveUserDatabase: TAction; actNextTab: TAction; actNewDetailsTab: TAction; - actNews: TAction; actPreferences: TAction; actPreviousTab: TAction; actPrint: TAction; @@ -154,7 +153,6 @@ TMainForm = class(THelpAwareForm) miLoadSelection: TMenuItem; miMoveUserDatabase: TMenuItem; miNewDetailsTab: TMenuItem; - miNews: TMenuItem; miPreferences: TMenuItem; miPrint: TMenuItem; miPrivacy: TMenuItem; @@ -235,6 +233,8 @@ TMainForm = class(THelpAwareForm) tbSpacer8: TToolButton; tbTestCompile: TToolButton; tbUpdateDbase: TToolButton; + actBlog: TBrowseURL; + miBlog: TMenuItem; /// Displays About Box. procedure actAboutExecute(Sender: TObject); /// Gets a new category from user and adds to database. @@ -355,9 +355,6 @@ TMainForm = class(THelpAwareForm) procedure actMoveUserDatabaseExecute(Sender: TObject); /// Creates a new empty tab in details pane. procedure actNewDetailsTabExecute(Sender: TObject); - /// Displays a dialogue box containing latest news from CodeSnip's - /// RSS feed. - procedure actNewsExecute(Sender: TObject); /// Displays next tab in either overview or details pane depending /// which pane is active. procedure actNextTabExecute(Sender: TObject); @@ -923,11 +920,6 @@ procedure TMainForm.actNewDetailsTabExecute(Sender: TObject); fMainDisplayMgr.CreateNewDetailsTab; end; -procedure TMainForm.actNewsExecute(Sender: TObject); -begin - fDialogMgr.ShowNewsDlg; -end; - procedure TMainForm.actNextTabExecute(Sender: TObject); begin fMainDisplayMgr.SelectNextActiveTab; @@ -1386,6 +1378,7 @@ procedure TMainForm.InitForm; actHomePage.URL := TWebInfo.ProgramHomeURL; actWebSite.URL := TWebInfo.DelphiDabblerHomeURL; actFAQs.URL := TWebInfo.FAQsURL; + actBlog.URL := TWebInfo.BlogURL; // Tree control actions need shortcuts adding dynamically, and state stored // in Tag property actExpandNode.ShortCut := ShortCut(VK_ADD, [ssCtrl]); @@ -1430,7 +1423,7 @@ procedure TMainForm.InitForm; ); SetDonateAction(actDonate); SetNewSnippetAction(actAddSnippet); - SetNewsAction(actNews); + SetNewsAction(actBlog); SetCheckForUpdatesAction(actProgramUpdates); SetAboutBoxAction(actAbout); SetShowPrefsPageAction( diff --git a/Src/FmNewsDlg.dfm b/Src/FmNewsDlg.dfm deleted file mode 100644 index ee0f377de..000000000 --- a/Src/FmNewsDlg.dfm +++ /dev/null @@ -1,117 +0,0 @@ -inherited NewsDlg: TNewsDlg - Left = 1267 - Top = 793 - Caption = 'CodeSnip News' - ClientHeight = 387 - Position = poDesigned - ExplicitWidth = 474 - ExplicitHeight = 415 - PixelsPerInch = 96 - TextHeight = 13 - inherited pnlBody: TPanel - Width = 441 - Height = 353 - ExplicitWidth = 441 - ExplicitHeight = 353 - object pnlTop: TPanel - Left = 0 - Top = 0 - Width = 441 - Height = 41 - Align = alTop - BevelOuter = bvNone - TabOrder = 0 - DesignSize = ( - 441 - 41) - object lblDays: TLabel - Left = 0 - Top = 0 - Width = 34 - Height = 13 - Anchors = [akLeft] - Caption = 'lblDays' - end - object btnConfig: TButton - Left = 366 - Top = 10 - Width = 75 - Height = 25 - Action = actConfig - Anchors = [akRight] - ParentShowHint = False - ShowHint = True - TabOrder = 0 - end - end - inline frmHTML: TRSSNewsFrame - Left = 0 - Top = 41 - Width = 441 - Height = 312 - Align = alClient - TabOrder = 1 - TabStop = True - ExplicitTop = 41 - ExplicitWidth = 441 - ExplicitHeight = 312 - inherited pnlBrowser: TPanel - Width = 441 - Height = 312 - ExplicitWidth = 441 - ExplicitHeight = 312 - inherited wbBrowser: TWebBrowser - Width = 439 - Height = 310 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 439 - ExplicitHeight = 310 - ControlData = { - 4C0000005F2D00000A2000000000000000000000000000000000000000000000 - 000000004C000000000000000000000001000000E0D057007335CF11AE690800 - 2B2E126208000000000000004C0000000114020000000000C000000000000046 - 8000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000100000000000000000000000000000000000000} - end - end - end - end - inherited btnHelp: TButton - TabOrder = 3 - end - inherited btnClose: TButton - TabOrder = 2 - end - object btnRSSFeed: TBitBtn - Left = 8 - Top = 304 - Width = 89 - Height = 25 - Action = actRSSFeed - Caption = '&RSS Feed' - DoubleBuffered = True - ParentDoubleBuffered = False - ParentShowHint = False - ShowHint = True - TabOrder = 1 - end - object ilActions: TImageList - Left = 224 - Top = 192 - end - object alMain: TActionList - Images = ilActions - Left = 168 - Top = 192 - object actRSSFeed: TAction - Caption = '&RSS Feed' - ImageIndex = 45 - OnExecute = actRSSFeedExecute - end - object actConfig: TAction - Caption = '&Change...' - OnExecute = actConfigExecute - end - end -end diff --git a/Src/FmNewsDlg.pas b/Src/FmNewsDlg.pas deleted file mode 100644 index 378f2fb0e..000000000 --- a/Src/FmNewsDlg.pas +++ /dev/null @@ -1,348 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a dialogue box that displays news items from CodeSnip's RSS news - * feed. -} - - -unit FmNewsDlg; - - -interface - - -uses - // Delphi - Buttons, StdCtrls, Forms, Controls, ExtCtrls, Classes, - // Project - FmGenericViewDlg, FrBrowserBase, FrRSSNews, UBaseObjects, UExceptions, URSS20, - UXMLDocumentEx, ActnList, ImgList; - - -type - - { - TNewsDlg: - Dialog box that displays news items from CodeSnip's RSS news feed. - } - TNewsDlg = class(TGenericViewDlg, INoPublicConstruct) - actConfig: TAction; - actRSSFeed: TAction; - alMain: TActionList; - btnConfig: TButton; - btnRSSFeed: TBitBtn; - frmHTML: TRSSNewsFrame; - ilActions: TImageList; - lblDays: TLabel; - pnlTop: TPanel; - /// Configure action handler. Displays news prefs page of - /// Preferences dialog box to enable number of days to display in news - procedure actConfigExecute(Sender: TObject); - /// Action handler that displays RSS feed in default web browser. - /// - procedure actRSSFeedExecute(Sender: TObject); - /// Form creation handler. Loads image list from resources. - /// - procedure FormCreate(Sender: TObject); - strict private - /// Loads news from RSS feed, converts to HTML and displays in - /// browser control. - procedure LoadNews; - /// Displays brief message Msg as an HTML paragraph in browser - /// control. - procedure DisplayMessage(const Msg: string); - /// Displays a message in browser that informs that content is - /// loading. - procedure DisplayLoadingMsg; - /// Renders RSS news feed in HTML and displays in browser control. - /// - procedure DisplayNews(const RSS: TRSS20); - /// Displays a message in browser control informing that there are - /// no news items in RSS feed. - procedure DisplayNoNewsMsg; - /// Renders HTML describing exception E and displays it in browser - /// control. - procedure DisplayErrorMsg(E: ECodeSnip); - /// Gets and returns interface to XML document containing details - /// of RSS news feed from web. - function GetRSSDocument: IXMLDocumentEx; - /// Gets maximum number of days of news to be displayed. - function GetMaxNewsAge: Integer; - /// Updates label with current maximum news age. - procedure UpdateNewsAgeLbl; - strict protected - /// Arranges controls on form. - /// Called from ancestor class. - procedure ArrangeForm; override; - /// Initialises HTML frame. - /// Called from ancestor class. - procedure ConfigForm; override; - /// Initialises form's controls. - /// Called from ancestor class. - procedure InitForm; override; - /// Loads news from RSS feed after form is displayed. - /// Called from ancestor class. - procedure AfterShowForm; override; - public - /// Displays dialog box. - /// TComponent [in] Control that owns dialog box. - /// - class procedure Execute(AOwner: TComponent); - end; - - -implementation - - -uses - // Delphi - SysUtils, ExtActns, Windows, Graphics, - // Project - FmPreferencesDlg, FrNewsPrefs, UClassHelpers, UCtrlArranger, UHTMLUtils, - UIStringList, UPreferences, UStrUtils, Web.UInfo, Web.UXMLRequestor; - -{$R *.dfm} - - -{ TNewsDlg } - -procedure TNewsDlg.actConfigExecute(Sender: TObject); -var - CurrentNewsAge: Integer; -begin - CurrentNewsAge := GetMaxNewsAge; - if TPreferencesDlg.Execute(Self, [TNewsPrefsFrame]) then - begin - if CurrentNewsAge <> GetMaxNewsAge then - LoadNews; - end; -end; - -procedure TNewsDlg.actRSSFeedExecute(Sender: TObject); -var - BrowseAction: TBrowseURL; // action that displays RSS feed URL in browser -begin - BrowseAction := TBrowseURL.Create(nil); - try - BrowseAction.URL := TWebInfo.NewsFeedURL(GetMaxNewsAge); - BrowseAction.Execute; - finally - BrowseAction.Free; - end; -end; - -procedure TNewsDlg.AfterShowForm; -begin - LoadNews; -end; - -procedure TNewsDlg.ArrangeForm; -begin - inherited; - TCtrlArranger.AlignVCentres(2, [lblDays, btnConfig]); - lblDays.Left := 0; - pnlTop.ClientHeight := TCtrlArranger.TotalControlHeight(pnlTop) + 8; - btnRSSFeed.Top := btnClose.Top; -end; - -procedure TNewsDlg.ConfigForm; -begin - inherited; - frmHTML.Initialise; -end; - -procedure TNewsDlg.DisplayErrorMsg(E: ECodeSnip); -resourcestring - sErrorHeading = 'Error loading news:'; // fixed heading text -var - ErrHeadingAttrs: IHTMLAttributes; // HTML attributes of heading - ErrMessageAttrs: IHTMLAttributes; // HTML attributes of error message -begin - ErrHeadingAttrs := THTMLAttributes.Create('class', 'error-heading'); - ErrMessageAttrs := THTMLAttributes.Create('class', 'error-message'); - frmHTML.DisplayContent( - THTML.CompoundTag('p', ErrHeadingAttrs, THTML.Entities(sErrorHeading)) + - THTML.CompoundTag('p', ErrMessageAttrs, THTML.Entities(E.Message)) - ); -end; - -procedure TNewsDlg.DisplayLoadingMsg; -resourcestring - sLoadingMsg = 'Loading...'; // message text -begin - DisplayMessage(sLoadingMsg); -end; - -procedure TNewsDlg.DisplayMessage(const Msg: string); -var - HTMLAttrs: IHTMLAttributes; // HTML attributes -begin - HTMLAttrs := THTMLAttributes.Create('class', 'message'); - frmHTML.DisplayContent( - THTML.CompoundTag('p', HTMLAttrs, THTML.Entities(Msg)) - ); -end; - -procedure TNewsDlg.DisplayNews(const RSS: TRSS20); - - /// Renders the given RSS news item title as HTML. Rendered as a link if item - /// specifies a URL. - function TitleHTML(const Item: TRSS20Item): string; - resourcestring - sNoTitle = 'Untitled'; // text used when no title - var - TitleHTML: string; // title text - URL: string; // item's URL used for link - begin - TitleHTML := THTML.Entities(StrTrim(Item.Title)); - if TitleHTML = '' then - TitleHTML := THTML.Entities(sNoTitle); - URL := StrTrim(Item.Link); - if URL = '' then - Result := TitleHTML - else - Result := THTML.CompoundTag( - 'a', - THTMLAttributes.Create([ - THTMLAttribute.Create('href', URL), - THTMLAttribute.Create('class', 'external-link') - ]), - TitleHTML - ); - Result := THTML.CompoundTag('strong', Result); - end; - - /// Renders given RSS new item's description as HTML. - function DescriptionHTML(const Item: TRSS20Item): string; - resourcestring - sNoDescription = 'No description.'; // text used when no description - var - Description: string; // description text - begin - Description := StrTrim(Item.Description); - if Description = '' then - Description := sNoDescription; - Result := THTML.Entities(Description); - end; - -var - SB: TStringBuilder; // object used to construct HTML - Item: TRSS20Item; // references each RSS item in feed -begin - SB := TStringBuilder.Create; - try - SB.AppendLine(THTML.OpeningTag('dl')); - for Item in RSS do - begin - SB.AppendLine(THTML.OpeningTag('dt')); - SB.AppendLine(THTML.CompoundTag('div', TitleHTML(Item))); - if Item.PubDateAsText <> '' then - SB.AppendLine( - THTML.CompoundTag('div', THTML.Entities(DateTimeToStr(Item.PubDate))) - ); - SB.AppendLine(THTML.ClosingTag('dt')); - SB.AppendLine(THTML.CompoundTag('dd', DescriptionHTML(Item))); - end; - SB.AppendLine(THTML.ClosingTag('dl')); - frmHTML.DisplayContent(SB.ToString); - finally - SB.Free; - end; -end; - -procedure TNewsDlg.DisplayNoNewsMsg; -resourcestring - sNoNews = 'There are no news items to display.'; // message text -begin - DisplayMessage(sNoNews); -end; - -class procedure TNewsDlg.Execute(AOwner: TComponent); -begin - with InternalCreate(AOwner) do - try - ShowModal; - finally - Free; - end; -end; - -procedure TNewsDlg.FormCreate(Sender: TObject); -begin - inherited; - ilActions.LoadFromResource(RT_RCDATA, 'ACTIONIMAGES', 16, clFuchsia); - RefreshActions; // ensure control glyphs are updated with loaded images -end; - -function TNewsDlg.GetMaxNewsAge: Integer; -begin - Result := Preferences.NewsAge; -end; - -function TNewsDlg.GetRSSDocument: IXMLDocumentEx; -var - Requestor: TXMLRequestor; // object that makes XML request -begin - Requestor := TXMLRequestor.Create; - try - Result := Requestor.GetDocument(TWebInfo.NewsFeedURL(GetMaxNewsAge)); - finally - Requestor.Free; - end; -end; - -procedure TNewsDlg.InitForm; -begin - inherited; - lblDays.Caption := ''; -end; - -procedure TNewsDlg.LoadNews; -var - RSSFeed: TRSS20; // object used to interpret RSS feed XML -begin - Screen.Cursor := crHourGlass; - try - DisplayLoadingMsg; - try - RSSFeed := TRSS20.Create; - try - RSSFeed.Load(GetRSSDocument); - if RSSFeed.Count > 0 then - DisplayNews(RSSFeed) - else - DisplayNoNewsMsg; - UpdateNewsAgeLbl; - finally - RSSFeed.Free; - end; - except - on E: ECodeSnip do - begin - lblDays.Caption := ''; - DisplayErrorMsg(E); - end; - end; - finally - Screen.Cursor := crDefault; - end; -end; - -procedure TNewsDlg.UpdateNewsAgeLbl; -resourcestring - // message displayed in label at - sNewsDays = 'CodeSnip news from the last %d days.'; -begin - lblDays.Caption := Format(sNewsDays, [GetMaxNewsAge]); -end; - -end. - diff --git a/Src/FrRSSNews.dfm b/Src/FrRSSNews.dfm deleted file mode 100644 index 15a3370db..000000000 --- a/Src/FrRSSNews.dfm +++ /dev/null @@ -1,17 +0,0 @@ -inherited RSSNewsFrame: TRSSNewsFrame - inherited pnlBrowser: TPanel - BevelOuter = bvLowered - inherited wbBrowser: TWebBrowser - Left = 1 - Top = 1 - Width = 314 - Height = 234 - ControlData = { - 4C000000742000002F1800000000000000000000000000000000000000000000 - 000000004C000000000000000000000001000000E0D057007335CF11AE690800 - 2B2E126208000000000000004C0000000114020000000000C000000000000046 - 8000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000100000000000000000000000000000000000000} - end - end -end diff --git a/Src/FrRSSNews.pas b/Src/FrRSSNews.pas deleted file mode 100644 index 66ea17222..000000000 --- a/Src/FrRSSNews.pas +++ /dev/null @@ -1,155 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2010-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a frame containing a web browser control that is used to display - * the program's RSS news feed. -} - - -unit FrRSSNews; - - -interface - - -uses - // Delphi - OleCtrls, SHDocVw, Classes, Controls, ExtCtrls, - // Project - FrBrowserBase, UCSSBuilder; - -type - - { - TRSSNewsFrame: - Frame containing a web browser control that is used to display the program's - RSS news feed. - } - TRSSNewsFrame = class(TBrowserBaseFrame) - strict protected - procedure BuildCSS(const CSSBuilder: TCSSBuilder); override; - {Generates CSS classes specific to this frame. This CSS is added to that - provided by parent class. - @param CSSBuilder [in] Object used to build the CSS code. - } - public - constructor Create(AOwner: TComponent); override; - {Object constructor. Sets up object and configures web browser control. - @param AOwner [in] Component that owns frame. - } - procedure Initialise; - {Initialises browser control. Loads container HTML document. - } - procedure DisplayContent(const HTML: string); - {Displays HTML content as body of document currently loaded in the browser - control. - @param HTML [in] HTML ode to be displayed. - } - end; - - -implementation - - -uses - // Delphi - Graphics, - // Project - Browser.UUIMgr, UColours, UCSSUtils, UFontHelper, UNulDropTarget; - -{$R *.dfm} - - -{ TRSSNewsFrame } - -procedure TRSSNewsFrame.BuildCSS(const CSSBuilder: TCSSBuilder); - {Generates CSS classes specific to this frame. This CSS is added to that - provided by parent class. - @param CSSBuilder [in] Object used to build the CSS code. - } -var - ContentFont: TFont; // content font used to set CSS properties -begin - inherited; - ContentFont := TFont.Create; - try - TFontHelper.SetContentFont(ContentFont); - with CSSBuilder.AddSelector('body') do - begin - AddProperty(TCSS.BackgroundColorProp(clWindow)); - AddProperty(TCSS.FontProps(ContentFont)); - AddProperty(TCSS.MarginProp(3)); - end; - with CSSBuilder.AddSelector('p') do - begin - AddProperty(TCSS.MarginProp(4, 0, 0, 0)); - end; - with CSSBuilder.AddSelector('dt') do - begin - AddProperty(TCSS.MarginProp(0, 0, 4, 0)); - AddProperty(TCSS.PaddingProp(4)); - AddProperty(TCSS.BackgroundColorProp(clBtnFace)); - AddProperty(TCSS.ColorProp(clBtnText)); - end; - with CSSBuilder.AddSelector('dd') do - begin - AddProperty(TCSS.MarginProp(0, 0, 8, 20)); - end; - with CSSBuilder.AddSelector('.message') do - begin - AddProperty(TCSS.TextAlignProp(ctaCenter)); - AddProperty(TCSS.MarginProp(cssTop, 30)); - AddProperty(TCSS.FontWeightProp(cfwBold)); - end; - with CSSBuilder.AddSelector('.error-heading') do - begin - AddProperty(TCSS.ColorProp(clWarningText)); - AddProperty(TCSS.FontWeightProp(cfwBold)); - end; - with CSSBuilder.AddSelector('.error-message') do - begin - AddProperty(TCSS.MarginProp(cssLeft, 20)); - end; - finally - ContentFont.Free; - end; -end; - -constructor TRSSNewsFrame.Create(AOwner: TComponent); - {Object constructor. Sets up object and configures web browser control. - @param AOwner [in] Component that owns frame. - } -begin - inherited; - // Set up browser control - WBController.UIMgr.ScrollbarStyle := sbsNormal; // normal scroll bars - WBController.UIMgr.Show3dBorder := False; // we'll handle border - WBController.UIMgr.AllowTextSelection := False; // can't select text - WBController.UIMgr.DropTarget := // inhibit drag drop in dialog - TNulDropTarget.Create; -end; - -procedure TRSSNewsFrame.DisplayContent(const HTML: string); - {Displays HTML content as body of document currently loaded in the browser - control. - @param HTML [in] HTML ode to be displayed. - } -begin - WBController.IOMgr.ReplaceExistingBodyHTML(HTML); -end; - -procedure TRSSNewsFrame.Initialise; - {Initialises browser control. Loads container HTML document. - } -begin - WBController.IOMgr.NavigateToResource(HInstance, 'dlg-rssnews.html'); -end; - -end. diff --git a/Src/Res/HTML/welcome-tplt.html b/Src/Res/HTML/welcome-tplt.html index f4418f8d0..dc700f10b 100644 --- a/Src/Res/HTML/welcome-tplt.html +++ b/Src/Res/HTML/welcome-tplt.html @@ -240,7 +240,7 @@

    href="#" class="command-link" onclick="showNews();return false;" - >News + >News Blog | function ExecProxyServerDlg: Boolean; - /// Displays the News dialogue box. - procedure ShowNewsDlg; - /// Displays the Test Compile dialogue box. /// TCompileMgr [in] Object used to manage test /// compilation and to retain results. @@ -164,7 +161,7 @@ implementation Forms, // Project FmAboutDlg, FmDBUpdateDlg, FmDependenciesDlg, FmDonateDlg, FmFindCompilerDlg, - FmFindTextDlg, FmFindXRefsDlg, FmNewsDlg, FmPreferencesDlg, FmPrintDlg, + FmFindTextDlg, FmFindXRefsDlg, FmPreferencesDlg, FmPrintDlg, FmProgramUpdatesDlg, FmProxyServerDlg, FmSelectionSearchDlg, FmSWAGImportDlg, FmTestCompileDlg, FmUserBugReportDlg, UTestUnitDlgMgr; @@ -245,11 +242,6 @@ procedure TDialogMgr.ShowDonateDlg; TDonateDlg.Execute(Owner); end; -procedure TDialogMgr.ShowNewsDlg; -begin - TNewsDlg.Execute(Owner); -end; - procedure TDialogMgr.ShowProgramUpdatesDlg; begin TProgramUpdatesDlg.Execute(Owner); diff --git a/Src/URFC2822Date.pas b/Src/URFC2822Date.pas deleted file mode 100644 index cbf2e95dd..000000000 --- a/Src/URFC2822Date.pas +++ /dev/null @@ -1,352 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Provides code for handling RFC2822 format dates. This version provides one - * function to convert a RFC2822 date into a TDateTime. -} - - -unit URFC2822Date; - - -interface - - -uses - // Project - UExceptions; - - -function RFC2822DateToGMTDateTime(DateStr: string): TDateTime; - {Converts a date in RFC2822 format into the corresponding TDateTime value in - GMT (UTC). - @param DateStr [in] RFC2822 date string to be converted. - @return Converted date in GMT (UTC). - @except ERFC2822Date raised if DateStr is malformed. - } - - -type - { - ERFC2822Date: - Type of exception raised when a RFC2822 date passed to - RFC2822DateToGMTDateTime is malformed. - } - ERFC2822Date = class(ECodeSnip); - - -implementation - - -uses - // Delphi - SysUtils, DateUtils, - // Project - UIStringList, UStructs, UStrUtils; - - -function StrToWordInRange(const S: string; const Range: TRange; - const ErrMsg: string): Word; - {Converts a string representation of a number into a word value, checking it - is in an expected range. - @param S [in] String value to convert. - @param Range [in] Range of valid values for the number. - @param ErrMasg [in] Error message to use for any exception. - @return Required number. - @except ERFC2822Date raised if S does not contain a valid number or number - is not in required range. - } -var - Value: Integer; // value of S as integer -begin - if not TryStrToInt(S, Value) or not Range.Contains(Value) then - raise ERFC2822Date.CreateFmt(ErrMsg, [S]); - Result := Value; -end; - -procedure ValidateDOW(const ADOW: string); - {Validates text storing a day of the week as a valid day name. Returns if day - of week is valid or raises exception if not. - @param ADOW [in] Text to be checked. - @except ERFC2822Date raised if ADOW is not a valid day name. - } -resourcestring - sErrMsg = 'Invalid day of week: "%s"'; // error message -const - // Map of day numbers to day names - cDOWs: array[1..7] of string = ( - 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun' - ); -var - DOW: string; // reference each day of week -begin - for DOW in cDOWs do - if DOW = ADOW then - Exit; - raise ERFC2822Date.CreateFmt(sErrMsg, [ADOW]); -end; - -function GetDay(const ADayStr: string): Word; - {Converts day of month from string to Word value, checking value is valid for - a day of month. - @param ADayStr [in] String containing day number. - @return Required day number. - @except ERFC2822Date raised if ADayStr is not a valid number or is out of - range for a day of month. - } -resourcestring - sErrMsg = 'Invalid day of month: "%s"'; // error message -begin - Result := StrToWordInRange(ADayStr, TRange.Create(1, 31), sErrMsg); -end; - -function GetMonth(const AMonthName: string): Word; - {Converts month named in required RFC2822 format into a month number. - @param AMonthName [in] String containing month name in RFC2822 format. - @return Required month number. - @except ERFC2822Date raised if AMonthName is not a valid RFC2822 month name. - } -resourcestring - sErrMsg = 'Invalid month: "%s"'; // error message -const - // Map of month number to month names - cMonths: array[1..12] of string = ( - 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', - 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' - ); -var - I: 1..12; // loops through all elements of months map -begin - for I := 1 to 12 do - begin - if cMonths[I] = AMonthName then - Exit(I); - end; - raise ERFC2822Date.CreateFmt(sErrMsg, [AMonthName]); -end; - -function GetYear(const AYearStr: string): Word; - {Converts year from string to Word value, adjusting 2 and 3 digit years per - RFC2822 specifications. - @param AYearStr [in] String containing year. - @return Required and adjusted, year number. - @except ERFC2822Date raised if AYearStr is not a valid number or is out of - range. - } -resourcestring - sErrMsg = 'Invalid year: "%s"'; // error message -var - Value: Integer; // value of AYearStr as integer -begin - // Check for valid Word value - if not TryStrToInt(AYearStr, Value) - or (Value < 0) - or (Value > High(Word)) then - raise ERFC2822Date.CreateFmt(sErrMsg, [AYearStr]); - // Adjust for 2 and 3 digit years - if TRange.Create(0, 49).Contains(Value) then - Inc(Value, 2000) - else if TRange.Create(50, 999).Contains(Value) then - Inc(Value, 1900); - Result := Value; -end; - -function GetHour(const AHourStr: string): Word; - {Converts hour from string to Word value, checking value is valid for an hour - in the 24 hour clock. - @param AHourStr [in] String containing hour. - @return Required hour number. - @except ERFC2822Date raised if AHourStr is not a valid number or is out of - range for an hour. - } -resourcestring - sErrMsg = 'Invalid hour: "%s"'; // error message -begin - Result := StrToWordInRange(AHourStr, TRange.Create(0, 23), sErrMsg); -end; - -function GetMinute(const AMinStr: string): Word; - {Converts minute from string to Word value, checking value is valid for a - minute. - @param AMinStr [in] String containing minute. - @return Required minute number. - @except ERFC2822Date raised if AMinStr is not a valid number or is out of - range for a minute. - } -resourcestring - sErrMsg = 'Invalid minute: "%s"'; // error message -begin - Result := StrToWordInRange(AMinStr, TRange.Create(0, 59), sErrMsg); -end; - -function GetSecond(const ASecStr: string): Word; - {Converts second from string to Word value, checking value is valid for a - second. - @param ASecStr [in] String containing second. - @return Required second number. - @except ERFC2822Date raised if ASecStr is not a valid number or is out of - range for a second. - } -resourcestring - sErrMsg = 'Invalid second: "%s"'; // error message -begin - Result := StrToWordInRange(ASecStr, TRange.Create(0, 59), sErrMsg) -end; - -function GetTime(const TimeStr: string): TTime; - {Converts a time string in format HH:MM:SS or HH:MM into a TTime value. - @param TimeStr [in] Time string to converted. - @return Converted value. - @except ERFC2822Date raised if the time string is invalid. - } -resourcestring - sErrMsg = 'Invalid time: "%s"'; // error message -var - Parts: IStringList; // constituent parts of time: hr, min sec - Hour, Min, Sec: Word; // numeric values of hr, min, sec -const - // Indices of time components in Parts - HourPart = 0; // hour part (0..23) - MinPart = 1; // minute part (0..59) - SecPart = 2; // second part (0..59) -begin - // Split time string to component parts: must be 2 or 3 parts (secs optional) - Parts := TIStringList.Create(TimeStr, ':', True, False); - if (Parts.Count < 2) or (Parts.Count > 3) then - raise ERFC2822Date.CreateFmt(sErrMsg, [TimeStr]); - // Get hour, minute and seconds as numbers - Hour := GetHour(Parts[HourPart]); - Min := GetMinute(Parts[MinPart]); - if Parts.IsValidIndex(SecPart) then - Sec := GetSecond(Parts[SecPart]) - else - Sec := 0; // if seconds no specified use 0 - Result := EncodeTime(Hour, Min, Sec, 0); -end; - -procedure GetOffset(const AOffsetStr: string; out AHours, AMins: Integer); - {Gets offset in minutes and seconds from GMT from an RFC2822 format offset - string. Supports +9999, -9999 and text offsets. Unrecognised text offsets are - parsed as -0000 per the RFC. - @param AOffsetStr [in] The offset string to parse. - @param AHours [out] Hours component of offset as signed number. - @param AMins [out] Mins component of offset as signed number. - @except ERFC2822Date raised if a malformed numeric offset is found. - } -resourcestring - // Error message - sErrMsg = 'Invalid date offset: "%s"'; -var - Sign: Integer; // sign of offset: -1 or +1 - I: Integer; // loops thru elements of cObsZones table -const - // Table of supported text time offsets - cObsZones: array[1..10] of record - Zone: string; // offset time zone code - Sign: Integer; // sign of offset: -1 or +1 - Hour: Integer; // offset hour: minutes always zero - end = ( - (Zone: 'UT'; Sign: +1; Hour: 0), - (Zone: 'GMT'; Sign: +1; Hour: 0), - (Zone: 'EST'; Sign: -1; Hour: 5), - (Zone: 'EDT'; Sign: -1; Hour: 4), - (Zone: 'CST'; Sign: -1; Hour: 6), - (Zone: 'CDT'; Sign: -1; Hour: 5), - (Zone: 'MST'; Sign: -1; Hour: 7), - (Zone: 'MDT'; Sign: -1; Hour: 6), - (Zone: 'PST'; Sign: -1; Hour: 8), - (Zone: 'PDT'; Sign: -1; Hour: 7) - ); -begin - if (Length(AOffsetStr) = 5) and (CharInSet(AOffsetStr[1], ['+', '-'])) then - begin - // Offset in standard format ("+" | "-") 9999 - if AOffsetStr[1] = '-' then - Sign := -1 - else - Sign := 1; - if not TryStrToInt(Copy(AOffsetStr, 2, 2), AHours) - or not TryStrToInt(Copy(AOffsetStr, 4, 2), AMins) then - raise ERFC2822Date.CreateFmt(sErrMsg, [AOffsetStr]); - end - else - begin - // Non-standard format: assume -0000 unless recognised code - Sign := -1; - AHours := 0; - AMins := 0; - for I := Low(cObsZones) to High(cObsZones) do - begin - if cObsZones[I].Zone = AOffsetStr then - begin - Sign := cObsZones[I].Sign; - AHours := cObsZones[I].Hour; - end; - end; - end; - // Adjust offsets per sign - AHours := Sign * AHours; - AMins := Sign * AMins; -end; - -function RFC2822DateToGMTDateTime(DateStr: string): TDateTime; - {Converts a date in RFC2822 format into the corresponding TDateTime value in - GMT (UTC). - @param DateStr [in] RFC2822 date string to be converted. - @return Converted date in GMT (UTC). - @except ERFC2822Date raised if DateStr is malformed. - } -resourcestring - // Error messages - sBadDate = 'Bad date format'; - sBadDay = 'Invalid day of month: "%s"'; -var - Parts: IStringList; // component parts of date string - Day, Month, Year: Word; // day, month and year - OffsetHours, OffsetMins: Integer; // offset hours and minutes -const - // Indices of date components in Parts - DOWPart = 0; // day of week part ( ",") - DayPart = 1; // day number part - MonthPart = 2; // month number part - YearPart = 3; // year number part - TimePart = 4; // time component part (HH:MM:SS format) - OffsetPart = 5; // offset from GMT part (+9999, -9999 or some valid text) -begin - // Sun, 29 Aug 2010 13:06:03 +0000 - // Newlines allowed between fields: we compress to single white spaces - DateStr := StrCompressWhiteSpace(DateStr); - // Split date into constituent parts - Parts := TIStringList.Create(DateStr, ' ', False, True); - if Parts.Count <> 6 then - raise ERFC2822Date.Create(sBadDate); - // Check day has a valid name: we don't check if it is correct for date since - // not clear whether day should be correct before or after offset is applied. - ValidateDOW(Copy(Parts[DOWPart], 1, 3)); - // Extract Day, Month and Year - Day := GetDay(Parts[DayPart]); - Month := GetMonth(Parts[MonthPart]); - Year := GetYear(Parts[YearPart]); - // Check date (Day, Month, Year) for validity - if not TryEncodeDate(Year, Month, Day, Result) then - raise ERFC2822Date.Create(sBadDate); - if DaysInMonth(Result) < Day then - raise ERFC2822Date.CreateFmt(sBadDay, [Day]); - // Get time component - Result := Result + GetTime(Parts[TimePart]); - // Get any offset and adjust date accordingly - GetOffset(Parts[OffsetPart], OffsetHours, OffsetMins); - if OffsetHours <> 0 then - Result := IncHour(Result, OffsetHours); - if OffsetMins <> 0 then - Result := IncMinute(Result, OffsetMins); -end; - -end. diff --git a/Src/URSS20.pas b/Src/URSS20.pas deleted file mode 100644 index 3e5f543f7..000000000 --- a/Src/URSS20.pas +++ /dev/null @@ -1,582 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements classes that encapsulate the information contained in an RSS 2.0 - * XML document. -} - - -unit URSS20; - - -interface - - -uses - // Delphi - Generics.Defaults, Generics.Collections, XMLIntf, - // Project - UExceptions, UXMLDocumentEx; - - -type - - { - TRSS20Item: - Encapsulates an RSS 2.0 item. Instances cannot be created and must not be - freed directly. Lifetimes are managed by TRSS20. - } - TRSS20Item = class abstract(TObject) - strict protected - function GetDescription: string; virtual; abstract; - {Read accessor for Description property. - @return Value of property. - } - function GetGUID: string; virtual; abstract; - {Read accessor for GUID property. - @return Value of property. - } - function GetGUIDIsPermalink: Boolean; virtual; abstract; - {Read accessor for GUIDIsPermalink property. - @return Value of property. - } - function GetLink: string; virtual; abstract; - {Read accessor for Link property. - @return Value of property. - } - function GetPubDateAsText: string; virtual; abstract; - {Read accessor for PubDate property. - @return Value of property. - } - function GetTitle: string; virtual; abstract; - {Read accessor for Title property. - @return Value of property. - } - function GetPermalink: string; virtual; - {Read accessor for Permalink property. - @return Value of property. - } - function GetPubDate: TDateTime; virtual; - {Read accessor for PubDate property. - @return Value of property. - } - public - property Title: string read GetTitle; - {The title of the item. May be '', but must be non-empty if Description is - ''} - property Link: string read GetLink; - {The URL of complete story etc associated with the item. May be ''} - property Description: string read GetDescription; - {The item synopsis. May be '' but must be non-empty if Title is ''} - property GUID: string read GetGUID; - {A string that uniquely identifies the item. May by a URL (permalink). May - be ''} - property GUIDIsPermalink: Boolean read GetGUIDIsPermalink; - {True if GUID is a permalink, False if not} - property Permalink: string read GetPermalink; - {A unique link to the item. This is the same as GUID if GUIDIsPermalink is - True or '' if GUIDIsPermalink is False} - property PubDate: TDateTime read GetPubDate; - {Publication date of item in GMT (UTC). Set to midnight 01 Jan 1900 if no - date specified or if date string is invalid} - property PubDateAsText: string read GetPubDateAsText; - {Publication date of the item in RFC822 date format. May be ''} - end; - - { - TRSS20: - Encapsulates and RSS 2.0 channel. The channel is loaded from an XML object - DOM. If there is more than one channel in the feed then only the first - channel is used. - } - TRSS20 = class(TObject) - strict private - fItems: TObjectList; // Maintains list if items - fChannel: IXMLNode; // Reference to [first] channel element - function GetCopyright: string; - {Read accessor for Copyright property. Gets value from XML document. - @return Value of Copyright property. - } - function GetCount: Integer; - {Read accessor for Count property. - @return Number of items in XML document. - } - function GetDescription: string; - {Read accessor for Description property. Gets value from XML document. - @return Value of Description property. - } - function GetDocs: string; - {Read accessor for Docs property. Gets value from XML document. - @return Value of Docs property. - } - function GetItem(Idx: Integer): TRSS20Item; - {Read accessor for Items[] property. - @param Idx [in] Index of required item. - @return Reference to required item object. - } - function GetLanguage: string; - {Read accessor for Language property. Gets value from XML document. - @return Value of Language property. - } - function GetLink: string; - {Read accessor for Link property. Gets value from XML document. - @return Value of Link property. - } - function GetPubDate: TDateTime; - {Read accessor for PubDate property. Gets value from PubDateAsText - property. - @return Value of PubDate property. - } - function GetPubDateAsText: string; - {Read accessor for PubDateAsText property. Gets value from XML document. - @return Value of PubDateAsText property. - } - function GetTitle: string; - {Read accessor for Title property. Gets value from XML document. - @return Value of Title property. - } - strict protected - function FindChannelChildNode(const NodeName: string): IXMLNode; - {Finds a named child node of the "channel" node in the XML document. - @param NodeName [in] Name of required node. - @return Reference to required node or nil if not found. - } - function GetChannelChildNodeText(const NodeName: string): string; - {Gets the text of a named text element child node of the "channel" node in - the XML document. - @param NodeName [in] Name of required node. - @return The child node's text or '' if node not found or not a text - element. - } - public - constructor Create; - {Object constructor. Sets up an empty RSS object. - } - destructor Destroy; override; - {Object destructor. Tidies up object. - } - procedure Load(XMLDoc: IXMLDocumentEx); - {Loads RSS information from an XML Document DOM. - @param XMLDoc [in] DOM from which to read information. - } - function GetEnumerator: TEnumerator; - {Create an enumerator for the object that enumerates all the news items. - @return Enumerator instance. - } - property Title: string read GetTitle; - {Name of the channel. Must be non-empty} - property Link: string read GetLink; - {URL of the HTML website corresponding to the channel. Must be non-empty} - property Description: string read GetDescription; - {Short description of the channel. Must be non-empty} - property Language: string read GetLanguage; - {Language the channel is written in. Uses language codes defined by - Netscape or W3C. May be empty} - property Copyright: string read GetCopyright; - {Copyright notice for the channel. May be empty} - property PubDate: TDateTime read GetPubDate; - {Publication date for the channel's in GMT (UTC). Set to midnight 01 Jan - 1900 if no date specified or if date string is invalid} - property PubDateAsText: string read GetPubDateAsText; - {Publication date for the channel's content in RFC822 date format. May be - empty} - property Docs: string read GetDocs; - {A URL that points to the documentation for the format used in the RSS - file. May be empty} - property Items[Idx: Integer]: TRSS20Item read GetItem; default; - {Array of new items in the channel} - property Count: Integer read GetCount; - {Number of news items in the channel} - end; - - { - ERSS20: - Class of exception raised by classes in this unit. - } - ERSS20 = class(ECodeSnip); - - -implementation - - -uses - // Delphi - SysUtils, - // Project - URFC2822Date; - - -type - { - TRSS20ItemImpl: - Concrete implementation of TRSS20Item that reads its properties from an - "item" node from the RSS feed's XML DOM. - } - TRSS20ItemImpl = class sealed(TRSS20Item) - strict private - fItemNode: IXMLNode; // Reference to XML item node - function FindChildNode(const NodeName: string): IXMLNode; - {Finds a named child node of the item node in the XML document. - @param NodeName [in] Name of required node. - @return Reference to required node or nil if not found. - } - function GetTextOfChildNode(const NodeName: string): string; - {Gets the text of a named text element child node of the "item" node in - the XML document. - @param NodeName [in] Name of required node. - @return The child node's text or '' if node not found or not a text - element. - } - strict protected - function GetDescription: string; override; - {Read accessor for Description property. Gets value from XML item node. - @return Value of Description property. - } - function GetGUID: string; override; - {Read accessor for GUID property. Gets value from XML item node. - @return Value of GUID property. - } - function GetGUIDIsPermalink: Boolean; override; - {Read accessor for GUIDIsPermalink property. Gets value from "guid" child - node. - @return Value of GUIDIsPermalink property. - } - function GetLink: string; override; - {Read accessor for Link property. Gets value from XML item node. - @return Value of Link property. - } - function GetPubDateAsText: string; override; - {Read accessor for PubDateAsText property. Gets value from XML item node. - @return Value of PubDateAsText property. - } - function GetTitle: string; override; - {Read accessor for Title property. Gets value from XML item node. - @return Value of Title property. - } - public - constructor Create(ItemNode: IXMLNode); - {Object constructor. Creates item instance that has properties of a - item node from XML document. - @param ItemNode [in] XML "item" node that contains required information. - } - destructor Destroy; override; - {Object desctructor. Tears down object. - } - end; - -function DecodeDate(const DateStr: string): TDateTime; - {Decodes RFC2822 date string into TDateTime format in GMT. If date string is - empty or invalid a default date is used. - @param DateStr [in] RFC2822 date format string to be decoded. - @return GMT TDateTime equivalent value or default date value if date string - empty or invalid. - } - // --------------------------------------------------------------------------- - function DefaultDate: TDateTime; - {Provides a default date. - @return Default date of midnight, 01 Jan 1900. - } - begin - Result := EncodeDate(1900, 1, 1); - end; - // --------------------------------------------------------------------------- -begin - if DateStr <> '' then - begin - try - Result := RFC2822DateToGMTDateTime(DateStr); - except - Result := DefaultDate; - end; - end - else - Result := DefaultDate; -end; - -{ TRSS20 } - -constructor TRSS20.Create; - {Object constructor. Sets up an empty RSS object. - } -begin - inherited Create; - fItems := TObjectList.Create(True); -end; - -destructor TRSS20.Destroy; - {Object destructor. Tidies up object. - } -begin - fItems.Free; // frees owned item objects - inherited; -end; - -function TRSS20.FindChannelChildNode(const NodeName: string): IXMLNode; - {Finds a named child node of the "channel" node in the XML document. - @param NodeName [in] Name of required node. - @return Reference to required node or nil if not found. - } -begin - Result := fChannel.ChildNodes.FindNode(NodeName); -end; - -function TRSS20.GetChannelChildNodeText(const NodeName: string): string; - {Gets the text of a named text element child node of the "channel" node in the - XML document. - @param NodeName [in] Name of required node. - @return The child node's text or '' if node not found or not a text element. - } -var - Node: IXMLNode; // named child node -begin - Node := FindChannelChildNode(NodeName); - if Assigned(Node) and (Node.IsTextElement) then - Result := Node.Text - else - Result := ''; -end; - -function TRSS20.GetCopyright: string; - {Read accessor for Copyright property. Gets value from XML document. - @return Value of Copyright property. - } -begin - Result := GetChannelChildNodeText('copyright'); -end; - -function TRSS20.GetCount: Integer; - {Read accessor for Count property. - @return Number of items in XML document. - } -begin - Result := fItems.Count; -end; - -function TRSS20.GetDescription: string; - {Read accessor for Description property. Gets value from XML document. - @return Value of Description property. - } -begin - Result := GetChannelChildNodeText('description'); -end; - -function TRSS20.GetDocs: string; - {Read accessor for Docs property. Gets value from XML document. - @return Value of Docs property. - } -begin - Result := GetChannelChildNodeText('docs'); -end; - -function TRSS20.GetEnumerator: TEnumerator; - {Create an enumerator for the object that enumerates all the news items. - @return Enumerator instance. - } -begin - Result := fItems.GetEnumerator; -end; - -function TRSS20.GetItem(Idx: Integer): TRSS20Item; - {Read accessor for Items[] property. - @param Idx [in] Index of required item. - @return Reference to required item object. - } -begin - Result := fItems[Idx]; -end; - -function TRSS20.GetLanguage: string; - {Read accessor for Language property. Gets value from XML document. - @return Value of Language property. - } -begin - Result := GetChannelChildNodeText('language'); -end; - -function TRSS20.GetLink: string; - {Read accessor for Link property. Gets value from XML document. - @return Value of Link property. - } -begin - Result := GetChannelChildNodeText('link'); -end; - -function TRSS20.GetPubDate: TDateTime; - {Read accessor for PubDate property. Gets value from PubDateAsText property. - @return Value of PubDate property. - } -begin - Result := DecodeDate(PubDateAsText); -end; - -function TRSS20.GetPubDateAsText: string; - {Read accessor for PubDateAsText property. Gets value from XML document. - @return Value of PubDateAsText property. - } -begin - Result := GetChannelChildNodeText('pubDate'); -end; - -function TRSS20.GetTitle: string; - {Read accessor for Title property. Gets value from XML document. - @return Value of Title property. - } -begin - Result := GetChannelChildNodeText('title'); -end; - -procedure TRSS20.Load(XMLDoc: IXMLDocumentEx); - {Loads RSS information from an XML Document DOM. - @param XMLDoc [in] DOM from which to read information. - } -resourcestring - // Error message - sInvalidDoc = 'Invalid RSS document'; -var - ItemNodes: IXMLSimpleNodeList; // list of items nodes of channel - ItemNode: IXMLNode; // each item in ItemNodes -begin - fItems.Clear; - fChannel := XMLDoc.FindNode('rss\channel'); - if not Assigned(fChannel) then - raise ERSS20.Create(sInvalidDoc); - // create items - ItemNodes := XMLDoc.FindChildNodes(fChannel, 'item'); - for ItemNode in ItemNodes do - fItems.Add(TRSS20ItemImpl.Create(ItemNode)); -end; - -{ TRSS20Item } - -function TRSS20Item.GetPermalink: string; - {Read accessor for Permalink property. - @return Value of property. - } -begin - // Calculates value from other properties - if GUIDIsPermalink then - Result := GUID - else - Result := ''; -end; - -function TRSS20Item.GetPubDate: TDateTime; - {Read accessor for PubDate property. - @return Value of property. - } -begin - // Calculates value from PubDateAsText property - Result := DecodeDate(PubDateAsText); -end; - -{ TRSS20ItemImpl } - -constructor TRSS20ItemImpl.Create(ItemNode: IXMLNode); - {Object constructor. Creates item instance that has properties of a specified - item node from XML document. - @param ItemNode [in] XML "item" node that contains required information. - } -begin - inherited Create; - fItemNode := ItemNode; -end; - -destructor TRSS20ItemImpl.Destroy; - {Object desctructor. Tears down object. - } -begin - fItemNode := nil; - inherited; -end; - -function TRSS20ItemImpl.FindChildNode(const NodeName: string): IXMLNode; - {Finds a named child node of the item node in the XML document. - @param NodeName [in] Name of required node. - @return Reference to required node or nil if not found. - } -begin - Result := fItemNode.ChildNodes.FindNode(NodeName); -end; - -function TRSS20ItemImpl.GetDescription: string; - {Read accessor for Description property. Gets value from XML item node. - @return Value of Description property. - } -begin - Result := GetTextOfChildNode('description'); -end; - -function TRSS20ItemImpl.GetGUID: string; - {Read accessor for GUID property. Gets value from XML item node. - @return Value of GUID property. - } -begin - Result := GetTextOfChildNode('guid'); -end; - -function TRSS20ItemImpl.GetGUIDIsPermalink: Boolean; - {Read accessor for GUIDIsPermalink property. Gets value from "guid" child - node. - @return Value of GUIDIsPermalink property. - } -var - Node: IXMLNode; // reference to "guid" node -begin - Node := FindChildNode('guid'); - if not Assigned(Node) then - Exit(False); - if not Node.HasAttribute('isPermaLink') then - Exit(True); // isPermaLink is optional and defaults to true - Result := Node.Attributes['isPermaLink'] = 'true'; -end; - -function TRSS20ItemImpl.GetLink: string; - {Read accessor for Link property. Gets value from XML item node. - @return Value of Link property. - } -begin - Result := GetTextOfChildNode('link'); -end; - - -function TRSS20ItemImpl.GetPubDateAsText: string; - {Read accessor for PubDateAsText property. Gets value from XML item node. - @return Value of PubDateAsText property. - } -begin - Result := GetTextOfChildNode('pubDate'); -end; - -function TRSS20ItemImpl.GetTextOfChildNode(const NodeName: string): string; - {Gets the text of a named text element child node of the "item" node in the - XML document. - @param NodeName [in] Name of required node. - @return The child node's text or '' if node not found or not a text element. - } -var - Node: IXMLNode; -begin - Node := FindChildNode(NodeName); - if Assigned(Node) and (Node.IsTextElement) then - Result := Node.Text - else - Result := ''; -end; - -function TRSS20ItemImpl.GetTitle: string; - {Read accessor for Title property. Gets value from XML item node. - @return Value of Title property. - } -begin - Result := GetTextOfChildNode('title'); -end; - -end. - diff --git a/Src/Web.UInfo.pas b/Src/Web.UInfo.pas index e651d561e..493c4253c 100644 --- a/Src/Web.UInfo.pas +++ b/Src/Web.UInfo.pas @@ -76,12 +76,6 @@ TWebInfo = class(TNoConstructObject) ProductionServerHost = 'delphidabbler.com'; /// URL of DelphiDabbler website. WebsiteURL = 'http://' + ProductionServerHost; - /// Template for URL of Code Snippets news feed. - /// '%d' placeholder must be replaced by the required number of - /// days into the past the news feed should cover. Passing 0 as - /// the number of days results in all news items being returned. - /// - NewsFeedTplt = WebSiteURL + '/feeds/site-news-feed?id=codesnip&days=%d'; strict private /// Returns the name of the server that hosts web services that /// are used by CodeSnip. @@ -114,6 +108,8 @@ TWebInfo = class(TNoConstructObject) /// This is the CodeSnip FAQ project on GitHub. FAQsURL = 'https://github.com/delphidabbler/codesnip-faq/' + 'blob/master/README.md'; + /// URL of the the CodeSnip blog. + BlogURL = 'http://codesnip-app.blogspot.com/'; public /// Returns the name of the server that hosts web services used by /// CodeSnip when under testing. This server receives updated web services @@ -133,11 +129,6 @@ TWebInfo = class(TNoConstructObject) /// The server must be using the http:// protocol. /// class function TestServerHost: string; - /// Builds the URL of the CodeSnip news feed. - /// Word [in] Maximum age, in days, of news items - /// to be included in the feed. - /// string. Required URL. - class function NewsFeedURL(const Age: Word): string; /// Builds the URL of a web service. /// string. [in] Template of URL of web /// service script. Must contain a '%s' placeholder for host name. @@ -180,11 +171,6 @@ class function TWebInfo.Host: string; Result := ProductionServerHost; end; -class function TWebInfo.NewsFeedURL(const Age: Word): string; -begin - Result := Format(NewsFeedTplt, [Age]); -end; - class function TWebInfo.TestServerHost: string; const TestServerSwitch = '--test-server'; diff --git a/Src/Web.UXMLRequestor.pas b/Src/Web.UXMLRequestor.pas deleted file mode 100644 index 112eaa664..000000000 --- a/Src/Web.UXMLRequestor.pas +++ /dev/null @@ -1,147 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a class that fetches XML documents from the internet via HTTP - * requests, parses the XML and provides a reference to the DOM. -} - - -unit Web.UXMLRequestor; - - -interface - - -uses - // Project - UExceptions, UXMLDocumentEx, Web.UHTTPEx; - - -type - { - TXMLRequestor: - Class that fetches XML documents from the internet via HTTP requests, parses - the XML and provides a reference to the DOM. - } - TXMLRequestor = class(TObject) - strict private - fHTTP: THTTPEx; // Object used to perform HTTP requests - function DownloadDocument(const URI: string): string; - {Downloads XML document from internet. - @param URI [in] URI of required XML document. - @return Content of XML document. - @except EXMLRequestor raised if any web error encountered. - } - function ParseXML(const XML: string): IXMLDocumentEx; - {Parses an XML document and provides reference to DOM. - @param XML [in] Document's XML as text. - @return Reference to XML document's DOM. - @except EXMLRequestor raised if error parsing XML. - } - public - constructor Create; - {Object constructor. Sets up object. - } - destructor Destroy; override; - {Object destructor. Tears down object. - } - function GetDocument(const URI: string): IXMLDocumentEx; - {Fetches XML document from internet, parses it and provides reference to - its DOM. - @param URI [in] URI of required XML document. - @return Reference to XML document's DOM. - @except EXMLRequestor raised if error in downloading or parsing XML. - } - end; - - { - EXMLRequestor: - Class of exceptions raised by TXMLRequestor. - } - EXMLRequestor = class(ECodeSnip); - - -implementation - - -uses - // Delphi - XMLIntf, - // Project - Web.UExceptions; - - -{ TXMLRequestor } - -constructor TXMLRequestor.Create; - {Object constructor. Sets up object. - } -begin - inherited Create; - fHTTP := THTTPEx.Create; - fHTTP.MediaType := 'application/xml'; - fHTTP.ContentType := 'application/xml'; -end; - -destructor TXMLRequestor.Destroy; - {Object destructor. Tears down object. - } -begin - fHTTP.Free; - inherited; -end; - -function TXMLRequestor.DownloadDocument(const URI: string): string; - {Downloads XML document from internet. - @param URI [in] URI of required XML document. - @return Content of XML document. - @except EXMLRequestor raised if any web error encountered. - } -begin - try - Result := fHTTP.GetText(URI); - except - on E: EWebError do // convert any web error to own exception type - raise EXMLRequestor.Create(E); - end; -end; - -function TXMLRequestor.GetDocument(const URI: string): IXMLDocumentEx; - {Fetches XML document from internet, parses it and provides reference to its - DOM. - @param URI [in] URI of required XML document. - @return Reference to XML document's DOM. - @except EXMLRequestor raised if error in downloading or parsing XML. - } -var - XML: string; // content of downloaded XML document -begin - XML := DownloadDocument(URI); - Result := ParseXML(XML); -end; - -function TXMLRequestor.ParseXML(const XML: string): IXMLDocumentEx; - {Parses an XML document and provides reference to DOM. - @param XML [in] Document's XML as text. - @return Reference to XML document's DOM. - @except EXMLRequestor raised if error parsing XML. - } -begin - try - Result := TXMLDocumentEx.Create(nil); - Result.LoadFromXML(XML); - Result.Active := True; - except - on E: EXMLDocError do // convert any XML parsing error to own exception type - raise EXMLRequestor.Create(E); - end; -end; - -end. From 66161de4c9e0ba4da42ce22ee18a318388d04ae7 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 15:32:54 +0000 Subject: [PATCH 029/714] Updated help file re removal of RSS news feed and replacement with link to CodeSnip blog --- Src/Help/CodeSnip.hhp | 2 - Src/Help/HTML/dlg_news.htm | 65 ---------------------------- Src/Help/HTML/dlg_preferences.htm | 3 -- Src/Help/HTML/dlg_prefs_news.htm | 55 ----------------------- Src/Help/HTML/dlg_programupdates.htm | 7 ++- Src/Help/HTML/dlg_update.htm | 9 ---- Src/Help/HTML/main_menu.htm | 2 +- Src/Help/HTML/menu_help.htm | 9 ++-- Src/Help/HTML/privacy_statement.htm | 17 -------- Src/Help/Index.hhk | 8 ---- 10 files changed, 9 insertions(+), 168 deletions(-) delete mode 100644 Src/Help/HTML/dlg_news.htm delete mode 100644 Src/Help/HTML/dlg_prefs_news.htm diff --git a/Src/Help/CodeSnip.hhp b/Src/Help/CodeSnip.hhp index 3b9804bf3..b01ea4c32 100644 --- a/Src/Help/CodeSnip.hhp +++ b/Src/Help/CodeSnip.hhp @@ -42,14 +42,12 @@ HTML\dlg_firstrun.htm HTML\dlg_import.htm HTML\dlg_importfile.htm HTML\dlg_loadselection.htm -HTML\dlg_news.htm HTML\dlg_pagesetup.htm HTML\dlg_preferences.htm HTML\dlg_prefs_codegen.htm HTML\dlg_prefs_display.htm HTML\dlg_prefs_general.htm HTML\dlg_prefs_hiliter.htm -HTML\dlg_prefs_news.htm HTML\dlg_prefs_printing.htm HTML\dlg_prefs_snippetlayout.htm HTML\dlg_prefs_sourcecode.htm diff --git a/Src/Help/HTML/dlg_news.htm b/Src/Help/HTML/dlg_news.htm deleted file mode 100644 index a5fd8e99c..000000000 --- a/Src/Help/HTML/dlg_news.htm +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - CodeSnip News Dialogue Box - - - - - - - -

    - CodeSnip News Dialogue Box -

    -

    - This dialogue box is displayed from the Help | CodeSnip News menu - item. -

    -

    - It shows the latest news about CodeSnip and the online database. - The news is obtained from CodeSnip's online RSS news feed. The - titles of most items are clickable and will display a web page relevant - to the news item when clicked. -

    -

    - The maximum age of the news items is shown at the top of the window. By - default this is 92 days. You can change this by clicking the - Change button, which will display the News tab of the Preferences dialogue box. Enter a new value there and click - OK. If the value has changed the news will be re-loaded, showing - items from the date range specified. -

    -

    - If the news feed is not available or there is an error, a message to that - effect is displayed. -

    -

    - You can display the RSS feed in your default web browser by clicking the - RSS Feed button. Depending on your browser, you may be able to - subscribe to the feed from there. -

    - - diff --git a/Src/Help/HTML/dlg_preferences.htm b/Src/Help/HTML/dlg_preferences.htm index b0e3e7ee5..b7281302b 100644 --- a/Src/Help/HTML/dlg_preferences.htm +++ b/Src/Help/HTML/dlg_preferences.htm @@ -55,9 +55,6 @@

  • Printing
  • -
  • - News -
  • Updates
  • diff --git a/Src/Help/HTML/dlg_prefs_news.htm b/Src/Help/HTML/dlg_prefs_news.htm deleted file mode 100644 index 808c8fd2b..000000000 --- a/Src/Help/HTML/dlg_prefs_news.htm +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - News Preferences - - - - - - - -

    - News Preferences -

    -

    - Preferences concerning the CodeSnip new feed can be modified by - using this tab of the - Preferences dialogue box. The tab is accessed by selecting the - Tools | Preferences menu item then clicking the News - tab. You can also display this tab from the CodeSnip News dialogue box. -

    -

    - There is only one setting that can be changed, and that is the maximum - number of days old a news item may be to be displayed in the CodeSnip News dialogue box. -

    -

    - Simply enter the required number of days in the spin edit control. The - minimum number of days is 14 and the maximum is 365. If you enter values - outside this range a valid value will be substituted. -

    - - diff --git a/Src/Help/HTML/dlg_programupdates.htm b/Src/Help/HTML/dlg_programupdates.htm index b32f8ea43..0d267fbcc 100644 --- a/Src/Help/HTML/dlg_programupdates.htm +++ b/Src/Help/HTML/dlg_programupdates.htm @@ -64,12 +64,11 @@

    ‡ Only stable releases of CodeSnip are made available via this dialogue box. If you are interested trying any pre-release or beta - versions, please check the CodeSnip CodeSnip News Feed which carries announcements of all such - releases. + >Releases page on GitHub which lists all releases.

    By default CodeSnip performs a check for program updates diff --git a/Src/Help/HTML/dlg_update.htm b/Src/Help/HTML/dlg_update.htm index c008ee0e1..4e07bf9ac 100644 --- a/Src/Help/HTML/dlg_update.htm +++ b/Src/Help/HTML/dlg_update.htm @@ -88,15 +88,6 @@

    target="_blank" >contact page.

    -

    - Latest CodeSnip News -

    -

    - Click the Latest News button at the bottom left of the dialogue - box to see the latest news about CodeSnip and the online - database. If this button is clicked while an update is in progress the - update is paused until the dialogue box is closed. -

    Note: By default CodeSnip checks online from time to time to check if any database updates are available. A pop-up diff --git a/Src/Help/HTML/main_menu.htm b/Src/Help/HTML/main_menu.htm index c0344d442..8aed7cb17 100644 --- a/Src/Help/HTML/main_menu.htm +++ b/Src/Help/HTML/main_menu.htm @@ -110,7 +110,7 @@

    Help - Help file, web links, license, copyright, donations, news and + Help file, web links, license, copyright, donations, news blog and acknowledgements. diff --git a/Src/Help/HTML/menu_help.htm b/Src/Help/HTML/menu_help.htm index 10feba130..5a6d44766 100644 --- a/Src/Help/HTML/menu_help.htm +++ b/Src/Help/HTML/menu_help.htm @@ -148,13 +148,14 @@

    Menu icon - CodeSnip News + CodeSnip News & Blog Displays the CodeSnip News dialogue box that shows the latest news about - CodeSnip and the online database. + class="weblink" + href="http://codesnip-app.blogspot.com/" + target="_blank" + >CodeSnip Blog in the default web browser. The latest news about CodeSnip is posted in the blog. diff --git a/Src/Help/HTML/privacy_statement.htm b/Src/Help/HTML/privacy_statement.htm index 41481f7fd..71ec83762 100644 --- a/Src/Help/HTML/privacy_statement.htm +++ b/Src/Help/HTML/privacy_statement.htm @@ -110,10 +110,6 @@

  • Submitting code for inclusion in the main database.
  • -
  • - Displaying the latest news in the "CodeSnip News" dialogue - box. -
  • Checking for program updates.
  • @@ -243,19 +239,6 @@

    used only to contact you with any queries about the submitted code or its licensing.

    -

    - Displaying the latest news -

    -

    - This action is performed by selecting the Help | CodeSnip News - menu option or by clicking the "Latest News" button in the - "Update from Web" dialogue box. -

    -

    - CodeSnip simply requests an XML document containing an RSS 2.0 - news feed from the DelphiDabbler website. No personal information is - included in the request. -

    Checking for program updates

    diff --git a/Src/Help/Index.hhk b/Src/Help/Index.hhk index 7d89d0608..08cce12eb 100644 --- a/Src/Help/Index.hhk +++ b/Src/Help/Index.hhk @@ -283,14 +283,6 @@

    -
  • - - - -
  • - - -
  • From b2ad73b9e6a7fa0805a6fb2b8aae0c8ea8a89515 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 15:35:21 +0000 Subject: [PATCH 030/714] Added news glyph to Help | CodeSnip News & Blog menu item --- Src/FmMain.dfm | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index f718e7d11..12ac60648 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -924,6 +924,7 @@ inherited MainForm: TMainForm Hint = 'Display CodeSnip news blog|Display the CodeSnip News Blog in the' + ' default web browser' + ImageIndex = 36 end end object mnuMain: TMainMenu From fa1881a2165e6e1025be01ed3817c915bc9f958e Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 15:43:44 +0000 Subject: [PATCH 031/714] Updated documents re removal of news RSS feed and replacement with access to CodeSnip Blog. --- Docs/Design/FileFormats/index.html | 3 -- Docs/Design/FileFormats/news-rss.html | 75 --------------------------- Docs/Privacy.txt | 30 ++++------- Docs/ReadMe.txt | 17 ++---- 4 files changed, 12 insertions(+), 113 deletions(-) delete mode 100644 Docs/Design/FileFormats/news-rss.html diff --git a/Docs/Design/FileFormats/index.html b/Docs/Design/FileFormats/index.html index 42af426d7..191f8f78b 100644 --- a/Docs/Design/FileFormats/index.html +++ b/Docs/Design/FileFormats/index.html @@ -65,9 +65,6 @@

  • Main Database Update Data Stream
  • -
  • - News RSS Stream -
  • Saved Files
  • diff --git a/Docs/Design/FileFormats/news-rss.html b/Docs/Design/FileFormats/news-rss.html deleted file mode 100644 index 2b38cbefe..000000000 --- a/Docs/Design/FileFormats/news-rss.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - CodeSnip File Format Documentation - News RSS Stream - - - - - - - - -
    -
    - DelphiDabbler CodeSnip -
    -
    - File Format Documentation -
    -
    - -

    - News RSS Stream -

    - -

    - CodeSnip downloads news about the program and database as an RSS feed from - DelphiDabbler.com. -

    - -

    - The feed is generated as an RSS XML document using the default encoding used - by the DelphiDabbler web server, ISO-8859-1. The XML document has no encoding - information embedded in it. -

    - -

    - CodeSnip's HTTP handling code gets the RSS document as text and converts it to - a Unicode string using the encoding indicated by the web service (ISO-8859-1 - by default). -

    - -

    - The XML is then parsed as a Unicode string. -

    - -

    - Therefore, although no explicit encoding information is embedded in the XML, - the document is translated to Unicode correctly and information is preserved. -

    - - - - diff --git a/Docs/Privacy.txt b/Docs/Privacy.txt index 529d26795..c614ec02a 100644 --- a/Docs/Privacy.txt +++ b/Docs/Privacy.txt @@ -67,17 +67,15 @@ CodeSnip Online Activity CodeSnip may go online for several reasons. They are: 1. Updating the database. - 3. Submitting code for inclusion in the main database. - 4. Displaying the latest news in the "CodeSnip News" dialogue box. - 5. Checking for program updates. - 6. Importing snippets from the SWAG database. - 7. Accessing various websites via hyperlinks and menu options. - 8. Accessing the internet using a proxy server. - -The first six actions are performed directly by CodeSnip, which communicates -with web services located on delphidabbler.com using HTTP on port 80. The -seventh action simply displays web pages in a browser. The eighth passes user -information to the proxy server. + 2. Submitting code for inclusion in the main database. + 3. Checking for program updates. + 4. Importing snippets from the SWAG database. + 5. Accessing various websites via hyperlinks and menu options. + 6. Accessing the internet using a proxy server. + +Some are performed directly by CodeSnip, which communicates with web services +located on delphidabbler.com using HTTP on port 80. Others simply display web pages in a browser. The last reason passes user information to the proxy server +if configured to do so, Personal data will neither be published on the DelphiDabbler website nor knowingly passed to third parties. Furthermore your data will only be used by @@ -147,16 +145,6 @@ Your email address will not be published and is used only to contact you with any queries about the submitted code or its licensing. -Displaying the latest news --------------------------------------------------------------------------------- - -This action is performed by selecting the "Help | CodeSnip News" menu option or -by clicking the "Latest News" button in the "Update from Web" dialogue box. - -CodeSnip simply requests an XML document containing an RSS 2.0 news feed from -the DelphiDabbler website. No personal information is included in the request. - - Checking for program updates -------------------------------------------------------------------------------- diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt index ec8044966..ef742f636 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe.txt @@ -270,9 +270,9 @@ Check For Program Updates" menu option. Once again you will be directed to a web page from where the updated program can be downloaded. Neither of the above methods will detect beta and preview releases of the -program. To find out about those you should subscribe to the CodeSnip news feed -(see below). Alternatively you can view the latest news from the feed from the -"Help | CodeSnip News" menu option. +program. To find out about those you should check the CodeSnip Blog at +http://codesnip-app.blogspot.com/ or check the available releases on the +CodeSnip GitHub. NOTE: You may need to configure your firewall to permit CodeSnip to access the internet otherwise the automatic updating may not work. @@ -319,17 +319,6 @@ Known Installation and Upgrading Issues removed and equivalent entries will have been made on the "Namespaces" tab. -RSS News Feed -================================================================================ - -You can get notified of all updates to the CodeSnip program and to the database -by subscribing to the Code Snippets RSS Feed at -http://delphidabbler.com/feeds/site-news-feed?id=codesnip. - -The latest news from this feed can also be displayed from the program's "Help | -CodeSnip News" menu option. - - License & Disclaimer ================================================================================ From 973c5e78981bd2cb2fa2dd99ed88acf999275603 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 15:47:19 +0000 Subject: [PATCH 032/714] Fixed references to FAQs to use new GitHub URLs. --- Docs/ReadMe.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt index ef742f636..466dc9c3f 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe.txt @@ -228,7 +228,7 @@ Each user can configure compilers differently. Delphi XE2 to XE8 and Delphi 10.1 Berlin may need to be configured to search for required units in the correct namespaces. This is explained in the Add/Edit Snippet Dialogue Box help topic and in the FAQ at -http://delphidabbler.com/url/codesnip-and-xe2. +https://github.com/delphidabbler/codesnip-faq/blob/master/UsingCodeSnip.md#faq-1 Registration @@ -340,7 +340,7 @@ Source Code CodeSnip's source code is freely available. For details of how to obtain the source see the FAQ at -http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppSource#FAQ1 +https://github.com/delphidabbler/codesnip-faq/blob/master/SourceCode.md#faq-1 The standard and portable editions of CodeSnip share the same source code. @@ -399,7 +399,7 @@ FAQs ================================================================================ There are Frequently Asked Questions pages for CodeSnip on the web, at -http://delphidabbler.com/url/codesnip-faq. +https://github.com/delphidabbler/codesnip-faq/blob/master/README.md Contribute to the Database From 271d0241044df63c9a373feb9997a0bacef62fe7 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 16:13:59 +0000 Subject: [PATCH 033/714] Removed redundant News feed preferences. Section is deleted from Config file on 1st run. Config file docs updated --- Docs/Design/FileFormats/config.html | 23 ---------------- Src/FirstRun.UConfigFile.pas | 11 +++++++- Src/FirstRun.UMain.pas | 4 +++ Src/UPreferences.pas | 42 ----------------------------- 4 files changed, 14 insertions(+), 66 deletions(-) diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index 1eb091cf3..a0a9668ad 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -1143,29 +1143,6 @@

    -

    - [Prefs:News] section -

    - -

    - Stores preferences that determine how items from the CodeSnip news feed are - displayed. -

    - -

    - Name / Value pairs: -

    - -
    -
    - MaxAge (Integer) -
    -
    - Maximum age of a news item that can appear in CodeSnip News dialogue box in - days. Default is 92 days. -
    -
    -

    [Prefs:Printing] section

    diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index a282077c8..24d390400 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -98,7 +98,9 @@ TUserConfigFileUpdater = class(TConfigFileUpdater) /// Deletes unused key that determines detail pane index. /// procedure DeleteDetailsPaneIndex; - {}{$ENDIF} + {$ENDIF} + /// Deletes unused Prefs:News section. + procedure DeleteNewsPrefs; /// Effectively renames MainWindow section used prior to version /// 11 as WindowState:MainForm. procedure RenameMainWindowSection; @@ -288,6 +290,13 @@ procedure TUserConfigFileUpdater.DeleteHighligherPrefs; end; {$ENDIF} +procedure TUserConfigFileUpdater.DeleteNewsPrefs; +begin + if not TFile.Exists(CfgFileName, False) then + CreateNewFile; + DeleteIniSection('Prefs:News', CfgFileName); +end; + {$IFNDEF PORTABLE} procedure TUserConfigFileUpdater.DeleteProxyPassword; begin diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index 69ed3656b..f944e3cec 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -260,6 +260,10 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); if fUserConfigFile.FileVer < 15 then fUserConfigFile.UpdateFindXRefs; + + if fUserConfigFile.FileVer < 16 then + fUserConfigFile.DeleteNewsPrefs; + if fCommonConfigFile.FileVer < 7 then fCommonConfigFile.DeleteRegistrationInfo; diff --git a/Src/UPreferences.pas b/Src/UPreferences.pas index 5fbf2670b..2061baad8 100644 --- a/Src/UPreferences.pas +++ b/Src/UPreferences.pas @@ -240,14 +240,6 @@ interface property Warnings: IWarnings read GetWarnings write SetWarnings; - /// Gets maximum age of items to be read from news feed. - function GetNewsAge: Integer; - /// Sets maximum age of items to be read from news feed. - procedure SetNewsAge(const Age: Integer); - /// Maximum age of items to be read from news feed. - property NewsAge: Integer - read GetNewsAge write SetNewsAge; - /// Gets information describing snippet detail page /// customisations. function GetPageStructures: TSnippetPageStructures; @@ -370,8 +362,6 @@ TPreferences = class(TInterfacedObject, /// Reference to object containing information about warnings to /// be enabled or disabled by code generator. fWarnings: IWarnings; - /// Maximum age of items to be read from news feed. - fNewsAge: Integer; /// Information describing snippet detail page customisations. /// fPageStructures: TSnippetPageStructures; @@ -577,14 +567,6 @@ TPreferences = class(TInterfacedObject, /// Method of IPreferences. procedure SetWarnings(Warnings: IWarnings); - /// Gets maximum age of items to be read from news feed. - /// Method of IPreferences. - function GetNewsAge: Integer; - - /// Sets maximum age of items to be read from news feed. - /// Method of IPreferences. - procedure SetNewsAge(const Age: Integer); - /// Gets information describing snippet detail page /// customisations. /// Method of IPreferences. @@ -641,7 +623,6 @@ TPreferencesPersist = class(TPreferences, cPrinting = 'Printing'; cHiliter = 'Hiliter'; cCodeGenerator = 'CodeGen'; - cNews = 'News'; cDisplay = 'Display'; cPageStructures = 'SnippetPageStructure'; cUpdating = 'Updating'; @@ -706,7 +687,6 @@ procedure TPreferences.Assign(const Src: IInterface); Self.SetNamedHiliteAttrs(SrcPref.NamedHiliteAttrs); Self.SetCustomHiliteColours(SrcPref.CustomHiliteColours); Self.SetWarnings(SrcPref.Warnings); - Self.SetNewsAge(SrcPref.NewsAge); Self.SetPageStructures(SrcPref.PageStructures); Self.fAutoCheckProgramFrequency := SrcPref.AutoCheckProgramFrequency; Self.fAutoCheckDatabaseFrequency := SrcPref.AutoCheckDatabaseFrequency; @@ -772,11 +752,6 @@ function TPreferences.GetNamedHiliteAttrs: INamedHiliteAttrs; Result := fNamedHiliteAttrs; end; -function TPreferences.GetNewsAge: Integer; -begin - Result := fNewsAge; -end; - function TPreferences.GetOverviewStartState: TOverviewStartState; begin Result := fOverviewStartState; @@ -884,11 +859,6 @@ procedure TPreferences.SetNamedHiliteAttrs(NamedHiliteAttrs: INamedHiliteAttrs); (fNamedHiliteAttrs as IAssignable).Assign(NamedHiliteAttrs); end; -procedure TPreferences.SetNewsAge(const Age: Integer); -begin - fNewsAge := Age; -end; - procedure TPreferences.SetOverviewStartState(const Value: TOverviewStartState); begin fOverviewStartState := Value; @@ -985,7 +955,6 @@ function TPreferencesPersist.Clone: IInterface; NewPref.NamedHiliteAttrs := Self.GetNamedHiliteAttrs; NewPref.CustomHiliteColours := Self.GetCustomHiliteColours; NewPref.Warnings := Self.GetWarnings; - NewPref.NewsAge := Self.fNewsAge; NewPref.PageStructures := Self.fPageStructures; NewPref.AutoCheckProgramFrequency := Self.fAutoCheckProgramFrequency; NewPref.AutoCheckDatabaseFrequency := Self.fAutoCheckDatabaseFrequency; @@ -997,8 +966,6 @@ constructor TPreferencesPersist.Create; const // Default margin size in millimeters cPrintPageMarginSizeMM = 25.0; - // Default maximum age of news items - cDefNewsAge = 92; begin inherited Create; @@ -1075,10 +1042,6 @@ constructor TPreferencesPersist.Create; Storage := Settings.ReadSection(ssPreferences, cCodeGenerator); TWarningsPersist.Load(Storage, fWarnings); - // Read news section - Storage := Settings.ReadSection(ssPreferences, cNews); - fNewsAge := Storage.GetInteger('MaxAge', cDefNewsAge); - // Read page structure section Storage := Settings.ReadSection(ssPreferences, cPageStructures); TSnippetPageStructuresPersist.Load(Storage, fPageStructures); @@ -1160,11 +1123,6 @@ destructor TPreferencesPersist.Destroy; Storage := Settings.EmptySection(ssPreferences, cCodeGenerator); TWarningsPersist.Save(Storage, fWarnings); - // Write news section - Storage := Settings.EmptySection(ssPreferences, cNews); - Storage.SetInteger('MaxAge', fNewsAge); - Storage.Save; - // Write page structure section Storage := Settings.EmptySection(ssPreferences, cPageStructures); TSnippetPageStructuresPersist.Save(Storage, fPageStructures); From 9fc4a3227db067459f53e28f05547a89b2960301 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 16:19:43 +0000 Subject: [PATCH 034/714] Removed access to DelphiDabbler.com website. Removed Help | DelphiDabbler Website menu item and associated action. Removed website URL from TWebInfo --- Src/FmMain.dfm | 15 ++------------- Src/FmMain.pas | 3 --- Src/Web.UInfo.pas | 2 -- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 12ac60648..9ba125aba 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -492,14 +492,6 @@ inherited MainForm: TMainForm OnExecute = ActOverviewTabExecute OnUpdate = ActOverviewTabUpdate end - object actWebSite: TBrowseURL - Category = 'Help' - Caption = 'DelphiDabbler Website' - Hint = - 'Visit DelphiDabbler website|Display the DelphiDabbler website in' + - ' the default web browser' - ImageIndex = 6 - end object actHelpQuickStart: TAction Category = 'Help' Caption = 'QuickStart Guide' @@ -1217,14 +1209,11 @@ inherited MainForm: TMainForm object miSpacer3: TMenuItem Caption = '-' end - object miFAQs: TMenuItem - Action = actFAQs - end object miHomePage: TMenuItem Action = actHomePage end - object miWebSite: TMenuItem - Action = actWebSite + object miFAQs: TMenuItem + Action = actFAQs end object miSpacer5: TMenuItem Caption = '-' diff --git a/Src/FmMain.pas b/Src/FmMain.pas index ec0afaf28..30a871da8 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -100,7 +100,6 @@ TMainForm = class(THelpAwareForm) actViewDependencies: TAction; actViewSnippetKinds: TAction; actViewTestUnit: TAction; - actWebSite: TBrowseURL; actWelcome: TAction; alMain: TActionList; appEvents: TApplicationEvents; @@ -200,7 +199,6 @@ TMainForm = class(THelpAwareForm) miViewSnippetKinds: TMenuItem; miViewTestUnit: TMenuItem; miViewAlphabetical: TMenuItem; - miWebSite: TMenuItem; miWelcome: TMenuItem; mnuMain: TMainMenu; pnlBody: TPanel; @@ -1376,7 +1374,6 @@ procedure TMainForm.InitForm; // Initialise actions // Browse actions have to have URLs set dynamically actHomePage.URL := TWebInfo.ProgramHomeURL; - actWebSite.URL := TWebInfo.DelphiDabblerHomeURL; actFAQs.URL := TWebInfo.FAQsURL; actBlog.URL := TWebInfo.BlogURL; // Tree control actions need shortcuts adding dynamically, and state stored diff --git a/Src/Web.UInfo.pas b/Src/Web.UInfo.pas index 493c4253c..bb47ada75 100644 --- a/Src/Web.UInfo.pas +++ b/Src/Web.UInfo.pas @@ -89,8 +89,6 @@ TWebInfo = class(TNoConstructObject) const /// URL of CodeSnip's GitHub page. GitHubURL = 'https://github.com/delphidabbler/codesnip'; - /// URL of home page on DelphiDabbler website. - DelphiDabblerHomeURL = WebsiteURL + '/'; /// URL of home page of the CodeSnip project. ProgramHomeURL = WebsiteURL + '/url/codesnip-home'; /// URL of the online Code Snippets database. From bef6084c310f4633d1b2c1d6dfe28c389788963d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 16:33:11 +0000 Subject: [PATCH 035/714] Changed CodeSnip home page URLs to access GitHub instead of DelphiDabbler.com Renamed Help menu item as "CodeSnip Project On GitHub". Renamed associated action. Changed "Advert" promo on generated units to reference CodeSnip's GitHub project as source of releases --- Src/FmMain.dfm | 10 +++++----- Src/FmMain.pas | 4 ++-- Src/USaveUnitMgr.pas | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 9ba125aba..306171ea2 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -535,12 +535,12 @@ inherited MainForm: TMainForm ImageIndex = 35 OnExecute = actLicenseExecute end - object actHomePage: TBrowseURL + object actGitHubHome: TBrowseURL Category = 'Help' - Caption = 'CodeSnip Home Page' + Caption = 'CodeSnip Project On GitHub' Hint = - 'Codesnip home page|Display CodeSnip'#39's web page in the default we' + - 'b browser' + 'Codesnip GitHub project|Display CodeSnip'#39's GitHub web page in th' + + 'e default web browser' ImageIndex = 6 end object actFindXRefs: TAction @@ -1210,7 +1210,7 @@ inherited MainForm: TMainForm Caption = '-' end object miHomePage: TMenuItem - Action = actHomePage + Action = actGitHubHome end object miFAQs: TMenuItem Action = actFAQs diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 30a871da8..2fba2e846 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -68,7 +68,7 @@ TMainForm = class(THelpAwareForm) actHelpCompChecks: TAction; actHelpContents: TAction; actHelpQuickStart: TAction; - actHomePage: TBrowseURL; + actGitHubHome: TBrowseURL; actImportCode: TAction; actLicense: TAction; actLoadSelection: TAction; @@ -1373,7 +1373,7 @@ procedure TMainForm.InitForm; // Initialise actions // Browse actions have to have URLs set dynamically - actHomePage.URL := TWebInfo.ProgramHomeURL; + actGitHubHome.URL := TWebInfo.GitHubURL; actFAQs.URL := TWebInfo.FAQsURL; actBlog.URL := TWebInfo.BlogURL; // Tree control actions need shortcuts adding dynamically, and state stored diff --git a/Src/USaveUnitMgr.pas b/Src/USaveUnitMgr.pas index b6f41e862..3839a8e02 100644 --- a/Src/USaveUnitMgr.pas +++ b/Src/USaveUnitMgr.pas @@ -123,8 +123,8 @@ implementation + 'selection of source code taken from the Code Snippets Database at %0:s.'; sGenerated = 'Generated on : %0:s.'; sGenerator = 'Generated by : %0:s %1:s.'; - sAdvert = 'The latest version of %0:s is available from the %0:s website ' - + 'at %1:s.'; + sAdvert = 'The latest version of %0:s is available from the CodeSnip GitHub ' + + 'project at %1:s.'; sUserDescription = 'This unit was generated automatically.'; // Output document title sDocTitle = 'Pascal unit generated by %s'; @@ -163,7 +163,7 @@ function TSaveUnitMgr.CreateHeaderComments: IStringList; ); Result.Add(''); Result.Add( - Format(sAdvert, [TAppInfo.ProgramName, TWebInfo.ProgramHomeURL]) + Format(sAdvert, [TAppInfo.ProgramName, TWebInfo.GitHubURL]) ); end else From 8e9d69f8bea334133e0e3081259d2a4b2240a700 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 16:34:58 +0000 Subject: [PATCH 036/714] Deleted unused URL from TWebInfo --- Src/Web.UInfo.pas | 2 -- 1 file changed, 2 deletions(-) diff --git a/Src/Web.UInfo.pas b/Src/Web.UInfo.pas index bb47ada75..95e6b74e0 100644 --- a/Src/Web.UInfo.pas +++ b/Src/Web.UInfo.pas @@ -89,8 +89,6 @@ TWebInfo = class(TNoConstructObject) const /// URL of CodeSnip's GitHub page. GitHubURL = 'https://github.com/delphidabbler/codesnip'; - /// URL of home page of the CodeSnip project. - ProgramHomeURL = WebsiteURL + '/url/codesnip-home'; /// URL of the online Code Snippets database. DatabaseURL = WebsiteURL + '/url/csdb'; /// URL used to make donations towards the CodeSnip project. From 93696d5fce20c257911be02975a181b20dafe495 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 16:53:34 +0000 Subject: [PATCH 037/714] Updated Help menu topic re changes to web links. Removed DelphiDabbler home page menu item. Changed CodeSnip home page menu item to refer to GitHub project Reordered some elements. --- Src/Help/HTML/menu_help.htm | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/Src/Help/HTML/menu_help.htm b/Src/Help/HTML/menu_help.htm index 5a6d44766..db45589b3 100644 --- a/Src/Help/HTML/menu_help.htm +++ b/Src/Help/HTML/menu_help.htm @@ -96,15 +96,16 @@

    Menu icon - FAQs + CodeSnip Project On GitHub - Displays the + Displays the default page of CodeSnip FAQs in the default web browser. + >CodeSnip's GitHub Project in the default web browser. The latest + release of CodeSnip is always published here. @@ -112,35 +113,15 @@

    Menu icon - CodeSnip Home Page + FAQs Displays the CodeSnip Home Page in the default web browser. The latest release - of CodeSnip is always published here first. - - - - - Menu icon - - - DelphiDabbler Website - - - Displays the home page of the - DelphiDabbler web site in the default web browser. The site has - more open source and free software, open source Delphi units, - components and IDE extensions. Several articles on various programming - subjects are also available. + >CodeSnip FAQs in the default web browser. From 67407bf69efaed27aef0849ddef56788163bc738 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 16:53:50 +0000 Subject: [PATCH 038/714] Added TODOs --- Src/CodeSnip.todo | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index a35c44bea..3bd2915ad 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,3 +1,7 @@ +{TODO -cWeb : Review all docs & help file to remove / replace all references to delphidabbler.com} +{TODO -cWeb : +Review help file and remove/replace all references to the DelphiDabbler +mapped URLs of form delphidabbler.com/url/xxxx} {TODO -cFirstRun : Update config file versions: common to 7 and user to 16} {TODO -cPreRelease : Add correct CodeSnip version to Docs\Design\FileFormat\Config.html (currently flagged as 4.###)} {TODO -cPreRelease : Remove -[**dev**] from product and file versions in .vi files before bumping release number} From 9c60e9e662ee7b4653ecfe1eb7dc7b13cce47e56 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 17:02:38 +0000 Subject: [PATCH 039/714] Re-ordered and changed caption/glyphs of some web related Help menu options Removed redundant news glyph --- Src/FmMain.dfm | 12 ++++++------ Src/Help/HTML/menu_help.htm | 22 +++++++++++----------- Src/Help/Images/News.png | Bin 621 -> 0 bytes 3 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 Src/Help/Images/News.png diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 306171ea2..5aed06f74 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -537,7 +537,7 @@ inherited MainForm: TMainForm end object actGitHubHome: TBrowseURL Category = 'Help' - Caption = 'CodeSnip Project On GitHub' + Caption = 'CodeSnip On GitHub' Hint = 'Codesnip GitHub project|Display CodeSnip'#39's GitHub web page in th' + 'e default web browser' @@ -912,11 +912,11 @@ inherited MainForm: TMainForm end object actBlog: TBrowseURL Category = 'Help' - Caption = 'CodeSnip News && Blog...' + Caption = 'CodeSnip News Blog' Hint = 'Display CodeSnip news blog|Display the CodeSnip News Blog in the' + ' default web browser' - ImageIndex = 36 + ImageIndex = 6 end end object mnuMain: TMainMenu @@ -1212,15 +1212,15 @@ inherited MainForm: TMainForm object miHomePage: TMenuItem Action = actGitHubHome end + object miBlog: TMenuItem + Action = actBlog + end object miFAQs: TMenuItem Action = actFAQs end object miSpacer5: TMenuItem Caption = '-' end - object miBlog: TMenuItem - Action = actBlog - end object miDonate: TMenuItem Action = actDonate end diff --git a/Src/Help/HTML/menu_help.htm b/Src/Help/HTML/menu_help.htm index db45589b3..311fd2c01 100644 --- a/Src/Help/HTML/menu_help.htm +++ b/Src/Help/HTML/menu_help.htm @@ -96,7 +96,7 @@

    Menu icon - CodeSnip Project On GitHub + CodeSnip On GitHub Displays the default page of @@ -113,30 +113,30 @@

    Menu icon - FAQs + CodeSnip News Blog - Displays the - CodeSnip FAQs in the default web browser. + >CodeSnip Blog in the default web browser. The latest news about CodeSnip is posted in the blog. - Menu icon + Menu icon - CodeSnip News & Blog + FAQs - Displays the CodeSnip Blog in the default web browser. The latest news about CodeSnip is posted in the blog. + >CodeSnip FAQs in the default web browser. diff --git a/Src/Help/Images/News.png b/Src/Help/Images/News.png deleted file mode 100644 index 843737a1644261079c4b35d0cd9c5c57ed7e225f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 621 zcmV-z0+RiSP)Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy32;bRa{vGf5dZ)S5dnW>Uy%R+02p*dSaefwW^{L9a%BKeVQFr3 zE>1;MAa*k@F)(tnC6WLD0kTO%K~y+Tm6OR%0$~t@d05}Tqi+BqUf_ZWB!Dbo-x-(? zkS)d_>o5T_0c9sJEa6_J+aM|`IG6v@Uv+g?k4AIBS1OgzYPE1d>1heU;cytiU=a0s z{eL3GVv*t5Y=-@Q50}e@N~Lm{2*IIH2$RW#UvjY9?O?H3APB-C-r5KIuke!m}f zyB(281gq5wMnT5a-6O7T&v+e8U@#ak91f2npJAWR2b;~tV=NX6WV2Z;S1NAYRk$By zgvC7cdOZe%!Mi{{pJz++`J7*?)yiWKOethC8T9*oNF4?DA(7$fbb9Qb%jGzt(P)HT zuZL7B#V|RD$Ky~G1(GBokrWuFWq!FBkH>>Xqk+w4gKoErPN%~TX!GrM8?{;ui9~{7 zsyR6~vQ4>Dk*cbYWtl~&YqeTs7r(*>HOe-fPIC&h_3d_xX0r)V6rt1USorL}KvzcH zC_r-N00000NkvXX Hu0mjff2#I_ From fbea653e1c197749e3779ecd0cacfc4642711723 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 17:09:23 +0000 Subject: [PATCH 040/714] Deleted duplicate help index entry --- Src/Help/Index.hhk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Src/Help/Index.hhk b/Src/Help/Index.hhk index 08cce12eb..37459ce04 100644 --- a/Src/Help/Index.hhk +++ b/Src/Help/Index.hhk @@ -123,10 +123,6 @@

    -
  • - - -
  • From cbb9629cc864fc0eec7369a02464ec6cb6ff85a1 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 17:36:28 +0000 Subject: [PATCH 041/714] Added TODO --- Src/IntfNotifier.pas | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/IntfNotifier.pas b/Src/IntfNotifier.pas index aac9bca5b..a37a99b6a 100644 --- a/Src/IntfNotifier.pas +++ b/Src/IntfNotifier.pas @@ -83,6 +83,7 @@ interface /// Displays news items from the CodeSnip news feed. procedure ShowNews; + // TODO -cNotifier: remove this method and remove from external object /// Checks for program updates. procedure CheckForUpdates; From b63f31e4b2152ffe1bfb67775784a6752a20f007 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 17:41:15 +0000 Subject: [PATCH 042/714] Removed facility to check online for program updates. Minimum code was removed to achieve this - some redundant code remains Removed Check For Program Updates menu option from Tools menu. Removed clickable link that checked for program updates from Welcome pane. Removed dialogue box used for manual check Removed thread that checked for program updates. Removed action that triggered user initiated update checks --- Src/CodeSnip.dpr | 3 - Src/CodeSnip.dproj | 5 - Src/FmMain.dfm | 14 --- Src/FmMain.pas | 13 +-- Src/FmProgramUpdatesDlg.dfm | 38 ------- Src/FmProgramUpdatesDlg.pas | 178 --------------------------------- Src/Res/HTML/welcome-tplt.html | 6 -- Src/UDialogMgr.pas | 10 +- Src/UProgramUpdateChecker.pas | 113 --------------------- Src/UUpdateCheckers.pas | 109 +------------------- Src/Web.UProgramUpdateMgr.pas | 177 -------------------------------- 11 files changed, 4 insertions(+), 662 deletions(-) delete mode 100644 Src/FmProgramUpdatesDlg.dfm delete mode 100644 Src/FmProgramUpdatesDlg.pas delete mode 100644 Src/UProgramUpdateChecker.pas delete mode 100644 Src/Web.UProgramUpdateMgr.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index c2e954bb9..9505e418a 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -126,7 +126,6 @@ uses FmPreferencesDlg in 'FmPreferencesDlg.pas' {PreferencesDlg}, FmPreviewDlg in 'FmPreviewDlg.pas' {PreviewDlg}, FmPrintDlg in 'FmPrintDlg.pas' {PrintDlg}, - FmProgramUpdatesDlg in 'FmProgramUpdatesDlg.pas' {ProgramUpdatesDlg}, FmProxyServerDlg in 'FmProxyServerDlg.pas' {ProxyServerDlg}, FmRenameCategoryDlg in 'FmRenameCategoryDlg.pas' {RenameCategoryDlg}, FmSelectionSearchDlg in 'FmSelectionSearchDlg.pas' {SelectionSearchDlg}, @@ -307,7 +306,6 @@ uses UPrintEngine in 'UPrintEngine.pas', UPrintInfo in 'UPrintInfo.pas', UPrintMgr in 'UPrintMgr.pas', - UProgramUpdateChecker in 'UProgramUpdateChecker.pas', UProtocols in 'UProtocols.pas', UQuery in 'UQuery.pas', UREMLDataIO in 'UREMLDataIO.pas', @@ -398,7 +396,6 @@ uses Web.UExceptions in 'Web.UExceptions.pas', Web.UHTTPEx in 'Web.UHTTPEx.pas', Web.UInfo in 'Web.UInfo.pas', - Web.UProgramUpdateMgr in 'Web.UProgramUpdateMgr.pas', Web.UStdWebService in 'Web.UStdWebService.pas', Web.USWAGRESTMgr in 'Web.USWAGRESTMgr.pas'; diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 412315808..6b1b32695 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -210,9 +210,6 @@
    PrintDlg
    - -
    ProgramUpdatesDlg
    -
    ProxyServerDlg
    @@ -512,7 +509,6 @@ - @@ -603,7 +599,6 @@ - diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 5aed06f74..73524d03e 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -853,14 +853,6 @@ inherited MainForm: TMainForm OnExecute = actLoadSelectionExecute OnUpdate = ActNonEmptyDBUpdate end - object actProgramUpdates: TAction - Category = 'Tools' - Caption = 'Check For Program Updates...' - Hint = - 'Check for program updates|Check online for newer versions of Cod' + - 'eSnip' - OnExecute = actProgramUpdatesExecute - end object actCloseUnselectedDetailsTabs: TAction Category = 'View' Caption = 'Close All Other Tabs' @@ -1179,12 +1171,6 @@ inherited MainForm: TMainForm object miSpacer18: TMenuItem Caption = '-' end - object miCheckUpdates: TMenuItem - Action = actProgramUpdates - end - object miSpacer7: TMenuItem - Caption = '-' - end object miReportBug: TMenuItem Action = actBugReport end diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 2fba2e846..49d640170 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -79,7 +79,6 @@ TMainForm = class(THelpAwareForm) actPreviousTab: TAction; actPrint: TAction; actPrivacy: TAction; - actProgramUpdates: TAction; actProxyServer: TAction; actRenameCategory: TAction; actRestoreDatabase: TAction; @@ -112,7 +111,6 @@ TMainForm = class(THelpAwareForm) miAddSnippet: TMenuItem; miBackupDatabase: TMenuItem; miCategories: TMenuItem; - miCheckUpdates: TMenuItem; miCloseAllDetailsTabs: TMenuItem; miCloseDetailsTab: TMenuItem; miCollapseNode: TMenuItem; @@ -174,7 +172,6 @@ TMainForm = class(THelpAwareForm) miSpacer4: TMenuItem; miSpacer5: TMenuItem; miSpacer6: TMenuItem; - miSpacer7: TMenuItem; miSpacer8: TMenuItem; miSpacer10: TMenuItem; miSpacer11: TMenuItem; @@ -380,9 +377,6 @@ TMainForm = class(THelpAwareForm) procedure actPrintUpdate(Sender: TObject); /// Displays the Privacy Statement help topic. procedure actPrivacyExecute(Sender: TObject); - /// Displays the Check For Program Updates dialogue box that - /// displays the availability of any program updates. - procedure actProgramUpdatesExecute(Sender: TObject); /// Displays the Proxy Server Configuration dialogue box that can /// be used to specify a proxy server to use for internet access. procedure actProxyServerExecute(Sender: TObject); @@ -979,11 +973,6 @@ procedure TMainForm.actPrivacyExecute(Sender: TObject); DisplayHelp('PrivacyStatement'); end; -procedure TMainForm.actProgramUpdatesExecute(Sender: TObject); -begin - fDialogMgr.ShowProgramUpdatesDlg; -end; - procedure TMainForm.actProxyServerExecute(Sender: TObject); begin fDialogMgr.ExecProxyServerDlg; @@ -1421,7 +1410,7 @@ procedure TMainForm.InitForm; SetDonateAction(actDonate); SetNewSnippetAction(actAddSnippet); SetNewsAction(actBlog); - SetCheckForUpdatesAction(actProgramUpdates); + // SetCheckForUpdatesAction(actProgramUpdates); SetAboutBoxAction(actAbout); SetShowPrefsPageAction( TActionFactory.CreateShowPrefsPageAction(Self, ActShowPrefsPageExecute) diff --git a/Src/FmProgramUpdatesDlg.dfm b/Src/FmProgramUpdatesDlg.dfm deleted file mode 100644 index 105705105..000000000 --- a/Src/FmProgramUpdatesDlg.dfm +++ /dev/null @@ -1,38 +0,0 @@ -inherited ProgramUpdatesDlg: TProgramUpdatesDlg - Caption = 'Check For Program Updates' - ExplicitWidth = 474 - ExplicitHeight = 374 - PixelsPerInch = 96 - TextHeight = 13 - inherited pnlBody: TPanel - object lblProgram: TLabel - Left = 0 - Top = 0 - Width = 54 - Height = 13 - Caption = 'Please wait' - end - object lblPreReleaseMsg: TLabel - Left = 0 - Top = 50 - Width = 345 - Height = 33 - AutoSize = False - Caption = - 'New preview and beta releases are not reported here - they are a' + - 'nnounced in the CodeSnip news feed.' - Visible = False - WordWrap = True - end - object btnProgUpdate: TButton - Left = 0 - Top = 19 - Width = 129 - Height = 25 - Caption = '&Download Now' - TabOrder = 0 - Visible = False - OnClick = btnProgUpdateClick - end - end -end diff --git a/Src/FmProgramUpdatesDlg.pas b/Src/FmProgramUpdatesDlg.pas deleted file mode 100644 index 52da4a5f4..000000000 --- a/Src/FmProgramUpdatesDlg.pas +++ /dev/null @@ -1,178 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a dialogue box that accesses program update web service and - * reports if a new version of CodeSnip is available. -} - - -unit FmProgramUpdatesDlg; - - -interface - - -uses - // Delphi - StdCtrls, Controls, ExtCtrls, Classes, - // Project - FmGenericViewDlg, UBaseObjects, UProgramUpdateChecker; - - -type - /// Dialogue box that checks if a program update is available and - /// reports the result, providing a link to download any available update. - /// - /// This dialogus box indirectly accesses the CodeSnip program - /// update we service to get the update information. - TProgramUpdatesDlg = class(TGenericViewDlg, INoPublicConstruct) - lblProgram: TLabel; - btnProgUpdate: TButton; - lblPreReleaseMsg: TLabel; - /// Handles form creation event. Creates owned objects. - procedure FormCreate(Sender: TObject); - /// Handles form destruction event. Frees owned objects. - procedure FormDestroy(Sender: TObject); - /// Handles clicks on "Download Now" button by displaying, in the - /// default browser, the web page from where the latest version of CodeSnip - /// can be downloaded. - procedure btnProgUpdateClick(Sender: TObject); - strict private - var - /// Object that checks whether an update is available and - /// provides information about it if so. - fUpdateChecker: TProgramUpdateChecker; - /// Checks if a program update is available and updates the UI - /// according to the result. - procedure CheckProgramUpdates; - strict protected - /// Triggers checks for updates after the forma is displayed. - /// - /// Called from ancestor class. - procedure AfterShowForm; override; - /// Arranges the controls and sizes the dialogue box. - /// Called from ancestor class. - procedure ArrangeForm; override; - /// Initialises form's controls. - /// Called from ancestor class. - procedure InitForm; override; - public - /// Displays the dialogue box, aligned over the given owner - /// control. - /// The check for program updates begins as soon as the dialogue - /// box appears on-screen, without any user interaction being required to - /// start it. - class procedure Execute(AOwner: TComponent); - end; - - -implementation - - -uses - // Delphi - SysUtils, Forms, ExtActns, Graphics, - // Project - UCtrlArranger; - -{$R *.dfm} - - -{ TCheckUpdatesDlg } - -resourcestring - sChecking = 'Checking...'; - sProgNeedsUpdating = 'CodeSnip version %s is available.'; - sProgUpToDate = 'CodeSnip is up to date.'; - -procedure TProgramUpdatesDlg.AfterShowForm; -begin - Screen.Cursor := crHourGlass; - try - CheckProgramUpdates; - finally - Screen.Cursor := crDefault; - end; -end; - -procedure TProgramUpdatesDlg.ArrangeForm; -begin - TCtrlArranger.SetLabelHeight(lblPreReleaseMsg); - TCtrlArranger.MoveBelow(lblProgram, btnProgUpdate, 12); - TCtrlArranger.MoveBelow(lblProgram, lblPreReleaseMsg, 8); - pnlBody.ClientHeight := TCtrlArranger.TotalControlHeight(pnlBody) + 8; - TCtrlArranger.AlignLefts([lblProgram, btnProgUpdate, lblPreReleaseMsg], 0); - pnlBody.Width := TCtrlArranger.TotalControlWidth(pnlBody); - inherited; -end; - -procedure TProgramUpdatesDlg.btnProgUpdateClick(Sender: TObject); -var - BrowseAction: TBrowseURL; // action that displays RSS feed URL in browser -begin - BrowseAction := TBrowseURL.Create(nil); - try - BrowseAction.URL := fUpdateChecker.DownloadURL; - BrowseAction.Execute; - finally - BrowseAction.Free; - end; -end; - -procedure TProgramUpdatesDlg.CheckProgramUpdates; -begin - btnProgUpdate.Visible := False; - lblProgram.Caption := sChecking; - Application.ProcessMessages; - fUpdateChecker.Execute; - if fUpdateChecker.IsUpdateAvailable then - begin - lblProgram.Caption := Format( - sProgNeedsUpdating, [string(fUpdateChecker.LatestVersion)] - ); - btnProgUpdate.Visible := True; - end - else - begin - lblProgram.Caption := sProgUpToDate; - lblPreReleaseMsg.Visible := True; - end; -end; - -class procedure TProgramUpdatesDlg.Execute(AOwner: TComponent); -begin - with InternalCreate(AOwner) do - try - ShowModal; - finally - Free; - end; -end; - -procedure TProgramUpdatesDlg.FormCreate(Sender: TObject); -begin - inherited; - fUpdateChecker := TProgramUpdateChecker.Create('Manual'); -end; - -procedure TProgramUpdatesDlg.FormDestroy(Sender: TObject); -begin - fUpdateChecker.Free; - inherited; -end; - -procedure TProgramUpdatesDlg.InitForm; -begin - inherited; - lblPreReleaseMsg.Font.Color := clGrayText; -end; - -end. - diff --git a/Src/Res/HTML/welcome-tplt.html b/Src/Res/HTML/welcome-tplt.html index dc700f10b..be0a93d46 100644 --- a/Src/Res/HTML/welcome-tplt.html +++ b/Src/Res/HTML/welcome-tplt.html @@ -242,12 +242,6 @@

    onclick="showNews();return false;" >News Blog | - Check For Program Updates - | Displays the Check For Program Updates dialogue box. - procedure ShowProgramUpdatesDlg; - /// Displays the SWAG Import Wizard dialogue box. procedure ShowSWAGImportDlg; end; @@ -162,7 +159,7 @@ implementation // Project FmAboutDlg, FmDBUpdateDlg, FmDependenciesDlg, FmDonateDlg, FmFindCompilerDlg, FmFindTextDlg, FmFindXRefsDlg, FmPreferencesDlg, FmPrintDlg, - FmProgramUpdatesDlg, FmProxyServerDlg, + FmProxyServerDlg, FmSelectionSearchDlg, FmSWAGImportDlg, FmTestCompileDlg, FmUserBugReportDlg, UTestUnitDlgMgr; @@ -242,11 +239,6 @@ procedure TDialogMgr.ShowDonateDlg; TDonateDlg.Execute(Owner); end; -procedure TDialogMgr.ShowProgramUpdatesDlg; -begin - TProgramUpdatesDlg.Execute(Owner); -end; - procedure TDialogMgr.ShowSWAGImportDlg; begin TSWAGImportDlg.Execute(Owner); diff --git a/Src/UProgramUpdateChecker.pas b/Src/UProgramUpdateChecker.pas deleted file mode 100644 index dead98e12..000000000 --- a/Src/UProgramUpdateChecker.pas +++ /dev/null @@ -1,113 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a class that checks if a program update is available and provides - * information about it if so. -} - - -unit UProgramUpdateChecker; - - -interface - - -uses - // Project - UVersionInfo; - - -type - /// Checks if a program update is available and provides information - /// about it if so. - /// This class is a wrapper round the TProgramUpdateMgr class that - /// interacts with the online program update web service. - TProgramUpdateChecker = class(TObject) - private - var - /// Value of CurrentVersion property. - fCurrentVersion: TVersionNumber; - /// Value of LatestVersion property. - fLatestVersion: TVersionNumber; - /// Value of DownloadURL property. - fDownloadURL: string; - /// Information specific to the code using this object. - /// - fCallerInfo: string; - public - /// Constructs a new object instance. - /// string [in] Information about calling code. - /// - constructor Create(const CallerInfo: string); - /// Version number of currently executing program. - property CurrentVersion: TVersionNumber read fCurrentVersion; - /// Version number of latest available program release. - /// Returns 0.0.0.0 if Execute has not been called. - property LatestVersion: TVersionNumber read fLatestVersion; - /// URL from which latest version can be downloaded. - /// This property is the empty string if no update is available or - /// if Execute has not been called. - property DownloadURL: string read fDownloadURL; - /// Informs if an update to the current program is available. - /// - /// Boolean. True if an update is available, False otherwise. - /// - /// Always returns False if Execute has not been called. - function IsUpdateAvailable: Boolean; - /// Checks with web service if a program update is available and - /// sets properties accordingly. - /// Boolean. True if an update is available, False otherwise. - /// - function Execute: Boolean; - end; - - -implementation - - -uses - // Project - UAppInfo, Web.UProgramUpdateMgr; - - -{ TProgramUpdateChecker } - -constructor TProgramUpdateChecker.Create(const CallerInfo: string); -begin - inherited Create; - fCallerInfo := CallerInfo; - fCurrentVersion := TAppInfo.ProgramReleaseVersion; -end; - -function TProgramUpdateChecker.Execute: Boolean; -var - ProgUpdateMgr: TProgramUpdateMgr; -begin - ProgUpdateMgr := TProgramUpdateMgr.Create; - try - ProgUpdateMgr.SignOn(fCallerInfo); - fLatestVersion := ProgUpdateMgr.LatestProgramVersion; - Result := IsUpdateAvailable; - if Result then - fDownloadURL := ProgUpdateMgr.DownloadURL - else - fDownloadURL := ''; - finally - ProgUpdateMgr.Free; - end; -end; - -function TProgramUpdateChecker.IsUpdateAvailable: Boolean; -begin - Result := fCurrentVersion < fLatestVersion; -end; - -end. - diff --git a/Src/UUpdateCheckers.pas b/Src/UUpdateCheckers.pas index 0acf92ed6..aea277fb7 100644 --- a/Src/UUpdateCheckers.pas +++ b/Src/UUpdateCheckers.pas @@ -70,53 +70,6 @@ TUpdateCheckerThread = class abstract(TNotificationRecorderThread) function GetNotification(out N: TNotificationData): Boolean; override; end; -type - /// Thread that checks online to find if a new version of CodeSnip - /// is available. - /// - /// No check is made if the user has switched the automatic program - /// update checking facility off in preferences or if a check has been made - /// within the time period specified by the user. - /// - /// The thread fails silently as if no update is available if any - /// errors occur when accessing the internet or web service. - /// If an update is found a notification containing the details is - /// placed in the notification queue to await display. - /// - TProgramUpdateCheckerThread = class sealed(TUpdateCheckerThread) - strict private - var - /// Action that causes a web page to be displayed from where - /// a program update can be downloaded. - /// This action is executed when the user clicks the 'task - /// button' in any program update notification window. - fDownloadAction: TBrowseURL; - strict protected - /// Returns the frequency of update checks, in days. - /// A return value of zero indicates that no checks should be - /// made. - function UpdateFrequency: Word; override; - /// Returns the name of the value in the 'UpdateChecks' settings - /// section that stores the date the last update check was made. - function LastUpdateSettingsName: string; override; - /// Checks to see if a program update is available and, if so, - /// creates a notification record with details of how to obtain the update. - /// - /// TNotificationData [out] The required notification - /// record if an update is available. Undefined otherwise. - /// Boolean. True if an update is available or False if not. - /// - function DoCheck(out N: TNotificationData): Boolean; override; - public - /// Creates the and initialises the thread instance. - /// Cardinal [in] Number of milliseconds to delay - /// the start of the thread's execution. Passing 0 indicates no delay. - /// Non-zero delays are rounded up to the nearest 1/5th second. - constructor Create(StartDelay: Cardinal = 0); - /// Destroys thread object instance. - destructor Destroy; override; - end; - type /// Thread that checks online to find if a new version of the online /// code snippets database is available. @@ -181,7 +134,7 @@ implementation // Delphi SysUtils, Classes, DateUtils, // Project - FmDBUpdateDlg, UAppInfo, UPreferences, UProgramUpdateChecker, USettings, + FmDBUpdateDlg, UAppInfo, UPreferences, USettings, UDBUpdateMgr, UUtils; @@ -224,64 +177,6 @@ procedure TUpdateCheckerThread.RecordUpdate; Storage.Save; end; -{ TProgramUpdateCheckerThread } - -constructor TProgramUpdateCheckerThread.Create(StartDelay: Cardinal); -begin - inherited Create(StartDelay); - fDownloadAction := TBrowseURL.Create(nil); -end; - -destructor TProgramUpdateCheckerThread.Destroy; -begin - fDownloadAction.Free; - inherited; -end; - -function TProgramUpdateCheckerThread.DoCheck(out N: TNotificationData): Boolean; -resourcestring - sTitle = 'Program Update Available'; - sContent = 'CodeSnip version %s is available for download.'; - sDownloadPrompt = 'Download Now'; -const - HelpKeyword = 'ProgramUpdateNotification'; -var - UpdateChecker: TProgramUpdateChecker; - Content: TArray; - TaskCallback: TProc; -begin - UpdateChecker := TProgramUpdateChecker.Create('Auto'); - try - if not UpdateChecker.Execute then - Exit(False); - fDownloadAction.URL := UpdateChecker.DownloadURL; - Content := TArray.Create( - Format(sContent, [string(UpdateChecker.LatestVersion)]) - ); - TaskCallback := - procedure - begin - fDownloadAction.Execute; - end; - N := TNotificationData.Create( - sTitle, Content, HelpKeyword, TaskCallback, sDownloadPrompt - ); - Result := True; - finally - UpdateChecker.Free; - end; -end; - -function TProgramUpdateCheckerThread.LastUpdateSettingsName: string; -begin - Result := 'LastProgramCheck'; -end; - -function TProgramUpdateCheckerThread.UpdateFrequency: Word; -begin - Result := Preferences.AutoCheckProgramFrequency; -end; - { TDatabaseUpdateCheckerThread } function TDatabaseUpdateCheckerThread.DoCheck( @@ -335,7 +230,7 @@ constructor TUpdateCheckerMgr.Create; inherited Create; fThreads := TThreadGroup.Create; fThreads.Add([ - TProgramUpdateCheckerThread.Create(10000), // begins work after 10s delay +// TProgramUpdateCheckerThread.Create(10000), // begins work after 10s delay TDatabaseUpdateCheckerThread.Create(20000) // begins work after 20s delay ]); fThreads.SetPriorities(tpLowest); diff --git a/Src/Web.UProgramUpdateMgr.pas b/Src/Web.UProgramUpdateMgr.pas deleted file mode 100644 index fdc25886d..000000000 --- a/Src/Web.UProgramUpdateMgr.pas +++ /dev/null @@ -1,177 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2012-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a class that interfaces with a web service that provides - * information about available program updates. -} - - -unit Web.UProgramUpdateMgr; - - -interface - - -uses - // Project - UURIParams, Web.UStdWebService; - - -type - /// Provides an interface to the DelphiDabbler CodeSnip program - /// update web service using the v2 API. - /// This class provides a public method for every command exposed by - /// the web service. - TProgramUpdateMgr = class sealed(TStdWebService) - strict private - const - /// Web service's URL template. - ScriptURLTplt = 'http://codesnip.%s/websvc/prog-update'; - /// User agent sent to web service. - UserAgent = 'CodeSnip'; - /// API version of web service. - ApiVersion = '2'; - /// API key required for all calls to web service. - ApiKey = '9EE3A4D85A2F46F79AE2AAB1012A7678'; - /// Release channel sent to web service. - Channel = '4'; - /// Program edition sent to web service. - {$IFDEF PORTABLE} - Edition = 'portable'; - {$ELSE} - Edition = 'standard'; - {$ENDIF} - strict private - /// Creates and returns a parameters object containing standard - /// parameters that are required on every call to the web service. - /// - /// Callers must free the returned object. - function CreateParams: TURIParams; - /// Adds channel and edition parameters to the given parameters. - /// - procedure AddUpdateStreamParams(Params: TURIParams); - public - /// Creates a new object instance with the correct URL and - /// suitable user agent. - constructor Create; - /// Signs on the the web service. - /// string [in] Specifies from where the web service - /// is called. - procedure SignOn(const Caller: string); - /// Gets the latest version of the program from the web service. - /// - /// The version returned is the latest one for the program edition - /// specified by the Edition constant. - function LatestProgramVersion: string; - /// Gets the URL to use to download the latest version of the - /// program. - /// The URL returned is the correct one for the program edition - /// specified by the Edition constant. - function DownloadURL: string; - end; - - -implementation - - -uses - // Delphi - SysUtils, Classes, - // Project - UAppInfo, UStrUtils, USystemInfo, Web.UInfo; - - -{ TProgramUpdateMgr } - -procedure TProgramUpdateMgr.AddUpdateStreamParams(Params: TURIParams); -begin - Assert(Assigned(Params), ClassName + '.AddUpdateStreamParams: Params is nil'); - Params.Add('channel', Channel); - Params.Add('edition', Edition); -end; - -constructor TProgramUpdateMgr.Create; -begin - inherited Create(TWebServiceInfo.Create(ScriptURLTplt, UserAgent)); -end; - -function TProgramUpdateMgr.CreateParams: TURIParams; -begin - Result := TURIParams.Create; - Result.Add('api', ApiVersion); - Result.Add('key', ApiKey); - Result.Add('prog-id', TAppInfo.ProgramKey); -end; - -function TProgramUpdateMgr.DownloadURL: string; -var - Params: TURIParams; - Response: TStringList; -begin - Params := CreateParams; - try - AddUpdateStreamParams(Params); - Response := TStringList.Create; - try - PostCommand('downloadurl', Params, Response); - Result := StrTrim(Response.Text); - finally - Response.Free; - end; - finally - Params.Free; - end; -end; - -function TProgramUpdateMgr.LatestProgramVersion: string; -var - Params: TURIParams; - Response: TStringList; -begin - Params := CreateParams; - try - AddUpdateStreamParams(Params); - Response := TStringList.Create; - try - PostCommand('version', Params, Response); - Result := StrTrim(Response.Text); - finally - Response.Free; - end; - finally - Params.Free; - end; -end; - -procedure TProgramUpdateMgr.SignOn(const Caller: string); -var - Params: TURIParams; - Response: TStringList; -begin - Params := CreateParams; - try - Params.Add('prog-ver', TAppInfo.ProgramReleaseVersion); - Params.Add('os', SanitiseString(TOSInfo.Description)); - Params.Add('ie-ver', IntToStr(TIEInfo.MajorVersion)); - Params.Add('caller', SanitiseString(Caller)); - Response := TStringList.Create; - try - PostCommand('stats', Params, Response); - // do nothing with response - finally - Response.Free; - end; - finally - Params.Free; - end; -end; - -end. - From 44cf2604723b72d794107456425204960035bfdd Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 17:44:00 +0000 Subject: [PATCH 043/714] Added TODO --- Src/FrUpdatePrefs.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/FrUpdatePrefs.pas b/Src/FrUpdatePrefs.pas index 0bfc2e8bd..d444ba2a9 100644 --- a/Src/FrUpdatePrefs.pas +++ b/Src/FrUpdatePrefs.pas @@ -12,6 +12,8 @@ * the user to set their application and database update preferences. } +{ TODO -cWeb: Remove this frame and all associated prefs once database update + code revised not to use web service. } unit FrUpdatePrefs; From 4d233687c042e2abb3da7a66136a73a85354474c Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 19:45:40 +0000 Subject: [PATCH 044/714] Removed details of program update checking from help and other docs --- Docs/Privacy.txt | 44 ++---------- Docs/ReadMe.txt | 25 ++----- Src/Help/CodeSnip.hhp | 2 - Src/Help/HTML/dlg_programupdates.htm | 87 ------------------------ Src/Help/HTML/menu_tools.htm | 15 ---- Src/Help/HTML/new.htm | 4 +- Src/Help/HTML/notifiy_program_update.htm | 45 ------------ Src/Help/HTML/privacy_statement.htm | 61 +---------------- Src/Help/Index.hhk | 4 -- 9 files changed, 14 insertions(+), 273 deletions(-) delete mode 100644 Src/Help/HTML/dlg_programupdates.htm delete mode 100644 Src/Help/HTML/notifiy_program_update.htm diff --git a/Docs/Privacy.txt b/Docs/Privacy.txt index c614ec02a..36314a8f4 100644 --- a/Docs/Privacy.txt +++ b/Docs/Privacy.txt @@ -68,12 +68,11 @@ CodeSnip may go online for several reasons. They are: 1. Updating the database. 2. Submitting code for inclusion in the main database. - 3. Checking for program updates. - 4. Importing snippets from the SWAG database. - 5. Accessing various websites via hyperlinks and menu options. - 6. Accessing the internet using a proxy server. + 3. Importing snippets from the SWAG database. + 4. Accessing various websites via hyperlinks and menu options. + 5. Accessing the internet using a proxy server. -Some are performed directly by CodeSnip, which communicates with web services +Some are performed directly by CodeSnip, which communicates with web services located on delphidabbler.com using HTTP on port 80. Others simply display web pages in a browser. The last reason passes user information to the proxy server if configured to do so, @@ -145,41 +144,6 @@ Your email address will not be published and is used only to contact you with any queries about the submitted code or its licensing. -Checking for program updates --------------------------------------------------------------------------------- - -This action can be started manually by clicking the "Tools | Check For Program -Updates" menu option. The resulting dialogue box connects to the DelphiDabbler -program update web service. - -CodeSnip may also check for updates automatically, behind the scenes. The same -DelphiDabbler program update web is used in this case. The process usually -happens just after the program has started. You can disable this automatic -checking by using the "Updates" tab of the "Preferences" dialogue box which is -displayed via the "Tools | Preferences" menu option. - -Whichever way the the web service is used the same information is sent, which -is: - - * An API key used permit access to the web service. - * The program's version information. - * The unique 32 digit program key (see Common.config above for details). - * A description of the operating system and version of Internet Explorer - being used. - * An indication of whether the service is being called automatically or - manually. - -This information is recorded in a log file on the DelphiDabbler web server. The -log file is used to gather information about the operating systems and program -versions currently in use and to monitor any web service errors. - -Regardless of the method used to contact the web service, if an update is -available you are given the option to download it. To do this CodeSnip uses your -default web browser to download a zip file containing the update from the -SourceForge website. SourceForge may set cookies on your computer that are -outside CodeSnip's control. - - Importing snippets from the SWAG database ----------------------------------------- diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt index 466dc9c3f..cd8e532f7 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe.txt @@ -253,29 +253,14 @@ copy must be registered separately. Updating the Program ================================================================================ -CodeSnip automatically checks online for available program updates. If it finds -that an update is available it displays a notification window at the bottom -right of the main window. That window has a button you can click that opens your -default browser at a web page that downloads the new version of the program. +Updates are published on: -Once the updated version is downloaded you must close CodeSnip install the -program in the usual way. ++ GitHub: https://github.com/delphidabbler/codesnip/releases -You can change the frequency with which CodeSnip checks for updates, or turn off -the feature, from the "Updates" tab of the "Preferences" dialogue box. You can -display this dialogue box from the "Tools | Preferences" menu option. ++ SourceForge: https://sourceforge.net/projects/codesnip/files/ -You can also check for program updates manually at any time from the "Tools | -Check For Program Updates" menu option. Once again you will be directed to a web -page from where the updated program can be downloaded. - -Neither of the above methods will detect beta and preview releases of the -program. To find out about those you should check the CodeSnip Blog at -http://codesnip-app.blogspot.com/ or check the available releases on the -CodeSnip GitHub. - -NOTE: You may need to configure your firewall to permit CodeSnip to access the -internet otherwise the automatic updating may not work. +News of new updates is published on the CodeSnip Blog: +http://codesnip-app.blogspot.com/. Known Installation and Upgrading Issues diff --git a/Src/Help/CodeSnip.hhp b/Src/Help/CodeSnip.hhp index b01ea4c32..838cf7020 100644 --- a/Src/Help/CodeSnip.hhp +++ b/Src/Help/CodeSnip.hhp @@ -52,7 +52,6 @@ HTML\dlg_prefs_printing.htm HTML\dlg_prefs_snippetlayout.htm HTML\dlg_prefs_sourcecode.htm HTML\dlg_print.htm -HTML\dlg_programupdates.htm HTML\dlg_proxyserver.htm HTML\dlg_renamecategory.htm HTML\dlg_restore.htm @@ -112,7 +111,6 @@ HTML\dlg_moveuserdb.htm HTML\dlg_savehiliter.htm HTML\dlg_hilitemgr.htm HTML\dlg_prefs_updates.htm -HTML\notifiy_program_update.htm HTML\notifiy_database_update.htm HTML\dlg_dependencies_edit.htm HTML\about_swag.htm diff --git a/Src/Help/HTML/dlg_programupdates.htm b/Src/Help/HTML/dlg_programupdates.htm deleted file mode 100644 index 0d267fbcc..000000000 --- a/Src/Help/HTML/dlg_programupdates.htm +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - Check For Program Updates Dialogue Box - - - - - - - - -

    - - Check For Program Updates Dialogue Box -

    -

    - This dialogue box is displayed when the Tools | Check For Program - Updates menu option is selected. -

    -

    - As soon as the dialogue box appears the DelphiDabbler web site is - contacted to find out if any new versions of CodeSnip are - available. "Checking..." is displayed while this is in progress. -

    -

    - If a new version is available then a button is displayed that, when - clicked, uses your default web browser to download a zip file containing - the latest version of CodeSnip. You can then - close CodeSnip and install the updated program from the installer - contained in the zip file. -

    -

    - If there is no new version, a message is displayed to - that effect. -

    -

    - Notes: -

    -

    - † Should a download fail you can also get the latest version from - CodeSnip's download web page. -

    -

    - ‡ Only stable releases of CodeSnip are made available via - this dialogue box. If you are interested trying any pre-release or beta - versions, please check the CodeSnip Releases page on GitHub which lists all releases. -

    -

    - By default CodeSnip performs a check for program updates - automatically from time to time. A pop-up notification window is displayed - in the main window if an update is available. The notification includes - a button that causes the update to be downloaded via the default browser, - in an exactly similar way to this dialogue box. You can switch this - automatic checking feature off, or change the frequency with which checks - are made, by using the Updates tab of the Preferences dialogue box. -

    - - diff --git a/Src/Help/HTML/menu_tools.htm b/Src/Help/HTML/menu_tools.htm index 0eaae38a0..e4fa1a6cf 100644 --- a/Src/Help/HTML/menu_tools.htm +++ b/Src/Help/HTML/menu_tools.htm @@ -79,21 +79,6 @@

    >Proxy Server Configuration dialogue box that is displayed. - - -   - - - Check For Program Updates - - - Checks if an updated version of CodeSnip is available. - The Check For Program Updates dialogue box is displayed which checks - online for any updates and reports if one is available. - -
  • [v4.4] CodeSnip now automatically checks - online for any program or online Code Snippets Database updates and + online for any online Code Snippets Database updates and shows a small notification window at the bottom right of the main - window if such an update is available. Both notifications display a + window if such an update is available. Notifications display a button that can be used to download the relevant update.
    diff --git a/Src/Help/HTML/notifiy_program_update.htm b/Src/Help/HTML/notifiy_program_update.htm deleted file mode 100644 index e525ccf49..000000000 --- a/Src/Help/HTML/notifiy_program_update.htm +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - Program Update Notification Window - - - - - - - -

    - Program Update Notification Window -

    -

    - This notification window appears when CodeSnip has detected that - an update to the program is available. -

    -

    - You can click the Download Now button to open a web page in your - default browser from where you can download the program update. -

    -

    - Clicking the down facing arrow at the top right of the window closes the - notification. If you don't use the button, the window disappear roughly - 20 seconds after it appears. -

    - - diff --git a/Src/Help/HTML/privacy_statement.htm b/Src/Help/HTML/privacy_statement.htm index 71ec83762..4dd81eaae 100644 --- a/Src/Help/HTML/privacy_statement.htm +++ b/Src/Help/HTML/privacy_statement.htm @@ -110,9 +110,6 @@

  • Submitting code for inclusion in the main database.
  • -
  • - Checking for program updates. -
  • Importing snippets from the SWAG database.
  • @@ -124,10 +121,10 @@

  • - The first six actions are performed directly by CodeSnip, + The first three actions are performed directly by CodeSnip, which communicates with web services located on delphidabbler.com - using HTTP on port 80. The seventh action simply displays web pages in a - browser. The eighth passes user information to the proxy server. + using HTTP on port 80. The fourth action simply displays web pages in a + browser. The fifth passes user information to the proxy server.

    Personal data will neither be published on the DelphiDabbler website nor @@ -239,58 +236,6 @@

    used only to contact you with any queries about the submitted code or its licensing.

    -

    - Checking for program updates -

    -

    - This action can be started manually by clicking the "Tools | Check - For Program Updates" menu option. The resulting dialogue box connects - to the DelphiDabbler program update web service. -

    -

    - CodeSnip may also check for updates automatically, behind the - scenes. The same DelphiDabbler program update web is used in this case. - The process usually happens just after the program has started. You can - disable this automatic checking by using the "Updates" tab of - the "Preferences" dialogue box which is displayed via the - "Tools | Preferences" menu option. -

    -

    - Whichever way the the web service is used the same information is sent, - which is: -

    -
      -
    • - An API key used permit access to the web service. -
    • -
    • - The program's version information. -
    • -
    • - The unique 32 digit program key (see Common.config above for details). -
    • -
    • - A description of the operating system and version of Internet Explorer - being used. -
    • -
    • - An indication of whether the service is being called automatically or - manually. -
    • -
    -

    - This information is recorded in a log file on the DelphiDabbler web - server. The log file is used to gather information about the operating - systems and program versions currently in use and to monitor any web - service errors. -

    -

    - Regardless of the method used to contact the web service, if an update is - available you are given the option to download it. To do this CodeSnip - uses your default web browser to download a zip file containing the update - from the SourceForge website. SourceForge may set cookies on your computer - that are outside CodeSnip's control. -

    Importing snippets from the SWAG database

    diff --git a/Src/Help/Index.hhk b/Src/Help/Index.hhk index 37459ce04..f8bd3f495 100644 --- a/Src/Help/Index.hhk +++ b/Src/Help/Index.hhk @@ -41,10 +41,6 @@
    -
  • - - -
  • From fadfd5a0cf326bd504cb9c4f836ad336f3241004 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 6 Feb 2020 20:18:39 +0000 Subject: [PATCH 045/714] Removed reference to program update frequency in Welcome page --- Src/Res/HTML/welcome-tplt.html | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Src/Res/HTML/welcome-tplt.html b/Src/Res/HTML/welcome-tplt.html index be0a93d46..cc8a36d04 100644 --- a/Src/Res/HTML/welcome-tplt.html +++ b/Src/Res/HTML/welcome-tplt.html @@ -153,18 +153,9 @@

    Update Checks
    - CodeSnip can check automatically for program and Code - Snippets database updates. Your current settings are: -
      -
    • - Program updates: - <%ProgramAutoCheckFrequency%> -
    • -
    • - Code Snippets database updates: - <%DatabaseAutoCheckFrequency%> -
    • -
    + CodeSnip can check automatically for Code + Snippets database updates. Your current settings are that + Code Snippets database updates are <%DatabaseAutoCheckFrequency%>.
    Date: Fri, 7 Feb 2020 02:25:07 +0000 Subject: [PATCH 046/714] Removed support for submitting code to online database via webservice. Removed code submit dialogue box unit Removed code submit web service unit Removed code submit action and menu item from Snippets menu --- Src/UCodeImportExport.pas | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/UCodeImportExport.pas b/Src/UCodeImportExport.pas index c5e99f2be..fee93b699 100644 --- a/Src/UCodeImportExport.pas +++ b/Src/UCodeImportExport.pas @@ -110,6 +110,7 @@ TCodeImporter = class(TNoPublicConstructObject) ECodeImporter = class(ECodeSnipXML); type + // TODO -cRefactor: Decide if we still need to export user info /// Exports code snippets and user info to XML. TCodeExporter = class(TNoPublicConstructObject) strict private From 1a0390ade39051282b50b9ac2dbb1b2b0052b347 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 7 Feb 2020 02:25:52 +0000 Subject: [PATCH 047/714] Revert "Removed support for submitting code to online database via webservice." This reverts commit 0980abb8721d8132e14cd38aa9955a0e63833b61. --- Src/UCodeImportExport.pas | 1 - 1 file changed, 1 deletion(-) diff --git a/Src/UCodeImportExport.pas b/Src/UCodeImportExport.pas index fee93b699..c5e99f2be 100644 --- a/Src/UCodeImportExport.pas +++ b/Src/UCodeImportExport.pas @@ -110,7 +110,6 @@ TCodeImporter = class(TNoPublicConstructObject) ECodeImporter = class(ECodeSnipXML); type - // TODO -cRefactor: Decide if we still need to export user info /// Exports code snippets and user info to XML. TCodeExporter = class(TNoPublicConstructObject) strict private From 9094685f015c03d70718c4a4c463bb7017b3e11d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 7 Feb 2020 02:27:29 +0000 Subject: [PATCH 048/714] Removed support for submitting code to online database via webservice. Removed code submit dialogue box unit Removed code submit web service unit Removed code submit action and menu item from Snippets menu --- Src/CodeSnip.dpr | 2 - Src/CodeSnip.dproj | 4 - Src/FmCodeSubmitDlg.dfm | 277 -------------------- Src/FmCodeSubmitDlg.pas | 507 ------------------------------------- Src/FmMain.dfm | 15 -- Src/FmMain.pas | 12 +- Src/UCodeShareMgr.pas | 16 +- Src/Web.UCodeSubmitter.pas | 88 ------- 8 files changed, 2 insertions(+), 919 deletions(-) delete mode 100644 Src/FmCodeSubmitDlg.dfm delete mode 100644 Src/FmCodeSubmitDlg.pas delete mode 100644 Src/Web.UCodeSubmitter.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 9505e418a..d3e7475cc 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -94,7 +94,6 @@ uses FmCategoryEditDlg in 'FmCategoryEditDlg.pas' {CategoryEditDlg}, FmCodeExportDlg in 'FmCodeExportDlg.pas' {CodeExportDlg}, FmCodeImportDlg in 'FmCodeImportDlg.pas' {CodeImportDlg}, - FmCodeSubmitDlg in 'FmCodeSubmitDlg.pas' {CodeSubmitDlg}, FmCompErrorDlg in 'FmCompErrorDlg.pas' {CompErrorDlg}, FmCompilersDlg in 'FmCompilersDlg.pas' {CompilersDlg}, FmCompilersDlg.FrBase in 'FmCompilersDlg.FrBase.pas' {CompilersDlgBaseFrame: TFrame}, @@ -390,7 +389,6 @@ uses UXMLDocumentEx in 'UXMLDocumentEx.pas', Web.UBaseWebService in 'Web.UBaseWebService.pas', Web.UCharEncodings in 'Web.UCharEncodings.pas', - Web.UCodeSubmitter in 'Web.UCodeSubmitter.pas', Web.UDBDownloadMgr in 'Web.UDBDownloadMgr.pas', Web.UDownloadMonitor in 'Web.UDownloadMonitor.pas', Web.UExceptions in 'Web.UExceptions.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 6b1b32695..9333ca7f2 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -112,9 +112,6 @@
    CodeImportDlg
    - -
    CodeSubmitDlg
    -
    CompErrorDlg
    @@ -593,7 +590,6 @@ - diff --git a/Src/FmCodeSubmitDlg.dfm b/Src/FmCodeSubmitDlg.dfm deleted file mode 100644 index b45f70970..000000000 --- a/Src/FmCodeSubmitDlg.dfm +++ /dev/null @@ -1,277 +0,0 @@ -inherited CodeSubmitDlg: TCodeSubmitDlg - Caption = 'Code Submission Wizard' - ExplicitWidth = 565 - ExplicitHeight = 435 - PixelsPerInch = 96 - TextHeight = 13 - inherited pnlBody: TPanel - inherited pcWizard: TPageControl - ActivePage = tsFinished - object tsIntro: TTabSheet - Caption = 'tsIntro' - TabVisible = False - inline frmIntro: TFixedHTMLDlgFrame - Left = 0 - Top = 0 - Width = 369 - Height = 238 - Align = alClient - TabOrder = 0 - TabStop = True - ExplicitWidth = 369 - inherited pnlBrowser: TPanel - Width = 369 - Height = 238 - inherited wbBrowser: TWebBrowser - Width = 369 - Height = 238 - ControlData = { - 4C00000023260000991800000000000000000000000000000000000000000000 - 000000004C000000000000000000000001000000E0D057007335CF11AE690800 - 2B2E126208000000000000004C0000000114020000000000C000000000000046 - 8000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000100000000000000000000000000000000000000} - end - end - end - end - object tsSnippets: TTabSheet - Caption = 'tsSnippets' - ImageIndex = 1 - TabVisible = False - object lblSnippets: TLabel - Left = 0 - Top = 8 - Width = 198 - Height = 13 - Caption = '&Select the snippet(s) you want to submit:' - FocusControl = frmSnippets - end - object lblSnippetPrompt: TLabel - Left = 0 - Top = 221 - Width = 221 - Height = 13 - Caption = 'One or more snippets must be selected' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - Visible = False - end - inline frmSnippets: TSelectUserSnippetsFrame - Left = 0 - Top = 32 - Width = 369 - Height = 180 - TabOrder = 0 - TabStop = True - ExplicitTop = 32 - ExplicitWidth = 369 - ExplicitHeight = 180 - inherited tvChecked: TTreeView - Width = 369 - Height = 180 - ExplicitWidth = 369 - ExplicitHeight = 180 - end - end - end - object tsUserInfo: TTabSheet - Caption = 'tsUserInfo' - ImageIndex = 2 - TabVisible = False - object lblName: TLabel - Left = 0 - Top = 8 - Width = 31 - Height = 13 - Caption = '&Name:' - FocusControl = edName - end - object lblEmail: TLabel - Left = 0 - Top = 43 - Width = 70 - Height = 13 - Caption = '&Email Address:' - FocusControl = edEMail - end - object lblComments: TLabel - Left = 0 - Top = 104 - Width = 79 - Height = 13 - Caption = 'Your &Comments:' - FocusControl = edComments - end - object edName: TEdit - Left = 88 - Top = 3 - Width = 185 - Height = 21 - TabOrder = 0 - end - object edEMail: TEdit - Left = 88 - Top = 40 - Width = 185 - Height = 21 - TabOrder = 1 - end - object edComments: TMemo - Left = 0 - Top = 123 - Width = 369 - Height = 112 - TabOrder = 3 - end - inline frmPrivacy: TFixedHTMLDlgFrame - Left = 0 - Top = 69 - Width = 369 - Height = 5 - TabOrder = 2 - TabStop = True - ExplicitTop = 69 - ExplicitWidth = 369 - ExplicitHeight = 5 - inherited pnlBrowser: TPanel - Width = 369 - Height = 5 - ExplicitWidth = 369 - ExplicitHeight = 18 - inherited wbBrowser: TWebBrowser - Width = 369 - Height = 5 - TabStop = False - ExplicitTop = -2 - ExplicitWidth = 369 - ExplicitHeight = 18 - ControlData = { - 4C00000023260000840000000000000000000000000000000000000000000000 - 000000004C000000000000000000000001000000E0D057007335CF11AE690800 - 2B2E126208000000000000004C0000000114020000000000C000000000000046 - 8000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000100000000000000000000000000000000000000} - end - end - end - end - object tsLicense: TTabSheet - Caption = 'tsLicense' - ImageIndex = 5 - TabVisible = False - ExplicitLeft = 8 - ExplicitTop = 11 - object chkAgreeLicense: TCheckBox - Left = 3 - Top = 200 - Width = 363 - Height = 17 - Caption = 'I confirm my &agreement with statements 1 and 2 above' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - inline frmLicenseTerms: TFixedHTMLDlgFrame - Left = 0 - Top = 0 - Width = 369 - Height = 169 - TabOrder = 1 - TabStop = True - ExplicitWidth = 369 - ExplicitHeight = 169 - inherited pnlBrowser: TPanel - Width = 369 - Height = 169 - inherited wbBrowser: TWebBrowser - Width = 369 - Height = 169 - ControlData = { - 4C00000023260000771100000000000000000000000000000000000000000000 - 000000004C000000000000000000000001000000E0D057007335CF11AE690800 - 2B2E126208000000000000004C0000000114020000000000C000000000000046 - 8000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000100000000000000000000000000000000000000} - end - end - end - end - object tsSubmit: TTabSheet - Caption = 'tsSubmit' - ImageIndex = 4 - TabVisible = False - ExplicitLeft = 0 - object btnPreview: TButton - Left = 136 - Top = 164 - Width = 98 - Height = 25 - Caption = '&Preview Data...' - TabOrder = 0 - OnClick = btnPreviewClick - end - inline frmSubmit: TFixedHTMLDlgFrame - Left = 0 - Top = 0 - Width = 366 - Height = 145 - TabOrder = 1 - TabStop = True - ExplicitWidth = 366 - ExplicitHeight = 145 - inherited pnlBrowser: TPanel - Width = 366 - Height = 145 - inherited wbBrowser: TWebBrowser - Width = 366 - Height = 145 - ControlData = { - 4C000000D4250000FC0E00000000000000000000000000000000000000000000 - 000000004C000000000000000000000001000000E0D057007335CF11AE690800 - 2B2E126208000000000000004C0000000114020000000000C000000000000046 - 8000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000100000000000000000000000000000000000000} - end - end - end - end - object tsFinished: TTabSheet - Caption = 'tsFinished' - ImageIndex = 3 - TabVisible = False - inline frmFinished: TFixedHTMLDlgFrame - Left = 0 - Top = 0 - Width = 369 - Height = 238 - Align = alClient - TabOrder = 0 - TabStop = True - inherited pnlBrowser: TPanel - Width = 369 - Height = 238 - inherited wbBrowser: TWebBrowser - Width = 369 - Height = 238 - ControlData = { - 4C00000023260000991800000000000000000000000000000000000000000000 - 000000004C000000000000000000000001000000E0D057007335CF11AE690800 - 2B2E126208000000000000004C0000000114020000000000C000000000000046 - 8000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000100000000000000000000000000000000000000} - end - end - end - end - end - end -end diff --git a/Src/FmCodeSubmitDlg.pas b/Src/FmCodeSubmitDlg.pas deleted file mode 100644 index e132564e7..000000000 --- a/Src/FmCodeSubmitDlg.pas +++ /dev/null @@ -1,507 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2008-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a wizard dialogue box that gathers data about and submits a user's - * code submission for inclusion in the database. -} - - -unit FmCodeSubmitDlg; - - -interface - - -uses - // Delphi - StdCtrls, Forms, ComCtrls, Controls, ExtCtrls, Classes, - // Project - DB.USnippet, FmWizardDlg, FrBrowserBase, FrCheckedTV, FrFixedHTMLDlg, - FrHTMLDlg, FrSelectSnippetsBase, FrSelectUserSnippets, UBaseObjects, - UEncodings, UExceptions; - - -type - - { - TCodeSubmitDlg: - Implements a wizard dialog that gathers data about and submits a user's - code submission for inclusion in the database. - } - TCodeSubmitDlg = class(TWizardDlg, INoPublicConstruct) - btnPreview: TButton; - edComments: TMemo; - edEMail: TEdit; - edName: TEdit; - frmSnippets: TSelectUserSnippetsFrame; - lblComments: TLabel; - lblEmail: TLabel; - lblName: TLabel; - lblSnippetPrompt: TLabel; - lblSnippets: TLabel; - tsFinished: TTabSheet; - tsIntro: TTabSheet; - tsSnippets: TTabSheet; - tsUserInfo: TTabSheet; - tsSubmit: TTabSheet; - frmPrivacy: TFixedHTMLDlgFrame; - tsLicense: TTabSheet; - chkAgreeLicense: TCheckBox; - frmLicenseTerms: TFixedHTMLDlgFrame; - frmIntro: TFixedHTMLDlgFrame; - frmSubmit: TFixedHTMLDlgFrame; - frmFinished: TFixedHTMLDlgFrame; - procedure btnPreviewClick(Sender: TObject); - strict private - var - fData: TEncodedData; // Contains submission as XML document - procedure SelectSnippet(const Snippet: TSnippet); - {Selects the specified snippet in the check list of snippets or clears - selections. - @param Snippet [in] Snippet to be selected in the list. If Snippet is - nil then list is cleared of selections. - } - procedure SnippetListChange(Sender: TObject); - {Handles change events in list of snippets. Updates state of button on - snippet page and display of prompt if there is an error. - @param Sender [in] Not used. - } - procedure FocusFirstControl(const PageIdx: Integer); - {Focusses first control on page if necessary. - @param ParamIdx [in] Index of page for which focus is required. - } - procedure ValidatePage(PageIdx: Integer); - {Validates user entries on wizard pages. - @param PageIdx [in] Index of page to be validated. - @except Raises EDataEntry exceptions with reference to relevant when an - error is encountered. - } - procedure BuildSubmission; - {Builds XML document containing details of submission and stores in a - stream. - } - procedure DoSubmit; - {Attempts to submit the XML code to the DelphiDabbler website. - @except ECodeSubmitDlg raised on web service or script errors. - } - procedure SaveUserData; - {Saves content of some wizard controls to persistent storage. - } - strict protected - procedure ArrangeForm; override; - {Aligns controls vertically where necessary to accomodate height of - controls that depend on UI font. - } - procedure ConfigForm; override; - {Loads required HTML into HTML frame and modified fonts where required. - } - procedure InitForm; override; - {Initialises some wizard controls from persistent data. - } - function HeadingText(const PageIdx: Integer): string; override; - {Gets text to be displayed in a wizard page. - @param PageIdx [in] Page for which heading is required. - @return The required heading. - } - procedure UpdateButtons(const PageIdx: Integer); override; - {Updates wizard buttons depending on current page and state. - @param PageIdx [in] Index of current page. - } - procedure MoveForward(const PageIdx: Integer; var CanMove: Boolean); - override; - {Called when about to move forward to a new page. Prevents movement if - there is an error on the current page. Handles entry errors by refocussing - control where error occured. - @param PageIdx [in] Index of page we are about move to. - @param CanMove [in/out] Flag indicating whether page change is allowed. - Defaults to true. - } - procedure BeginPage(const PageIdx: Integer); override; - {Called when a wizard page is first displayed. Focusses first control and - performs any action required. - @param PageIdx [in] Index of page to be initialised. - } - constructor InternalCreate(AOwner: TComponent); override; - {Protected class constructor. Initialise objects required by this wizard. - } - public - class procedure Execute(const AOwner: TComponent; const Snippet: TSnippet); - {Excutes code submission dialog box. Submits code snippet to DelphiDabbler - web service if user OKs. - @param AOwner [in] Component that owns and parent's dialog box. - @param Snippet [in] Reference to any snippet to be selected in snippets - list. If nil nothing is selected. - } - end; - - { - ECodeSubmitDlg: - Class of exception raised by errors in TCodeSubmitDlg. - } - ECodeSubmitDlg = class(ECodeSnip); - - -implementation - - -uses - // Delphi - Graphics, - // Project - FmPreviewDlg, UCodeImportExport, UConsts, UCtrlArranger, UEmailHelper, - UFontHelper, UMessageBox, UStrUtils, UUserDetails, UUserDetailsPersist, - Web.UCodeSubmitter, Web.UExceptions; - - -{$R *.dfm} - -const - // Indices of wizard pages - cIntroPageIdx = 0; - cSnippetsPageIdx = 1; - cUserInfoPageIdx = 2; - cLicensePageIdx = 3; - cSubmitPageIdx = 4; - cFinishPageIdx = 5; - - -{ TCodeSubmitDlg } - -procedure TCodeSubmitDlg.ArrangeForm; - {Aligns controls vertically where necessary to accomodate height of controls - that depend on UI font. - } -begin - inherited; - TCtrlArranger.SetLabelHeights(Self); - // tsIntro - { nothing to do } - // tsSnippets - lblSnippetPrompt.Top := tsSnippets.Height - lblSnippetPrompt.Height - 0; - frmSnippets.Top := TCtrlArranger.BottomOf(lblSnippets, 4); - frmSnippets.Height := lblSnippetPrompt.Top - frmSnippets.Top - 8; - // tsUserInfo - frmPrivacy.Top := TCtrlArranger.BottomOf(edEmail, 8); - frmPrivacy.Height := frmPrivacy.DocHeight; - lblComments.Top := TCtrlArranger.BottomOf(frmPrivacy, 8); - edComments.Top := TCtrlArranger.BottomOf(lblComments, 4); - edComments.Height := tsUserInfo.Height - edComments.Top; - // tsLicense - frmLicenseTerms.Left := 0; - frmLicenseTerms.Top := 0; - frmLicenseTerms.Width := tsLicense.ClientWidth; - frmLicenseTerms.Height := frmLicenseTerms.DocHeight; - chkAgreeLicense.Top := TCtrlArranger.BottomOf(frmLicenseTerms, 16); - // tsSubmit - frmSubmit.Left := 0; - frmSubmit.Top := 0; - frmSubmit.Width := tsSubmit.ClientWidth; - frmSubmit.Height := frmSubmit.DocHeight; - btnPreview.Top := TCtrlArranger.BottomOf(frmSubmit, 8); - TCtrlArranger.AlignHCentresTo([frmSubmit], [btnPreview]); - // tsFinished - { nothing to do } -end; - -procedure TCodeSubmitDlg.BeginPage(const PageIdx: Integer); - {Called when a wizard page is first displayed. Focusses first control and - performs any action required. - @param PageIdx [in] Index of page to be initialised. - } -begin - FocusFirstControl(PageIdx); - case PageIdx of - cSubmitPageIdx: BuildSubmission; - cFinishPageIdx: SaveUserData; - end; -end; - -procedure TCodeSubmitDlg.btnPreviewClick(Sender: TObject); - {Handles Preview button click event. Displays XML data to be submitted in a - preview dialog box. - @param Sender [in] Not used. - } -begin - TPreviewDlg.Execute(Self, fData, dtPlainText); -end; - -procedure TCodeSubmitDlg.BuildSubmission; - {Builds XML document containing details of submission and stores in a stream. - } -begin - Assert(not frmSnippets.SelectedSnippets.IsEmpty, - ClassName + '.BuildSubmission: No snippets selected'); - Assert(edName.Text <> '', - ClassName + '.BuildSubmission: No user name provided'); - Assert(IsValidEmailAddress(StrTrim(edEmail.Text)), - ClassName + '.BuildSubmission: Invalid or no email address specified'); - // Build the document - fData := TCodeExporter.ExportSnippets( - TUserInfo.Create( - TUserDetails.Create(edName.Text, edEmail.Text), - StrTrim(edComments.Text) - ), - frmSnippets.SelectedSnippets - ); -end; - -procedure TCodeSubmitDlg.ConfigForm; - {Loads required HTML into HTML frame and modified fonts where required. - } -begin - inherited; - pcWizard.ActivePage := tsFinished; - frmFinished.Initialise('dlg-codesubmit-finished.html'); - pcWizard.ActivePage := tsSubmit; - frmSubmit.Initialise('dlg-codesubmit-submit.html'); - pcWizard.ActivePage := tsLicense; - frmLicenseTerms.Initialise('dlg-codesubmit-license.html'); - pcWizard.ActivePage := tsUserInfo; - frmPrivacy.Initialise('frm-emailprivacy.html'); - pcWizard.ActivePage := tsIntro; - frmIntro.Initialise('dlg-codesubmit-intro.html'); - - frmSnippets.CanCollapse := True; - - TFontHelper.SetDefaultBaseFonts( - [chkAgreeLicense.Font, lblSnippetPrompt.Font] - ); -end; - -procedure TCodeSubmitDlg.DoSubmit; - {Attempts to submit the XML code to the DelphiDabbler website. - @except ECodeSubmitDlg raised on web service or script errors. - } -resourcestring - // Web service / server error meesage - sWebServerError = 'Submission failed because web server reported ' - + 'HTTP Error %0:d: %1:s'; -var - WebSvc: TCodeSubmitter; // communicates with web service -begin - try - // Do the submission - WebSvc := TCodeSubmitter.Create; - try - Screen.Cursor := crHourglass; - Enabled := False; - // POST the data - WebSvc.SubmitData(fData.Data); - finally - WebSvc.Free; - Enabled := True; - Screen.Cursor := crDefault; - end; - except - // handle any exceptions from submission: we convert expected exceptions to - // ECodeSubmitDlg to save triggering this dialog again: others are re-raised - on E: EHTTPError do - // error on web server: make more friendly - raise ECodeSubmitDlg.CreateFmt( - sWebServerError, [E.HTTPErrorCode, StrTrim(E.Message)] - ); - end; -end; - -class procedure TCodeSubmitDlg.Execute(const AOwner: TComponent; - const Snippet: TSnippet); - {Excutes code submission dialog box. Submits code snippet to DelphiDabbler - web service if user OKs. - @param AOwner [in] Component that owns and parent's dialog box. - @param Snippet [in] Reference to any snippet to be selected in snippets - list. If nil nothing is selected. - } -begin - with InternalCreate(AOwner) do - try - SelectSnippet(Snippet); - ShowModal; - finally - Free; - end; -end; - -procedure TCodeSubmitDlg.FocusFirstControl(const PageIdx: Integer); - {Focusses first control on page if necessary. - @param ParamIdx [in] Index of page for which focus is required. - } -begin - case PageIdx of - cSnippetsPageIdx: frmSnippets.SetFocus; - cUserInfoPageIdx: edName.SetFocus; - end; -end; - -function TCodeSubmitDlg.HeadingText(const PageIdx: Integer): string; - {Gets text to be displayed in a wizard page. - @param PageIdx [in] Page for which heading is required. - @return The required heading. - } -resourcestring - // Pages headings - sIntroHeading = 'Submit code to the online database'; - sSnippetsHeading = 'Select snippets'; - sUserInfoHeading = 'About you'; - sLicenseHeading = 'License agreement'; - sSubmitHeading = 'Ready to submit'; - sFinishHeading = 'Submission complete'; -begin - case PageIdx of - cIntroPageIdx: Result := sIntroHeading; - cSnippetsPageIdx: Result := sSnippetsHeading; - cUserInfoPageIdx: Result := sUserInfoHeading; - cLicensePageIdx: Result := sLicenseHeading; - cSubmitPageIdx: Result := sSubmitHeading; - cFinishPageIdx: Result := sFinishHeading; - end; -end; - -procedure TCodeSubmitDlg.InitForm; - {Initialises some wizard controls from persistent data. - } -var - UserDetails: TUserDetails; // user details from settings -begin - inherited; - UserDetails := TUserDetailsPersist.Load; - edName.Text := UserDetails.Name; - edEmail.Text := UserDetails.Email; -end; - -constructor TCodeSubmitDlg.InternalCreate(AOwner: TComponent); - {Protected class constructor. Initialise objects required by this wizard. - } -begin - inherited; - frmSnippets.OnChange := SnippetListChange; -end; - -procedure TCodeSubmitDlg.MoveForward(const PageIdx: Integer; - var CanMove: Boolean); - {Called when about to move forward to a new page. Prevents movement if there - is an error on the current page. Handles entry errors by refocussing control - where error occured. - @param PageIdx [in] Index of page we are about move to. - @param CanMove [in/out] Flag indicating whether page change is allowed. - Defaults to true. - } -begin - CanMove := False; - try - ValidatePage(PageIdx); - case PageIdx of - cSubmitPageIdx: DoSubmit; - end; - CanMove := True; - except - on E: EDataEntry do - begin - // Error occurred in control: refocus it - TMessageBox.Error(Self, E.Message); - if Assigned(E.Ctrl) then - E.Ctrl.SetFocus; - end; - end; -end; - -procedure TCodeSubmitDlg.SaveUserData; - {Saves content of some wizard controls to persistent storage. - } -begin - TUserDetailsPersist.Update(TUserDetails.Create(edName.Text, edEMail.Text)); -end; - -procedure TCodeSubmitDlg.SelectSnippet(const Snippet: TSnippet); - {Selects the specified snippet in the check list of snippets or clears - selections. - @param Snippet [in] Snippet to be selected in the list. If Snippet is nil - then list is cleared of selections. - } -var - List: TSnippetList; // list containing only one snippet -begin - if not Assigned(Snippet) or not Snippet.UserDefined then - frmSnippets.SelectedSnippets := nil - else - begin - List := TSnippetList.Create; - try - List.Add(Snippet); - frmSnippets.SelectedSnippets := List; - finally - List.Free; - end; - end; -end; - -procedure TCodeSubmitDlg.SnippetListChange(Sender: TObject); - {Handles change events in list of snippets. Updates state of button on snippet - page and display of prompt if there is an error. - @param Sender [in] Not used. - } -begin - if CurrentPage = cSnippetsPageIdx then - UpdateButtons(CurrentPage); - lblSnippetPrompt.Visible := frmSnippets.SelectedSnippets.IsEmpty; -end; - -procedure TCodeSubmitDlg.UpdateButtons(const PageIdx: Integer); - {Updates wizard buttons depending on current page and state. - @param PageIdx [in] Index of current page. - } -resourcestring - sSubmitBtnCaption = '&Submit'; // submit button caption -begin - inherited; - // We change button caption on submit page - case PageIdx of - cSubmitPageIdx: btnNext.Caption := sSubmitBtnCaption; - end; -end; - -procedure TCodeSubmitDlg.ValidatePage(PageIdx: Integer); - {Validates user entries on wizard pages. - @param PageIdx [in] Index of page to be validated. - @except Raises EDataEntry exceptions with reference to relevant when an - error is encountered. - } -resourcestring - // Error messages - sNoSnippets = 'Please select at least one snippet'; - sNoName = 'Please enter your name or nickname'; - sNoEmail = 'Please enter an email address'; - sBadEmail = 'Email address is not valid'; - sNoLicenseAgreement = 'You can''t submit the snippet(s) unless you agree ' - + 'to the licensing and authority conditions on this page.' + EOL2 - + 'If you agree please tick the checkbox the press Next.' + EOL2 - + 'If you are unable to agree please click Cancel to abort your ' - + 'submission.'; -begin - case PageIdx of - cSnippetsPageIdx: - if frmSnippets.SelectedSnippets.Count = 0 then - raise EDataEntry.Create(sNoSnippets, frmSnippets); - cUserInfoPageIdx: - begin - if edName.Text = '' then - raise EDataEntry.Create(sNoName, edName); - if edEmail.Text = '' then - raise EDataEntry.Create(sNoEmail, edEmail); - if not IsValidEmailAddress(StrTrim(edEmail.Text)) then - raise EDataEntry.Create(sBadEmail, edEmail); - end; - cLicensePageIdx: - if not chkAgreeLicense.Checked then - raise EDataEntry.Create(sNoLicenseAgreement, chkAgreeLicense); - end; -end; - -end. - diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 73524d03e..70397b545 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -668,15 +668,6 @@ inherited MainForm: TMainForm ImageIndex = 7 OnExecute = actUpdateDbaseExecute end - object actSubmit: TAction - Category = 'Snippets' - Caption = 'Submit Snippets...' - Hint = - 'Submit|Submit one or more snippets for possible inclusion in the' + - ' main database' - OnExecute = actSubmitExecute - OnUpdate = ActSubmitOrExportUpdate - end object actExportCode: TAction Category = 'Snippets' Caption = 'Export Snippets...' @@ -1092,12 +1083,6 @@ inherited MainForm: TMainForm object miSpacer14: TMenuItem Caption = '-' end - object miSubmit: TMenuItem - Action = actSubmit - end - object miSpacer19: TMenuItem - Caption = '-' - end object miAddFavourite: TMenuItem Action = actAddFavourite end diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 49d640170..17fb78c8c 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -88,7 +88,6 @@ TMainForm = class(THelpAwareForm) actSaveUnit: TAction; actSelectAll: TAction; actSelectSnippets: TAction; - actSubmit: TAction; actSWAGImport: TAction; actTestBug: TAction; actTestCompile: TAction; @@ -182,9 +181,7 @@ TMainForm = class(THelpAwareForm) miSpacer16: TMenuItem; miSpacer17: TMenuItem; miSpacer18: TMenuItem; - miSpacer19: TMenuItem; miSpacer20: TMenuItem; - miSubmit: TMenuItem; miSWAGImport: TMenuItem; miTestCompile: TMenuItem; miTools: TMenuItem; @@ -419,9 +416,6 @@ TMainForm = class(THelpAwareForm) /// Displays the Select Snippets dialogue box where the snippets /// to be displayed can be chosen. procedure actSelectSnippetsExecute(Sender: TObject); - /// Displays the Code Submission Wizard that enables user defined - /// snippets to be submitted for inclusion in the main database. - procedure actSubmitExecute(Sender: TObject); /// Determines whether the Submit or ExportCode actions can be /// enabled. procedure ActSubmitOrExportUpdate(Sender: TObject); @@ -1068,13 +1062,9 @@ procedure TMainForm.ActShowPrefsPageExecute(Sender: TObject); fMainDisplayMgr.CompleteRefresh; end; -procedure TMainForm.actSubmitExecute(Sender: TObject); -begin - TCodeShareMgr.Submit(fMainDisplayMgr.CurrentView); -end; - procedure TMainForm.ActSubmitOrExportUpdate(Sender: TObject); begin + // TODO -cRefactor: rename method - no longer shared (Sender as TAction).Enabled := TCodeShareMgr.CanShare; end; diff --git a/Src/UCodeShareMgr.pas b/Src/UCodeShareMgr.pas index 23e12e9e1..6226182b5 100644 --- a/Src/UCodeShareMgr.pas +++ b/Src/UCodeShareMgr.pas @@ -42,11 +42,6 @@ TCodeShareMgr = class sealed(TNoConstructObject) represent a snippet or if snippet is not user defined. } public - class procedure Submit(ViewItem: IView); - {Submits code for consideration to be included in main database. - @param ViewItem [in] View item that may contain a user defined snippet. - If so the snippet is included in code for submission by default. - } class function CanShare: Boolean; {Checks if there are any user defined snippets that can be shared (i.e. exported or submitted. @@ -70,7 +65,7 @@ implementation // Delphi SysUtils, // Project - DB.UMain, FmCodeExportDlg, FmCodeImportDlg, FmCodeSubmitDlg, UCodeImportMgr; + DB.UMain, FmCodeExportDlg, FmCodeImportDlg, UCodeImportMgr; { TCodeShareMgr } @@ -124,14 +119,5 @@ class procedure TCodeShareMgr.ImportCode; end; end; -class procedure TCodeShareMgr.Submit(ViewItem: IView); - {Submits code for consideration to be included in main database. - @param ViewItem [in] View item that may contain a user defined snippet. If - so the snippet is included in code for submission by default. - } -begin - TCodeSubmitDlg.Execute(nil, GetSnippetFromView(ViewItem)); -end; - end. diff --git a/Src/Web.UCodeSubmitter.pas b/Src/Web.UCodeSubmitter.pas deleted file mode 100644 index fb16ff56d..000000000 --- a/Src/Web.UCodeSubmitter.pas +++ /dev/null @@ -1,88 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a class that submits code snippets database contributions via a - * web service. -} - - -unit Web.UCodeSubmitter; - - -interface - - -uses - // Delphi - SysUtils, Classes, - // Project - Web.UStdWebService; - - -type - /// Submits snippets to the Code Snippets Database code submission - /// web service. - TCodeSubmitter = class sealed(TStdWebService) - public - /// Creates a new object instance with correct URL and user agent - /// for web service. - constructor Create; - /// Submits data describing the snippets being submitted to the - /// cpde submission web service. - /// TBytes [in] Byte array containing code submission - /// information. - procedure SubmitData(const Data: TBytes); - end; - - -implementation - - -uses - // Project - Web.UInfo; - - -const - // Web service info - cScriptURLTplt = 'http://%s/websvc/codesnip-submitter'; - cUserAgent = 'DelphiDabbler-CSSubmitter-v1'; - cMediaType = 'text/xml'; - - -resourcestring - // Error message - sBadRespone = 'Invalid response from code snippets submitter web service.'; - - -{ TCodeSubmitter } - -constructor TCodeSubmitter.Create; -begin - inherited Create( - TWebServiceInfo.Create(cScriptURLTplt, cUserAgent, cMediaType) - ); -end; - -procedure TCodeSubmitter.SubmitData(const Data: TBytes); -var - Response: TStringList; // valid response from web service: content ignored -begin - Assert(Assigned(Data), ClassName + '.Subscribe: Data stream is nil'); - Response := TStringList.Create; - try - PostData(Data, Response); - finally - FreeAndNil(Response); - end; -end; - -end. - From 2a59f1a41b7c35bbed3bea0ac1a63f62847c3476 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 7 Feb 2020 02:28:05 +0000 Subject: [PATCH 049/714] Added TODO --- Src/UCodeImportExport.pas | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/UCodeImportExport.pas b/Src/UCodeImportExport.pas index c5e99f2be..fee93b699 100644 --- a/Src/UCodeImportExport.pas +++ b/Src/UCodeImportExport.pas @@ -110,6 +110,7 @@ TCodeImporter = class(TNoPublicConstructObject) ECodeImporter = class(ECodeSnipXML); type + // TODO -cRefactor: Decide if we still need to export user info /// Exports code snippets and user info to XML. TCodeExporter = class(TNoPublicConstructObject) strict private From b2d10b41bcf74007a0e0b3382aba2bb245bc06de Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 7 Feb 2020 02:37:38 +0000 Subject: [PATCH 050/714] Added TODO --- Src/CodeSnip.todo | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index 3bd2915ad..f8846607d 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,3 +1,6 @@ +{TODO -cSharing : +Decide if to continue to support user info in export files +- update Docs\Design\FileFormats\config.html accordingly} {TODO -cWeb : Review all docs & help file to remove / replace all references to delphidabbler.com} {TODO -cWeb : Review help file and remove/replace all references to the DelphiDabbler From 3ee0d014d6c27a7e630a7606a4631527d630a129 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 7 Feb 2020 03:50:59 +0000 Subject: [PATCH 051/714] Updated help file and other docs re removal of Code Submission facility --- Docs/Design/FileFormats/export.html | 11 +- Docs/Privacy.txt | 33 +----- Docs/ReadMe.txt | 10 -- Src/Help/CodeSnip.hhp | 3 - Src/Help/HTML/dlg_submit.htm | 158 ---------------------------- Src/Help/HTML/main_menu.htm | 2 +- Src/Help/HTML/menu_snippets.htm | 13 --- Src/Help/HTML/privacy_statement.htm | 44 +------- Src/Help/HTML/quickstart.htm | 2 - Src/Help/HTML/reml.htm | 2 +- Src/Help/HTML/submission-rights.htm | 83 --------------- Src/Help/HTML/task_submit.htm | 53 ---------- Src/Help/HTML/tasks.htm | 3 - Src/Help/Index.hhk | 12 --- Src/Help/TOC.hhc | 4 - 15 files changed, 15 insertions(+), 418 deletions(-) delete mode 100644 Src/Help/HTML/dlg_submit.htm delete mode 100644 Src/Help/HTML/submission-rights.htm delete mode 100644 Src/Help/HTML/task_submit.htm diff --git a/Docs/Design/FileFormats/export.html b/Docs/Design/FileFormats/export.html index 142439124..70e3292bb 100644 --- a/Docs/Design/FileFormats/export.html +++ b/Docs/Design/FileFormats/export.html @@ -50,8 +50,7 @@

    User defined snippets can be exported from the program for importing into - another program or for submitting to the online database. Exported data is - stored in a single XML file. + another user's user database. Exported data is stored in a single XML file.

    @@ -64,8 +63,9 @@

    - XML export files use UTF-8 encoding without a byte order mark. XML generated - for submission to the online database is also encoded in UTF-8. + XML export files use UTF-8 encoding without a byte order mark. (In earlier + versions XML generated for submission to the online database is also encoded + in UTF-8. Code submission is no longer supported.)

    @@ -159,7 +159,8 @@

    Contains information about user who created the file (omitted for normal - exports – included for submissions to the online database). + exports – (In earlier versions this was included with submissions to + the online database. Submission to the database is no longer supported.)
    diff --git a/Docs/Privacy.txt b/Docs/Privacy.txt index 36314a8f4..c570a5b2f 100644 --- a/Docs/Privacy.txt +++ b/Docs/Privacy.txt @@ -37,9 +37,7 @@ preferences. The only personal information is as follows: * Any user name or email address you provided if you ever entered the information in a dialogue box. This is used simply to automatically enter - the data in dialogue boxes where needed, to save you re-typing it. See - below for details of activities that require either or both a name or - email address to be submitted. + the data in dialogue boxes where needed, to save you re-typing it. * Your user name and password if you configured CodeSnip to access the internet using a proxy server. The information is used only to access the @@ -67,10 +65,9 @@ CodeSnip Online Activity CodeSnip may go online for several reasons. They are: 1. Updating the database. - 2. Submitting code for inclusion in the main database. - 3. Importing snippets from the SWAG database. - 4. Accessing various websites via hyperlinks and menu options. - 5. Accessing the internet using a proxy server. + 2. Importing snippets from the SWAG database. + 3. Accessing various websites via hyperlinks and menu options. + 4. Accessing the internet using a proxy server. Some are performed directly by CodeSnip, which communicates with web services located on delphidabbler.com using HTTP on port 80. Others simply display web pages in a browser. The last reason passes user information to the proxy server @@ -122,28 +119,6 @@ None of these records store any information that can be tracked back to an individual. -Submitting code to the main database --------------------------------------------------------------------------------- - -This activity is started from the "Snippets | Submit Snippets" menu option and -data is collected using the resulting wizard. Clicking the "Submit" button in -the wizard sends the following information to the DelphiDabbler code submission -web service: - - * The CodeSnip program version number. - * Your name, email address any comments entered in the wizard. - * All the snippets you chose to send. - -You can preview the data to be sent (in XML format) from the wizard. The XML -will be stored in a file on the DelphiDabbler server until processed. The data -is also emailed to the database maintainer (currently the author of CodeSnip). - -The snippets may be edited and published on the Code Snippets online database -and distributed to CodeSnip users. Your name may be used to credit the snippets. -Your email address will not be published and is used only to contact you with -any queries about the submitted code or its licensing. - - Importing snippets from the SWAG database ----------------------------------------- diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt index cd8e532f7..3c12914f8 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe.txt @@ -387,16 +387,6 @@ There are Frequently Asked Questions pages for CodeSnip on the web, at https://github.com/delphidabbler/codesnip-faq/blob/master/README.md -Contribute to the Database -================================================================================ - -Please do contribute Pascal snippets to the on-line Code Snippets database. - -You can submit routines from your user-defined snippets database using the -"Snippets | Submit Routines" menu option. Otherwise please send your code via -the DelphiDabbler contact page at http://delphidabbler.com/contact. - - Thanks ================================================================================ diff --git a/Src/Help/CodeSnip.hhp b/Src/Help/CodeSnip.hhp index 838cf7020..bea2da775 100644 --- a/Src/Help/CodeSnip.hhp +++ b/Src/Help/CodeSnip.hhp @@ -59,7 +59,6 @@ HTML\dlg_saveselection.htm HTML\dlg_savesnippet.htm HTML\dlg_selectcompiler.htm HTML\dlg_selectroutines.htm -HTML\dlg_submit.htm HTML\dlg_testcompile.htm HTML\dlg_trappedbugreport.htm HTML\dlg_update.htm @@ -102,7 +101,6 @@ HTML\task_generateunit.htm HTML\task_printroutine.htm HTML\task_savesnippet.htm HTML\task_search.htm -HTML\task_submit.htm HTML\task_testcompile.htm HTML\task_update.htm HTML\welcome.htm @@ -115,4 +113,3 @@ HTML\notifiy_database_update.htm HTML\dlg_dependencies_edit.htm HTML\about_swag.htm HTML\dlg_swagimport.htm -HTML\submission-rights.htm diff --git a/Src/Help/HTML/dlg_submit.htm b/Src/Help/HTML/dlg_submit.htm deleted file mode 100644 index b9e12b81a..000000000 --- a/Src/Help/HTML/dlg_submit.htm +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - Code Submission Wizard - - - - - - - -

    - Code Submission Wizard -

    -

    - This wizard is used to submit user defined snippets for inclusion in the - online Code Snippets database. It is accessed Snippets | Submit - Snippets menu item. The menu item is only available if there are user - defined snippets in the database. -

    -

    - The various pages of the wizard are discussed below. You can cancel your - submission at any time the Cancel button is enabled. -

    -

    - First page -

    -

    - This is simply an introductory page that describes the wizard. Click the - Next button to display the Select Snippets page and to - begin using the wizard. -

    -

    - "Select Snippets" page -

    -

    - This page displays a check list of all the user-defined snippets in the - database. It is used to select the snippets you wish to submit. -

    -

    - Check the names of the required snippets. Checking a category selects all - the snippets in the category. At least one snippet must be checked before - moving on to the next page. If a user-defined snippet was displayed in the - main window when the wizard was started, that snippet will be pre-selected - in the check list. -

    -

    - Click the Next button to move the next page. If no snippets are - selected an error message is displayed. -

    -

    - "About You" page -

    -

    - In order to credit you, and to contact you about any problems, your name - and email address are needed. They must be entered on this page in the - Name and Email Address text boxes. You can - also enter any comments or a message on the page using the optional - Your Comments text box. -

    -

    - If you have successfully submitted code before CodeSnip will - remember the name and email address you last used and will have entered - them in the appropriate text boxes. Please check these are correct and - alter as necessary. -

    -

    - You cannot move to the next page until your name and a valid email address - are provided. Once the data has been entered click the Next - button to move to the next page. -

    -

    - You should provide a valid, working, email address in case there is a - need to contact you with any licensing queries. In the case where a dummy - email address is provided your submission may be rejected. -

    -

    - Note: your personal data will not be abused and your - email address will not be published. See the - privacy statement for more - information. -

    -

    - "License agreement" page -

    -

    - All the code in the Code Snippets Database is released under the MIT License and is copyright by the Code Snippets Database contributors. -

    -

    - In order to submit snippets to the database you must confirm that you have - the right to submit the snippets and - that you agree for it to be released under the MIT license. -

    -

    - "Ready to Submit" page -

    -

    - You have now provided all the required information. The only additional - information that gets sent is the program's version number. If you - want to see the data that will be submitted (in XML format) click the - Preview Data button. -

    -

    - Now ensure you are connected to the internet and click the Submit - button to send the data to the DelphiDabbler website. -

    -

    - If the data is sent successfully the final page of the wizard will be - displayed. If there was an error in sending the data an error message will - be displayed and the current page will remain. -

    -

    - "Submission Complete" page -

    -

    - This page is displayed when the subscription succeeds – i.e. the - information has been sent to the DelphiDabbler website. The code - does not immediately appear on the database – it will be reviewed, - tested and revised as necessary before publication. You will be emailed if - there are any queries. -

    -

    - Click the Finish button to close the wizard. -

    - - - diff --git a/Src/Help/HTML/main_menu.htm b/Src/Help/HTML/main_menu.htm index 8aed7cb17..0c6454bd6 100644 --- a/Src/Help/HTML/main_menu.htm +++ b/Src/Help/HTML/main_menu.htm @@ -68,7 +68,7 @@

    Create, edit and delete user defined snippet. Also allows snippets to - be imported or exported and submitted for use in the on-line database. + be imported and exported. diff --git a/Src/Help/HTML/menu_snippets.htm b/Src/Help/HTML/menu_snippets.htm index 2fc42216c..a0d0e4b29 100644 --- a/Src/Help/HTML/menu_snippets.htm +++ b/Src/Help/HTML/menu_snippets.htm @@ -122,19 +122,6 @@

    is used to select the required snippets. - - -   - - - Submit Snippets - - - Opens the Code Submission Wizard that is - used to submit user defined snippets for inclusion in the main - database. - - Menu icon diff --git a/Src/Help/HTML/privacy_statement.htm b/Src/Help/HTML/privacy_statement.htm index 4dd81eaae..2992499a1 100644 --- a/Src/Help/HTML/privacy_statement.htm +++ b/Src/Help/HTML/privacy_statement.htm @@ -68,8 +68,6 @@

    Any user name or email address you provided if you ever entered the information in a dialogue box. This is used simply to automatically enter the data in dialogue boxes where needed, to save you re-typing it. - See below for details of activities that require either or both a name - or email address to be submitted.
  • Your user name and password if you configured CodeSnip to @@ -107,9 +105,6 @@

  • Updating the database.
  • -
  • - Submitting code for inclusion in the main database. -
  • Importing snippets from the SWAG database.
  • @@ -121,10 +116,10 @@

  • - The first three actions are performed directly by CodeSnip, + The first two actions are performed directly by CodeSnip, which communicates with web services located on delphidabbler.com - using HTTP on port 80. The fourth action simply displays web pages in a - browser. The fifth passes user information to the proxy server. + using HTTP on port 80. The third action simply displays web pages in a + browser. The fourth passes user information to the proxy server.

    Personal data will neither be published on the DelphiDabbler website nor @@ -203,39 +198,6 @@

    None of these records store any information that can be tracked back to an individual.

    -

    - Submitting code to the main database -

    -

    - This activity is started from the Snippets | Submit Snippets menu - option and data is collected using the resulting wizard. Clicking the - Submit button in the wizard sends the following information to - the DelphiDabbler code submission web service: -

    -
      -
    • - The CodeSnip program version number. -
    • -
    • - Your name, email address any comments entered in the wizard. -
    • -
    • - All the snippets you chose to send. -
    • -
    -

    - You can preview the data to be sent (in XML format) from the wizard. The - XML will be stored in a file on the DelphiDabbler server until - processed. The data is also emailed to the database maintainer (currently - the author of CodeSnip). -

    -

    - The snippets may be edited and published on the Code Snippets online - database and distributed to CodeSnip users. Your name may be used - to credit the snippets. Your email address will not be published and is - used only to contact you with any queries about the submitted code or its - licensing. -

    Importing snippets from the SWAG database

    diff --git a/Src/Help/HTML/quickstart.htm b/Src/Help/HTML/quickstart.htm index 5119b5a2f..db2053cde 100644 --- a/Src/Help/HTML/quickstart.htm +++ b/Src/Help/HTML/quickstart.htm @@ -56,8 +56,6 @@

    You can add your own snippets to the database. These snippets are held separately to the main database and are not affected by database updates. - If you wish you can submit user defined code to be considered for - inclusion in the main database.

    Add, edit and delete snippets using the appropriate menu items on the diff --git a/Src/Help/HTML/reml.htm b/Src/Help/HTML/reml.htm index 9d5fb8450..ea23e0ae8 100644 --- a/Src/Help/HTML/reml.htm +++ b/Src/Help/HTML/reml.htm @@ -179,7 +179,7 @@

    specify the required URL, which must use one of the http:, https: or file: protocols; others are not permitted. If you use the file: protocol it must reference a valid local - or network file. Be aware that if you submit or export a snippet + or network file. Be aware that if you export a snippet containing a hyperlink that uses the file: protocol it will only work on the recipient's system if the specified file exists in the same location.
    diff --git a/Src/Help/HTML/submission-rights.htm b/Src/Help/HTML/submission-rights.htm deleted file mode 100644 index baf7f7412..000000000 --- a/Src/Help/HTML/submission-rights.htm +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - Submission rights - - - - - - - -

    - Have I The Right To Submit a Snippet? -

    -

    - This topic is for guidance only and is not authoritative. To be - sure you have the right to submit a snippet you didn't write you may need - to contact the initial author or read any license that accompanied the - snippet. -

    -
      -
    • - If you wrote the snippet you have the right to do as you like with it. -
    • -
    • - If you acquired the snippet from a blog post or similar, check the - posting to see if the author has placed any restrictions on use. It is - unusual for the author to assert any rights over code snippets, but they - may do. -
    • -
    • - If a snippet is in the public domain you can submit it and it is OK to - license it under the MIT License. -
    • -
    • - If you extracted a snippet from anyone's licensed source code then you - need to check the license to see if it allows the code to be distributed - and, if necessary, re-licensed. -
    • -
    • - If the author simply requires credit for his or her work then include - their name in the comments when you submit the snippet and make it clear - they need to be credited. However, if there is any requirement to - reproduce a copyright statement this cannot be met because all - snippets in the Code Snippets database are currenty released under the - copyright of the Code Snippets Database Contributors. -
    • -
    - - - diff --git a/Src/Help/HTML/task_submit.htm b/Src/Help/HTML/task_submit.htm deleted file mode 100644 index 99268c029..000000000 --- a/Src/Help/HTML/task_submit.htm +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - Submit Code - - - - -

    - Submit Code to the Database -

    -

    - You can (and are encouraged to) submit your user defined snippets for - inclusion in the Code Snippets database. -

    -

    - The Code Submission Wizard is used to send - code to DelphiDabbler. This is accessed from the Snippets | - Submit Snippets menu item. -

    -

    - Your code may be edited to conform with the format of the database and - must be compilable in at least one Delphi or Free Pascal compiler. It is - helpful if you can ensure your code compiles before submitting it. -

    -

    - Once included in the Code Snippets Database the code will be licensed - under the terms of the MIT License and copyright will be held jointly by the database contributors. -

    - - diff --git a/Src/Help/HTML/tasks.htm b/Src/Help/HTML/tasks.htm index 1a82a6ccb..31614157a 100644 --- a/Src/Help/HTML/tasks.htm +++ b/Src/Help/HTML/tasks.htm @@ -60,9 +60,6 @@

  • Customise CodeSnip
  • -
  • - Submit Code to the Database -
  • Export and Import Snippets
  • diff --git a/Src/Help/Index.hhk b/Src/Help/Index.hhk index f8bd3f495..fde82cf94 100644 --- a/Src/Help/Index.hhk +++ b/Src/Help/Index.hhk @@ -57,10 +57,6 @@

    -
  • - - -
  • @@ -102,10 +98,6 @@ -
  • - - -
  • @@ -359,10 +351,6 @@ -
  • - - -
  • diff --git a/Src/Help/TOC.hhc b/Src/Help/TOC.hhc index e59624218..fc3b7d910 100644 --- a/Src/Help/TOC.hhc +++ b/Src/Help/TOC.hhc @@ -139,10 +139,6 @@ -
  • - - -
  • From 9b6af6e0c81ed452fdd2a653d6b8e7d02a56b4f1 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 15 Feb 2020 12:52:49 +0000 Subject: [PATCH 052/714] Added new method to TCtrlArranger --- Src/UCtrlArranger.pas | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Src/UCtrlArranger.pas b/Src/UCtrlArranger.pas index 7d4e68b2f..689e46135 100644 --- a/Src/UCtrlArranger.pas +++ b/Src/UCtrlArranger.pas @@ -167,6 +167,14 @@ TCtrlArranger = class(TNoConstructObject) /// example a page control where the containers are the pages. class function MaxContainerHeight(const Containers: array of TWinControl): Integer; + + /// Returns maximum width of controls parented by given set of + /// parent controls. + /// Designed for use in determining the width of a control that + /// has to accomodate all the controls from any of the containers, for + /// example a page control where the containers are the pages. + class function MaxContainerWidth(const Containers: array of TWinControl): + Integer; end; @@ -311,6 +319,16 @@ class function TCtrlArranger.MaxContainerHeight( Result := Max(Result, TotalControlHeight(Container)); end; +class function TCtrlArranger.MaxContainerWidth( + const Containers: array of TWinControl): Integer; +var + Container: TWinControl; // each container in Containers +begin + Result := 0; + for Container in Containers do + Result := Max(Result, TotalControlWidth(Container)); +end; + class procedure TCtrlArranger.MoveBelow(const RefCtrl, Ctrl: TControl; const Margin: Integer); begin From 81de621c00bc89412c71b3531eb7edf9ff615179 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 15 Feb 2020 12:53:49 +0000 Subject: [PATCH 053/714] Added CSS styling for
      tag in FrHTMLDlg frame --- Src/FrHTMLDlg.pas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Src/FrHTMLDlg.pas b/Src/FrHTMLDlg.pas index 160078e8b..9cc248b13 100644 --- a/Src/FrHTMLDlg.pas +++ b/Src/FrHTMLDlg.pas @@ -106,6 +106,12 @@ procedure THTMLDlgFrame.BuildCSS(const CSSBuilder: TCSSBuilder); AddProperty(TCSS.MarginProp(cssBottom, 0)); AddProperty(TCSS.PaddingProp(0)); end; + with CSSBuilder.AddSelector('ul') do + begin + AddProperty(TCSS.MarginProp(cssTop, 6)); + AddProperty(TCSS.MarginProp(cssBottom, 0)); + AddProperty(TCSS.PaddingProp(0)); + end; // Sets table font info with CSSBuilder.AddSelector('table') do AddProperty(TCSS.FontProps(fOwner.Font)); From e9b5a1aa975b0436b81ad57d347264cb5854b8ca Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 16 Feb 2020 01:41:03 +0000 Subject: [PATCH 054/714] Renamed FmUserDataPathDlg.FrProgress frame to FrProgress Changed frame class accordingly. Updated FmUserDataPathDlg re changes to progress frame Did this because progress frame will now be shared with another dialogue box. --- Src/CodeSnip.dpr | 2 +- Src/CodeSnip.dproj | 4 ++-- Src/FmUserDataPathDlg.dfm | 7 ++++++- Src/FmUserDataPathDlg.pas | 2 +- ...taPathDlg.FrProgress.dfm => FrProgress.dfm} | 6 +----- ...taPathDlg.FrProgress.pas => FrProgress.pas} | 18 +++++++++--------- 6 files changed, 20 insertions(+), 19 deletions(-) rename Src/{FmUserDataPathDlg.FrProgress.dfm => FrProgress.dfm} (78%) rename Src/{FmUserDataPathDlg.FrProgress.pas => FrProgress.pas} (87%) diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index d3e7475cc..5b04417a0 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -136,7 +136,7 @@ uses FmTrappedBugReportDlg in 'FmTrappedBugReportDlg.pas' {TrappedBugReportDlg}, FmUserBugReportDlg in 'FmUserBugReportDlg.pas' {UserBugReportDlg}, FmUserDataPathDlg in 'FmUserDataPathDlg.pas' {UserDataPathDlg}, - FmUserDataPathDlg.FrProgress in 'FmUserDataPathDlg.FrProgress.pas' {UserDataPathDlgProgressFrame: TFrame}, + FrProgress in 'FrProgress.pas' {ProgressFrame: TFrame}, FmUserHiliterMgrDlg in 'FmUserHiliterMgrDlg.pas' {UserHiliterMgrDlg}, FmWaitDlg in 'FmWaitDlg.pas' {WaitDlg}, FmWizardDlg in 'FmWizardDlg.pas' {WizardDlg}, diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 9333ca7f2..863b2f637 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -241,8 +241,8 @@
      UserDataPathDlg
      - -
      UserDataPathDlgProgressFrame
      + +
      ProgressFrame
      TFrame
      diff --git a/Src/FmUserDataPathDlg.dfm b/Src/FmUserDataPathDlg.dfm index 17a66e41f..523898a3b 100644 --- a/Src/FmUserDataPathDlg.dfm +++ b/Src/FmUserDataPathDlg.dfm @@ -1,7 +1,7 @@ inherited UserDataPathDlg: TUserDataPathDlg Caption = 'Move User Database' ExplicitWidth = 474 - ExplicitHeight = 374 + ExplicitHeight = 375 PixelsPerInch = 96 TextHeight = 13 inherited pnlBody: TPanel @@ -175,9 +175,14 @@ inherited UserDataPathDlg: TUserDataPathDlg Top = 0 Width = 320 Height = 82 + ParentBackground = False TabOrder = 2 Visible = False ExplicitLeft = 57 + ExplicitHeight = 82 + inherited pnlBody: TPanel + Height = 82 + end end end object alDlg: TActionList diff --git a/Src/FmUserDataPathDlg.pas b/Src/FmUserDataPathDlg.pas index 03c1f9cf3..031d2418c 100644 --- a/Src/FmUserDataPathDlg.pas +++ b/Src/FmUserDataPathDlg.pas @@ -23,7 +23,7 @@ interface // Delphi SysUtils, Forms, Classes, ActnList, StdCtrls, Controls, ExtCtrls, // Project - FmGenericViewDlg, FmUserDataPathDlg.FrProgress, UBaseObjects, + FmGenericViewDlg, FrProgress, UBaseObjects, UControlStateMgr, UUserDBMove; type diff --git a/Src/FmUserDataPathDlg.FrProgress.dfm b/Src/FrProgress.dfm similarity index 78% rename from Src/FmUserDataPathDlg.FrProgress.dfm rename to Src/FrProgress.dfm index f84a2afaa..40b7f078d 100644 --- a/Src/FmUserDataPathDlg.FrProgress.dfm +++ b/Src/FrProgress.dfm @@ -1,4 +1,4 @@ -object UserDataPathDlgProgressFrame: TUserDataPathDlgProgressFrame +object ProgressFrame: TProgressFrame Left = 0 Top = 0 Width = 320 @@ -14,10 +14,6 @@ object UserDataPathDlgProgressFrame: TUserDataPathDlgProgressFrame BevelKind = bkFlat BevelOuter = bvNone TabOrder = 0 - ExplicitLeft = 16 - ExplicitTop = 16 - ExplicitWidth = 288 - ExplicitHeight = 73 object lblDescription: TLabel Left = 8 Top = 8 diff --git a/Src/FmUserDataPathDlg.FrProgress.pas b/Src/FrProgress.pas similarity index 87% rename from Src/FmUserDataPathDlg.FrProgress.pas rename to Src/FrProgress.pas index 61ed33ee7..76757a0a0 100644 --- a/Src/FmUserDataPathDlg.FrProgress.pas +++ b/Src/FrProgress.pas @@ -14,7 +14,7 @@ } -unit FmUserDataPathDlg.FrProgress; +unit FrProgress; interface @@ -30,7 +30,7 @@ interface /// Frame that displays a message and a progress bar. /// For use from TUserDataPathDlg to indicate progress when moving /// the user database. - TUserDataPathDlgProgressFrame = class(TFrame) + TProgressFrame = class(TFrame) pnlBody: TPanel; prgProgress: TProgressBar; lblDescription: TLabel; @@ -80,39 +80,39 @@ implementation { TUserDataPathDlgProgressFrame } -function TUserDataPathDlgProgressFrame.GetDescription: string; +function TProgressFrame.GetDescription: string; begin Result := lblDescription.Caption; end; -function TUserDataPathDlgProgressFrame.GetProgress: Integer; +function TProgressFrame.GetProgress: Integer; begin Result := prgProgress.Position; end; -function TUserDataPathDlgProgressFrame.GetRange: TRange; +function TProgressFrame.GetRange: TRange; begin Result := TRange.Create(prgProgress.Min, prgProgress.Max); end; -procedure TUserDataPathDlgProgressFrame.SetDescription(const Value: string); +procedure TProgressFrame.SetDescription(const Value: string); begin lblDescription.Caption := Value; end; -procedure TUserDataPathDlgProgressFrame.SetProgress(const Value: Integer); +procedure TProgressFrame.SetProgress(const Value: Integer); begin prgProgress.Position := GetRange.Constrain(Value); end; -procedure TUserDataPathDlgProgressFrame.SetRange(const Value: TRange); +procedure TProgressFrame.SetRange(const Value: TRange); begin prgProgress.Min := Value.Min; prgProgress.Max := Value.Max; prgProgress.Position := Value.Constrain(prgProgress.Position); end; -procedure TUserDataPathDlgProgressFrame.Show(const AlignToCtrl: TWinControl); +procedure TProgressFrame.Show(const AlignToCtrl: TWinControl); begin TCtrlArranger.SetLabelHeight(lblDescription); lblDescription.Top := 8; From 4fbaeb369f9d6e412bb81bd81c9ccaad4c249a09 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 16 Feb 2020 01:41:18 +0000 Subject: [PATCH 055/714] Added TODO --- Src/CodeSnip.todo | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index f8846607d..d71e0bccf 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,3 +1,4 @@ +{TODO -cUI : Rationalise use of TFontHelper.SetDefaultFont(s) and .SetDefaultBaseFont(s) methods.} {TODO -cSharing : Decide if to continue to support user info in export files - update Docs\Design\FileFormats\config.html accordingly} From f0904f67fb4334e7139b04bf123745cc5a815fc9 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 16 Feb 2020 01:43:33 +0000 Subject: [PATCH 056/714] Added new UDirectoryCopier unit. --- Src/CodeSnip.dpr | 1 + Src/CodeSnip.dproj | 1 + Src/UDirectoryCopier.pas | 261 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 263 insertions(+) create mode 100644 Src/UDirectoryCopier.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 5b04417a0..2f379f8a3 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -235,6 +235,7 @@ uses UDetailPageLoader in 'UDetailPageLoader.pas', UDetailTabAction in 'UDetailTabAction.pas', UDialogMgr in 'UDialogMgr.pas', + UDirectoryCopier in 'UDirectoryCopier.pas', UDispatchList in 'UDispatchList.pas', UDlgHelper in 'UDlgHelper.pas', UDOSDateTime in 'UDOSDateTime.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 863b2f637..8be513a80 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -436,6 +436,7 @@ + diff --git a/Src/UDirectoryCopier.pas b/Src/UDirectoryCopier.pas new file mode 100644 index 000000000..64824e6c6 --- /dev/null +++ b/Src/UDirectoryCopier.pas @@ -0,0 +1,261 @@ +{ + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/ + * + * Copyright (C) 2020, Peter Johnson (www.delphidabbler.com). + * + * Implements a class that performs shallow directory copies and moves. +} + + +unit UDirectoryCopier; + +interface + +uses + // VCL + Classes, + Windows, // for inlining + SysUtils, + // Project + UIStringList; + +type + + /// Class that makes shallow copies/movesof directories. + /// A shallow copy is one that copies files at the top level of the + /// directory only and does not copy sub-directories. + TDirectoryCopier = class(TObject) + public + type + /// Type of event triggered by TDirectoryCopier to report + /// progress when copying or moving directories. + /// TObject [in] TDirectoryCopier instance that + /// triggered the event. + /// Byte [in] Percentage of operation that has been + /// completed. + TProgressEvent = procedure(Sender: TObject; const Percent: Single) + of object; + strict private + var + fOnBegin: TNotifyEvent; + fOnCopyFileProgress: TProgressEvent; + fOnAfterCopyDir: TNotifyEvent; + fOnDeleteFileProgress: TProgressEvent; + fOnAfterDeleteDir: TNotifyEvent; + fOnEnd: TNotifyEvent; + /// Copies given file from given source directory to given + /// destination directory. + procedure DoCopyFile(const SrcDir, DestDir, FileName: string); + /// Deletes given file from given directory. + procedure DoDeleteFile(const Dir, FileName: string); inline; + /// Copies all top level files from the given source directory to + /// the given destination directory. + procedure DoCopyDir(const SrcDir, DestDir: string); + /// Deletes all top level files from the given directory then + /// deletes the directory itself, if empty. + procedure DoDeleteDir(const Dir: string); + /// Triggers OnBegin event. + procedure NotifyBegin; + /// Triggers OnEnd event. + procedure NotifyEnd; + /// Triggers OnCopyFile event, with a percentage completeness + /// based on the given number of files copied and total number of files. + /// + procedure NotifyCopyFile(FileIdx, TotalFiles: Cardinal); inline; + /// Triggers OnDeleteFile event, with a percentage completeness + /// based on the given number of files deleted and total number of files. + /// + procedure NotifyDeleteFile(FileIdx, TotalFiles: Cardinal); inline; + /// Triggers OnAfterCopyDir event. + procedure NotifyAfterCopyDir; inline; + /// Triggers OnAfterDeleteDir event. + procedure NotifyAfterDeleteDir; inline; + /// Calculates percentage progress of towards a goal. + /// Cardinal [in] Number of transactions completed + /// towards goal. + /// Cardinal [in] Number of transactions required to + /// reach goal. Must be greater than 0. + /// Single: Progress as a percentage between 0.0 and 100.0. + /// + /// If Count is greater than than Goal then 100.0 is returned. + /// + function GetProgress(Count, Goal: Cardinal): Single; + /// Gets a list of all top level files in the given directory. + /// + function GetFiles(const Dir: string): IStringList; + public + /// Event triggered before operation begins. + property OnBegin: TNotifyEvent + read fOnBegin write fOnBegin; + /// Event triggered after operation ends. + property OnEnd: TNotifyEvent + read fOnEnd write fOnEnd; + /// Event triggered just before file copying begins and once for + /// each file copied. Reports progress towards completion of copy + /// operation. + property OnCopyFileProgress: TProgressEvent + read fOnCopyFileProgress write fOnCopyFileProgress; + /// Event triggered when all files have been copied at the end of + /// a copy operation. + property OnAfterCopyDir: TNotifyEvent + read fOnAfterCopyDir write fOnAfterCopyDir; + /// Event triggered just before file deletion begins and once for + /// each file deleted. Reports progress towards completion of delete + /// operation. + property OnDeleteFileProgress: TProgressEvent + read fOnDeleteFileProgress write fOnDeleteFileProgress; + /// Events triggered when all files have been deleted at the end + /// of a delete operation. + property OnAfterDeleteDir: TNotifyEvent + read fOnAfterDeleteDir write fOnAfterDeleteDir; + /// Moves all top level files from the given source directory to + /// the given destination directory. + /// The top level files will be deleted from the source directory + /// after they have been copied. The directory will be deleted only if it + /// contains no subdirectories. The destination directory will be created + /// if it does not exist. + procedure Move(const SrcDir, DestDir: string); + /// Copies all top level files from the given source directory to + /// the given destination directory. + /// Any subdirectories of the source directory will not be copied. + /// The destination directory will be created if it does not exist. + /// + procedure Copy(const SrcDir, DestDir: string); + end; + +implementation + +uses + // VCL + Math, + // Project + UDOSDateTime, + UIOUtils, + UUtils; + +{ TDirectoryCopier } + +procedure TDirectoryCopier.Copy(const SrcDir, DestDir: string); +begin + NotifyBegin; + DoCopyDir(SrcDir, DestDir); + NotifyEnd; +end; + +procedure TDirectoryCopier.DoCopyDir(const SrcDir, DestDir: string); +var + Files: IStringList; + Idx: Integer; +begin + Files := GetFiles(SrcDir); + NotifyCopyFile(0, Files.Count); + EnsureFolders(DestDir); + for Idx := 0 to Pred(Files.Count) do + begin + DoCopyFile(SrcDir, DestDir, Files[Idx]); + NotifyCopyFile(Idx + 1, Files.Count); + end; + NotifyAfterCopyDir; +end; + +procedure TDirectoryCopier.DoCopyFile(const SrcDir, DestDir, FileName: string); +var + SrcFile, DestFile: string; + FileDate: IDOSDateTime; +begin + SrcFile := SrcDir + PathDelim + FileName; + DestFile := DestDir + PathDelim + FileName; + FileDate := TDOSDateTimeFactory.CreateFromFile(SrcFile); + TFileIO.CopyFile(SrcFile, DestFile); + FileDate.ApplyToFile(DestFile); +end; + +procedure TDirectoryCopier.DoDeleteDir(const Dir: string); +var + Files: IStringList; + Idx: Integer; +begin + Files := GetFiles(Dir); + NotifyDeleteFile(0, Files.Count); + for Idx := 0 to Pred(Files.Count) do + begin + DoDeleteFile(Dir, Files[Idx]); + NotifyDeleteFile(Idx + 1, Files.Count); + end; + SysUtils.RemoveDir(Dir); + NotifyAfterDeleteDir; +end; + +procedure TDirectoryCopier.DoDeleteFile(const Dir, FileName: string); +begin + SysUtils.DeleteFile(ExcludeTrailingPathDelimiter(Dir) + PathDelim + FileName); +end; + +function TDirectoryCopier.GetFiles(const Dir: string): IStringList; +var + Files: TStringList; +begin + Files := TStringList.Create; + try + ListFiles(ExcludeTrailingPathDelimiter(Dir), '*.*', Files, False, True); + Result := TIStringList.Create(Files); + finally + Files.Free + end; +end; + +function TDirectoryCopier.GetProgress(Count, Goal: Cardinal): Single; +begin + Assert(Goal > 0, ClassName + '.GetProgress: Goal is zero'); + if Count >= Goal then + Exit(100.0); + Result := 100.0 * Count / Goal; +end; + +procedure TDirectoryCopier.Move(const SrcDir, DestDir: string); +begin + NotifyBegin; + DoCopyDir(SrcDir, DestDir); + DoDeleteDir(SrcDir); + NotifyEnd; +end; + +procedure TDirectoryCopier.NotifyAfterCopyDir; +begin + if Assigned(fOnAfterCopyDir) then + fOnAfterCopyDir(Self); +end; + +procedure TDirectoryCopier.NotifyAfterDeleteDir; +begin + if Assigned(fOnAfterDeleteDir) then + fOnAfterDeleteDir(Self); +end; + +procedure TDirectoryCopier.NotifyBegin; +begin + if Assigned(fOnBegin) then + fOnBegin(Self); +end; + +procedure TDirectoryCopier.NotifyCopyFile(FileIdx, TotalFiles: Cardinal); +begin + if Assigned(fOnCopyFileProgress) then + fOnCopyFileProgress(Self, GetProgress(FileIdx, TotalFiles)); +end; + +procedure TDirectoryCopier.NotifyDeleteFile(FileIdx, TotalFiles: Cardinal); +begin + if Assigned(fOnCopyFileProgress) then + fOnDeleteFileProgress(Self, GetProgress(FileIdx, TotalFiles)); +end; + +procedure TDirectoryCopier.NotifyEnd; +begin + if Assigned(fOnEnd) then + fOnEnd(Self); +end; + +end. From d4bb254d4830dcf5673baf081b5f1198d1dc87f9 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 16 Feb 2020 01:44:53 +0000 Subject: [PATCH 057/714] Refactored UUserDBMove to use UDirectoryCopier unit to move database files. --- Src/UUserDBMove.pas | 122 ++++++++++++++------------------------------ 1 file changed, 37 insertions(+), 85 deletions(-) diff --git a/Src/UUserDBMove.pas b/Src/UUserDBMove.pas index fdcce44b7..f5c790a84 100644 --- a/Src/UUserDBMove.pas +++ b/Src/UUserDBMove.pas @@ -19,8 +19,8 @@ interface uses - // Delphi - Classes; + // Project + UDirectoryCopier; type @@ -43,42 +43,29 @@ TUserDBMove = class(TObject) fOnCopyFile: TProgress; /// Reference to event handler for OnDeleteFile event. fOnDeleteFile: TProgress; - /// List of files in the database. - fDBFiles: TStrings; /// Directory of existing user database. fSourceDir: string; /// Required new database directory. fDestDir: string; - /// Triggers OnCopyFile event, with a percentage completeness - /// based on the given number of files copied. - procedure NotifyCopyFile(FileCount: Cardinal); - /// Triggers OnDeleteFile event, with a percentage completeness - /// based on the given number of files deleted. - procedure NotifyDeleteFile(FileCount: Cardinal); + /// Instance of class used to perform directory move. + fDirCopier: TDirectoryCopier; /// Validates source and destination directories. /// Raises EInOutError exception if either directory is not /// valid. procedure ValidateDirectories; - /// Calculates a returns percentage progress of towards a goal. - /// - /// Cardinal [in] Number of transactions completed - /// towards goal. - /// Cardinal [in] Number of transactions required to - /// reach goal. - function GetProgress(Count, Goal: Cardinal): Byte; - /// Performs database move operation and records new location. - /// - procedure DoMove; - /// Copies database file with given index in file list from old to - /// new database directories. - /// Triggers OnCopyFile event when the file has been copied. - /// - procedure CopyFile(const FileIdx: Cardinal); - /// Deletes database file with given index in file list from old - /// database directory. - /// Triggers OnDeleteFile event when the file has been deleted. - /// - procedure DeleteFile(const FileIdx: Cardinal); + /// Handles TDirectoryCopier.OnAfterCopyDir event to update user + /// database location. + /// Database location is updated once the database has been copied + /// but before old database directory is deleted. + procedure SetNewDBDirectory(Sender: TObject); + /// Handles TDirectoryCopier.OnCopyFileProgress event and passes + /// the given progress percentage on to this class' similar OnCopyFile + /// event. + procedure ReportCopyProgress(Sender: TObject; const Percent: Single); + /// Handles TDirectoryCopier.OnDeleteFileProgress event and passes + /// the given progress percentage on to this class' similar + /// OnDeleteFile event. + procedure ReportDeleteProgress(Sender: TObject; const Percent: Single); public /// Constructs and initialises new object instance. constructor Create; @@ -105,89 +92,54 @@ implementation uses // Delphi - SysUtils, IOUtils, Math, Windows {for inlining}, + SysUtils, IOUtils, // Project - UAppInfo, UDOSDateTime, UIOUtils, UStrUtils, UUtils; + UAppInfo, UStrUtils; { TUserDBMove } -procedure TUserDBMove.CopyFile(const FileIdx: Cardinal); -var - SrcFile, DestFile: string; - FileDate: IDOSDateTime; -begin - SrcFile := fSourceDir + PathDelim + fDBFiles[FileIdx]; - DestFile := fDestDir + PathDelim + fDBFiles[FileIdx]; - FileDate := TDOSDateTimeFactory.CreateFromFile(SrcFile); - TFileIO.CopyFile(SrcFile, DestFile); - FileDate.ApplyToFile(DestFile); - NotifyCopyFile(FileIdx); -end; - constructor TUserDBMove.Create; begin inherited Create; - fDBFiles := TStringList.Create; -end; - -procedure TUserDBMove.DeleteFile(const FileIdx: Cardinal); -begin - SysUtils.DeleteFile(fSourceDir + PathDelim + fDBFiles[FileIdx]); - NotifyDeleteFile(FileIdx); + fDirCopier := TDirectoryCopier.Create; + fDirCopier.OnAfterCopyDir := SetNewDBDirectory; + fDirCopier.OnCopyFileProgress := ReportCopyProgress; + fDirCopier.OnDeleteFileProgress := ReportDeleteProgress; end; destructor TUserDBMove.Destroy; begin - fDBFiles.Free; + fDirCopier.Free; inherited; end; -procedure TUserDBMove.DoMove; -var - FileIdx: Cardinal; -begin - fDBFiles.Clear; - ListFiles(fSourceDir, '*.*', fDBFiles, False, True); - // copy files - NotifyCopyFile(0); - EnsureFolders(fDestDir); - for FileIdx := 0 to Pred(fDBFiles.Count) do - CopyFile(FileIdx); - // record new location BEFORE deleting old directory - TAppInfo.ChangeUserDataDir(fDestDir); - // delete files - NotifyDeleteFile(0); - for FileIdx := 0 to Pred(fDBFiles.Count) do - DeleteFile(FileIdx); - SysUtils.RemoveDir(fSourceDir); -end; - -function TUserDBMove.GetProgress(Count, Goal: Cardinal): Byte; -begin - Assert(Goal > 0, ClassName + '.GetProgress: Goal is zero'); - Count := Min(Goal, Count); - Result := Round(100 * Count / Goal); -end; - procedure TUserDBMove.MoveTo(const ADirectory: string); begin fSourceDir := ExcludeTrailingPathDelimiter(TAppInfo.UserDataDir); fDestDir := ExcludeTrailingPathDelimiter(ADirectory); ValidateDirectories; - DoMove; + fDirCopier.Move(fSourceDir, fDestDir); end; -procedure TUserDBMove.NotifyCopyFile(FileCount: Cardinal); +procedure TUserDBMove.ReportCopyProgress(Sender: TObject; + const Percent: Single); begin if Assigned(fOnCopyFile) then - fOnCopyFile(Self, GetProgress(FileCount, fDBFiles.Count)); + fOnCopyFile(Self, Round(Percent)); end; -procedure TUserDBMove.NotifyDeleteFile(FileCount: Cardinal); +procedure TUserDBMove.ReportDeleteProgress(Sender: TObject; + const Percent: Single); begin if Assigned(fOnDeleteFile) then - fOnDeleteFile(Self, GetProgress(FileCount, fDBFiles.Count)); + fOnDeleteFile(Self, Round(Percent)); +end; + +procedure TUserDBMove.SetNewDBDirectory(Sender: TObject); +begin + // record new location BEFORE deleting old directory + TAppInfo.ChangeUserDataDir(fDestDir); end; procedure TUserDBMove.ValidateDirectories; From d3ccf7d2e23c51890e641cff00c6fc0ee0f1ec6d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 16 Feb 2020 01:48:36 +0000 Subject: [PATCH 058/714] Added URL of Code Snippets Database releases on GitHub --- Src/Web.UInfo.pas | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Web.UInfo.pas b/Src/Web.UInfo.pas index 95e6b74e0..92bc007b1 100644 --- a/Src/Web.UInfo.pas +++ b/Src/Web.UInfo.pas @@ -89,6 +89,10 @@ TWebInfo = class(TNoConstructObject) const /// URL of CodeSnip's GitHub page. GitHubURL = 'https://github.com/delphidabbler/codesnip'; + /// URL of the GitHub page where DelphiDabbler Code Snippets + /// database releases are hosted. + CSDBReleaseURL = 'https://github.com/' + + 'delphidabbler/code-snippets/releases'; /// URL of the online Code Snippets database. DatabaseURL = WebsiteURL + '/url/csdb'; /// URL used to make donations towards the CodeSnip project. From 8e410c44e7b6325ce1b561f215b32745c6e7ffd8 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 17 Feb 2020 01:57:35 +0000 Subject: [PATCH 059/714] Fixed bug referencing old name of a renamed frame class. --- Src/FmUserDataPathDlg.dfm | 2 +- Src/FmUserDataPathDlg.pas | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/FmUserDataPathDlg.dfm b/Src/FmUserDataPathDlg.dfm index 523898a3b..014df9466 100644 --- a/Src/FmUserDataPathDlg.dfm +++ b/Src/FmUserDataPathDlg.dfm @@ -170,7 +170,7 @@ inherited UserDataPathDlg: TUserDataPathDlg TabOrder = 0 end end - inline frmProgress: TUserDataPathDlgProgressFrame + inline frmProgress: TProgressFrame Left = 57 Top = 0 Width = 320 diff --git a/Src/FmUserDataPathDlg.pas b/Src/FmUserDataPathDlg.pas index 031d2418c..6776677ea 100644 --- a/Src/FmUserDataPathDlg.pas +++ b/Src/FmUserDataPathDlg.pas @@ -49,7 +49,7 @@ TUserDataPathDlg = class(TGenericViewDlg, INoPublicConstruct) lblPath: TLabel; lblWarning: TLabel; edPath: TEdit; - frmProgress: TUserDataPathDlgProgressFrame; + frmProgress: TProgressFrame; /// Dispays Browse For Folder dialogue box and copies any chosen /// folder to the edPath edit control. procedure actBrowseExecute(Sender: TObject); From b57c3a7745a917d8a6f0468361b7c7209c808d68 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 18 Feb 2020 02:27:58 +0000 Subject: [PATCH 060/714] Added two overloaded utility functions to test byte arrays for equality. --- Src/UUtils.pas | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Src/UUtils.pas b/Src/UUtils.pas index b66f18215..91e2347fb 100644 --- a/Src/UUtils.pas +++ b/Src/UUtils.pas @@ -144,6 +144,27 @@ function URIBaseName(const URI: string): string; /// Boolean. True if conversion succeeds, False if not. function TryStrToCardinal(const S: string; out Value: Cardinal): Boolean; +/// Test a given number of bytes from the start of two byte arrays for +/// equality. +/// TBytes [in] First byte array to be compared. +/// TBytes [in] Second byte array to be compared. +/// Cardinal [in] Number of bytes to be compared. Must be +/// greater than zero. +/// True if the required number of bytes in the arrays are equal and +/// both arrays have at least Count bytes. Otherwise False is returned. +/// +/// If either BA1 or BA1 have less than Count bytes then False is +/// returned, regardless of whether the arrays are equal. +function IsEqualBytes(const BA1, BA2: TBytes; const Count: Cardinal): + Boolean; overload; + +/// Checks if two byte arrays are equal. +/// TBytes [in] First byte array to be compared. +/// TBytes [in] Second byte array to be compared. +/// True if the two arrays are equal, False if not. +/// If both arrays are empty they are considered equal. +function IsEqualBytes(const BA1, BA2: TBytes): Boolean; overload; + implementation @@ -386,5 +407,31 @@ function TryStrToCardinal(const S: string; out Value: Cardinal): Boolean; Value := Int64Rec(Value64).Lo; end; +function IsEqualBytes(const BA1, BA2: TBytes; const Count: Cardinal): + Boolean; +var + I: Integer; +begin + Assert(Count > 0, 'IsEqualBytes: Count must be greater than zero'); + if (Length(BA1) < Int64(Count)) or (Length(BA2) < Int64(Count)) then + Exit(False); + for I := 0 to Pred(Count) do + if BA1[I] <> BA2[I] then + Exit(False); + Result := True; +end; + +function IsEqualBytes(const BA1, BA2: TBytes): Boolean; +var + I: Integer; +begin + if Length(BA1) <> Length(BA2) then + Exit(False); + for I := 0 to Pred(Length(BA1)) do + if BA1[I] <> BA2[I] then + Exit(False); + Result := True; +end; + end. From a66eadfa18434f25ccff29d0b318c6ce1c6e9bf0 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 18 Feb 2020 02:39:16 +0000 Subject: [PATCH 061/714] Added new TryStrToWord function. --- Src/UUtils.pas | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Src/UUtils.pas b/Src/UUtils.pas index 91e2347fb..d03e337d4 100644 --- a/Src/UUtils.pas +++ b/Src/UUtils.pas @@ -165,6 +165,14 @@ function IsEqualBytes(const BA1, BA2: TBytes; const Count: Cardinal): /// If both arrays are empty they are considered equal. function IsEqualBytes(const BA1, BA2: TBytes): Boolean; overload; +/// Attempts to convert a string to a Word value. +/// string [in] String to convert. +/// Word [out] Converted value. +/// Boolean. True if conversion succeeded, False otherwise. +/// String must represent a non-negative integer that is representable +/// as a Word. +function TryStrToWord(const S: string; out W: Word): Boolean; + implementation @@ -433,5 +441,17 @@ function IsEqualBytes(const BA1, BA2: TBytes): Boolean; Result := True; end; +function TryStrToWord(const S: string; out W: Word): Boolean; +var + I: Integer; +begin + Result := TryStrToInt(S, I); + if not Result then + Exit; + if (I < 0) or (I > High(Word)) then + Exit(False); + W := Word(I); +end; + end. From f456b2fb79a95009a0902a2d11c338cc28ff804c Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 18 Feb 2020 02:40:44 +0000 Subject: [PATCH 062/714] Added new TVersionNumber.TryStrToVersionNumber method. Recast string to TVersionNumber cast in terms of TryStrToVersionNumber. --- Src/UVersionInfo.pas | 46 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/Src/UVersionInfo.pas b/Src/UVersionInfo.pas index b51743ba4..a0c300515 100644 --- a/Src/UVersionInfo.pas +++ b/Src/UVersionInfo.pas @@ -33,6 +33,7 @@ interface Record representing the four fields of a version number. } TVersionNumber = record + public V1: Word; // Major version number V2: Word; // Minor version number V3: Word; // Revision version number @@ -41,6 +42,16 @@ TVersionNumber = record {Creates a nul version number with all fields set to zero. @return Required nul record. } + /// Attempts to convert a string to a version number. + /// string [in] String to convert. + /// Word [out] Converted version number. + /// Boolean. True if conversion succeeded, False otherwise. + /// + /// String must represent a dotted quad of non-negative integers, + /// separated by dots, where each integer must be representable as a Word. + /// + class function TryStrToVersionNumber(const S: string; + out V: TVersionNumber): Boolean; static; class operator LessThanOrEqual(Ver1, Ver2: TVersionNumber): Boolean; {Operator overload that compares two version numbers to check if first is less than or equal to the second. @@ -150,7 +161,8 @@ implementation // Delphi SysUtils, // Project - UIStringList; + UIStringList, + UUtils; { TVersionInfo } @@ -290,16 +302,11 @@ class function TVersionInfo.SpecialBuildStr: string; @return Converted version number. @except EConvertError. raised if string in wrong format. } -var - Parts: IStringList; // contains parts of version number +resourcestring + sError = '"%s" is not a valid version number'; begin - Parts := TIStringList.Create(Str, '.', False, True); - while Parts.Count < 4 do - Parts.Add('0'); - Result.V1 := StrToInt(Parts[0]); - Result.V2 := StrToInt(Parts[1]); - Result.V3 := StrToInt(Parts[2]); - Result.V4 := StrToInt(Parts[3]); + if not TryStrToVersionNumber(Str, Result) then + raise EConvertError.CreateFmt(sError, [Str]); end; class operator TVersionNumber.Implicit(Ver: TPJVersionNumber): TVersionNumber; @@ -359,5 +366,24 @@ class function TVersionNumber.Nul: TVersionNumber; Result.V4 := 0; end; +class function TVersionNumber.TryStrToVersionNumber(const S: string; + out V: TVersionNumber): Boolean; +var + Parts: IStringList; // contains parts of version number +begin + Parts := TIStringList.Create(S, '.', False, True); + while Parts.Count < 4 do + Parts.Add('0'); + if not TryStrToWord(Parts[0], V.V1) then + Exit(False); + if not TryStrToWord(Parts[1], V.V2) then + Exit(False); + if not TryStrToWord(Parts[2], V.V3) then + Exit(False); + if not TryStrToWord(Parts[3], V.V4) then + Exit(False); + Result := True; +end; + end. From ac9669b3d9d72a459f769e877b67a80869b4ee35 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 18 Feb 2020 02:43:10 +0000 Subject: [PATCH 063/714] Made CheckBOM method of TFileIO public and added some overloads. In addition to original method that operates on TBytes their are now file name and stream overloads. Also refactored original CheckBOM method. --- Src/UIOUtils.pas | 80 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 72 insertions(+), 8 deletions(-) diff --git a/Src/UIOUtils.pas b/Src/UIOUtils.pas index 9708d1464..470968da0 100644 --- a/Src/UIOUtils.pas +++ b/Src/UIOUtils.pas @@ -33,8 +33,6 @@ interface /// TFileIO = record strict private - class function CheckBOM(const Bytes: TBytes; const Encoding: TEncoding): - Boolean; static; /// /// Appends whole contents of a byte array to a stream. /// @@ -45,6 +43,38 @@ TFileIO = record /// class function StreamToBytes(const Stream: TStream): TBytes; static; public + /// Checks if given byte array begins with the BOM of the given + /// encoding. + /// + /// If the given encoding does not have a BOM then False is + /// returned. + /// If the byte array has fewer bytes than the required BOM then + /// False is returned. + /// + class function CheckBOM(const Bytes: TBytes; const Encoding: TEncoding): + Boolean; overload; static; + /// Checks if given stream begins with the BOM of the given + /// encoding. + /// + /// Stream must support changing the current position otherwise an + /// exception will be raised. + /// If the given encoding does not have a BOM then False is + /// returned. + /// If the stream has fewer bytes than the required BOM then False + /// is returned. + /// + class function CheckBOM(const Stream: TStream; const Encoding: TEncoding): + Boolean; overload; static; + /// Checks if given file begins with the BOM of the given + /// encoding. + /// + /// If the given encoding does not have a BOM then False is + /// returned. + /// If the file has fewer bytes than the required BOM then False + /// is returned. + /// + class function CheckBOM(const FileName: TFileName; + const Encoding: TEncoding): Boolean; overload; static; /// /// Writes all the bytes from a byte array to a file. /// @@ -138,6 +168,11 @@ EIOUtils = class(Exception); implementation +uses + // Project + UUtils; + + resourcestring // Error messages sBadBOM = 'Preamble of file %s does not match expected encoding'; @@ -156,17 +191,46 @@ class function TFileIO.CheckBOM(const Bytes: TBytes; const Encoding: TEncoding): Boolean; var Preamble: TBytes; - I: Integer; begin + Assert(Assigned(Encoding), 'TFileIO.CheckBOM: Encoding is nil'); Preamble := Encoding.GetPreamble; if Length(Preamble) = 0 then Exit(False); - if Length(Bytes) < Length(Preamble) then + Result := IsEqualBytes(Bytes, Preamble, Length(Preamble)); +end; + +class function TFileIO.CheckBOM(const Stream: TStream; + const Encoding: TEncoding): Boolean; +var + Bytes: TBytes; + Preamble: TBytes; + OldPos: Int64; +begin + Assert(Assigned(Stream), 'TFileIO.CheckBOM: Stream is nil'); + Assert(Assigned(Encoding), 'TFileIO.CheckBOM: Encoding is nil'); + Preamble := Encoding.GetPreamble; + if Stream.Size < Length(Preamble) then Exit(False); - for I := 0 to Pred(Length(Preamble)) do - if Bytes[I] <> Preamble[I] then - Exit(False); - Result := True; + OldPos := Stream.Position; + SetLength(Bytes, Length(Preamble)); + Stream.Position := 0; + Stream.ReadBuffer(Pointer(Bytes)^, Length(Preamble)); + Stream.Position := OldPos; + Result := IsEqualBytes(Bytes, Preamble); +end; + +class function TFileIO.CheckBOM(const FileName: TFileName; + const Encoding: TEncoding): Boolean; +var + Stream: TStream; +begin + Assert(Assigned(Encoding), 'TFileIO.CheckBOM: Encoding is nil'); + Stream := TFileStream.Create(FileName, fmOpenRead or fmShareDenyNone); + try + Result := CheckBOM(Stream, Encoding); + finally + Stream.Free; + end; end; class procedure TFileIO.CopyFile(const SrcFileName, DestFileName: string); From a229ce327d913d1bd2f4b4912839cb7888cfbadd Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 18 Feb 2020 19:17:03 +0000 Subject: [PATCH 064/714] Added new StrArrayToStrList procedure --- Src/UStrUtils.pas | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Src/UStrUtils.pas b/Src/UStrUtils.pas index 1ca425c3f..f6f5a8151 100644 --- a/Src/UStrUtils.pas +++ b/Src/UStrUtils.pas @@ -251,6 +251,14 @@ function StrIf(const Condition: Boolean; const TrueStr, FalseStr: string): /// in Escapes. function StrBackslashEscape(const S, Escapable, Escapes: string): string; +/// Sets a given string list to have the same elements as a given +/// string array. +/// +/// Any existing contents of the string list are lost. +/// The string list must not be nil. +/// +procedure StrArrayToStrList(const SA: array of string; const SL: TStrings); + implementation @@ -844,5 +852,15 @@ function StrBackslashEscape(const S, Escapable, Escapes: string): string; end; end; +procedure StrArrayToStrList(const SA: array of string; const SL: TStrings); +var + S: string; +begin + Assert(Assigned(SL), 'StrArrayToStrList: SL is nil'); + SL.Clear; + for S in SA do + SL.Add(S); +end; + end. From 37de328cf0e7711705186e2663484f302d0d4335 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 20 Feb 2020 02:25:00 +0000 Subject: [PATCH 065/714] Added TVersionNumber.IsNull method --- Src/UVersionInfo.pas | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Src/UVersionInfo.pas b/Src/UVersionInfo.pas index a0c300515..1cabc7dae 100644 --- a/Src/UVersionInfo.pas +++ b/Src/UVersionInfo.pas @@ -38,6 +38,9 @@ TVersionNumber = record V2: Word; // Minor version number V3: Word; // Revision version number V4: Word; // Build number + /// Checks if this version number is Null. + /// Boolean. True if null, False otherwise. + function IsNull: Boolean; class function Nul: TVersionNumber; static; {Creates a nul version number with all fields set to zero. @return Required nul record. @@ -309,6 +312,11 @@ class function TVersionInfo.SpecialBuildStr: string; raise EConvertError.CreateFmt(sError, [Str]); end; +function TVersionNumber.IsNull: Boolean; +begin + Result := Self = TVersionNumber.Nul; +end; + class operator TVersionNumber.Implicit(Ver: TPJVersionNumber): TVersionNumber; {Operator overload that perfoms implicit conversion of a TPJVersionNumber (from PJVersionInfo unit) to a TVersionNumber. From a99de36f68c1cb3cbb94b43e0a065e1c651a344c Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 20 Feb 2020 02:46:03 +0000 Subject: [PATCH 066/714] Fixed broken xmldoc comments --- Src/UEncodings.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/UEncodings.pas b/Src/UEncodings.pas index b495a8738..61e08acf4 100644 --- a/Src/UEncodings.pas +++ b/Src/UEncodings.pas @@ -62,19 +62,19 @@ TEncodedData = record /// /// Constructs encoded data from array of bytes and specified encoding /// type. + /// /// TBytes [in] Source of data. /// TEncodingType [in] Type of encoding that /// was used to create byte array. - /// constructor Create(const AData: TBytes; const AEncodingType: TEncodingType); overload; /// /// Constructs encoded data from a Unicode string and specified encoding /// type. + /// /// string [in] Source of data. /// TEncodingType [in] Type of encoding to be /// used to encode string. - /// constructor Create(const AStr: string; const AEncodingType: TEncodingType); overload; /// From a2e28d234514e262c8f77debc5975d744bb163bf Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 21 Feb 2020 02:40:14 +0000 Subject: [PATCH 067/714] Added new unit to read main database meta data Also added new resource containing default main database license to use with v1 of the database --- Src/CodeSnip.dpr | 1 + Src/CodeSnip.dproj | 1 + Src/DB.UMetaData.pas | 957 +++++++++++++++++++++++++++++++ Src/Res/Misc/CSDB-v1-License.txt | 21 + Src/Resources.rc | 6 + 5 files changed, 986 insertions(+) create mode 100644 Src/DB.UMetaData.pas create mode 100644 Src/Res/Misc/CSDB-v1-License.txt diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 2f379f8a3..403526597 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -71,6 +71,7 @@ uses DB.UCategory in 'DB.UCategory.pas', DB.UDatabaseIO in 'DB.UDatabaseIO.pas', DB.UMain in 'DB.UMain.pas', + DB.UMetaData in 'DB.UMetaData.pas', DB.USnippet in 'DB.USnippet.pas', DB.USnippetKind in 'DB.USnippetKind.pas', DBIO.UFileIOIntf in 'DBIO.UFileIOIntf.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 8be513a80..74fec0f3a 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -71,6 +71,7 @@ + diff --git a/Src/DB.UMetaData.pas b/Src/DB.UMetaData.pas new file mode 100644 index 000000000..a1e61f9e0 --- /dev/null +++ b/Src/DB.UMetaData.pas @@ -0,0 +1,957 @@ +{ + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/ + * + * Copyright (C) 2020, Peter Johnson (www.delphidabbler.com). + * + * Provides meta data for the current main database and for any database + * updates. +} + + +unit DB.UMetaData; + +{ + Notes About Database Versions And Meta Files. + ============================================= + + Versions + -------- + + v1 of the Code Snippets Database was not considered to have a version number + until the arrival of v2. Therefore v1 did not have any means of identifying + its version number. Although the database format changed slightly over time + there is not enough historical information to identify different minor + releases, so all are considered to be v1.0.0.0 + + Database v2 has a VERSION file that specifies the version number as a dotted + quad, of the form v2.0.0.0. + + Note that semantic versioning is now being used so any database with major + version 2 will be backwards compatible with earlier v2 minor release. + + If a breaking change is introduced the major version will be bumped to v3 and + so on. + + Meta Files + ---------- + + Database v1 had only two meta files: + + contrib.txt - lists of contributors to the database, one per line + + testers.txt - lists of database testers, one per line + If those two files are present the database is assumed to be v1 + + Database v2 has the following meta files: + + VERSION - version number (v2.x.x.x) + + CONTRIBUTORS - lists of contributors to the database, one per line + + TESTERS - lists of database testers, one per line + + LICENSE - full text of the license that applies to the snippets + + LICENSE-INFO - furter information about the license + + For database v1 the license text, license information are hard-wired in the + absence of meta files. As noted above the version number is deduced. + + File encoding + ------------- + + All meta files are plain text. + + Early v1 database meta files were encoded in the system default encoding. + Later v1 databases encoded meta files in UTF-8. To distinguish between UTF-8 + and default encoded files the UTF-8 files use the UTF-8 preamble (BOM). + + v2 database meta files are all encoded in UTF-8 with preamble (BOM). + + Future major versions + --------------------- + + Future major database releases MUST include backwards compatibility with + earlier versions of CodeSnip in as much as those versions must be able to + easily detect and reject the format. + + To achieve this new major releases MUST include a VERSION file encoded in + UTF-8 with BOM. Existing code can detect and will reject any unsupported + version. + + CodeSnip support + ---------------- + + CodeSnip versions earlier than v4.16 are only ever delivered v1 database files + via their built in web update code. There is no way for these versions to + access v2 databases. + + CodeSnip from v4.16 get their main snippets database from files downloaded + manually. All such databases are v2. CodeSnip v4.16 also supports v1 format + because such a database may be resident on the user's computer at install + time. +} + + +interface + + +uses + // VCL + Classes, + // Project + UExceptions, + UIStringList, + UVersionInfo; + + +type + + /// Record providing information about the main database license. + /// + TDBLicenseInfo = record + strict private + fName: string; + fSPDX: string; + fURL: string; + fText: string; + public + /// Record constructor: sets all fields of record. + constructor Create(const AName, ASPDX, AURL, AText: string); + /// Name of license. + property Name: string read fName; + /// Open Source Initiative SPDX short idenitifier for licenses. + /// + /// If the license is not supported by the Open Source Initiative + /// then this property will be the empty string. + property SPDX: string read fSPDX; + /// URL of license online. + /// Optional. + property URL: string read fURL; + /// Full text of license. + property Text: string read fText; + end; + + /// Record providing informaton about the main database copyright. + /// + TDBCopyrightInfo = record + strict private + fDate: string; + fHolder: string; + fHolderURL: string; + public + /// Record constructor: sets all fields of record. + constructor Create(const ADate, AHolder, AHolderURL: string); + /// Copyright date. + /// May be a single year or a range: e.g. 2020 or 2012-2016. + /// + property Date: string read fDate; + /// Name of copyright holder. + property Holder: string read fHolder; + /// URL of main copyright holder. + /// Optional. + property HolderURL: string read fHolderURL; + end; + + /// Interface supported by classes providing database meta data. + /// + IDBMetaData = interface(IInterface) + /// Returns database version number. + /// A null version number is returned if the meta data does not + /// come from a recognised database. + function GetVersion: TVersionNumber; + /// Returns database license information. + /// Return value is meaningless if the meta data does not come + /// from a supported database. + function GetLicenseInfo: TDBLicenseInfo; + /// Returns database copyright informatiom. + /// Return value is meaningless if the meta data does not come + /// from a supported database. + function GetCopyrightInfo: TDBCopyrightInfo; + /// Returns list of contributors to database. + /// Return value is meaningless if the meta data does not come + /// from a supported database. + function GetContributors: IStringList; + /// Returns list of testers of database. + /// Return value is meaningless if the meta data does not come + /// from a supported database. + function GetTesters: IStringList; + /// Checks if meta data is recognised as belonging to a valid + /// database, whether supported or not. + function IsRecognised: Boolean; + /// Checks if meta data is recognised as belonging to a supported + /// database version. + function IsSupportedVersion: Boolean; + /// Checks if meta data is corrupt. + /// Should only be called if meta data belongs to a supported + /// database. An exception should be raised if called on unsupported + /// versions. + function IsCorrupt: Boolean; + /// Refreshes the meta information by re-reading from database + /// meta files. + procedure Refresh; + end; + + /// Factory that creates instances of objects that provide + /// information about the main database and database updates. + TMainDBMetaDataFactory = record + strict private + class var + /// Stores reference to a singleton instance of class that + /// provides information about the main database. + fMainDBSingleton: IDBMetaData; + public + /// Returns instance of class that provides meta data for the + /// main database. + class function MainDBMetaDataInstance: IDBMetaData; static; + /// Returns instance of class that provides meta data for the + /// database update stored in the given folder. + class function UpdateMetaDataInstance(const UpdateDir: string): + IDBMetaData; static; + end; + + /// Class of exception raised by meta data classes. + EDBMetaData = class(ECodeSnip); + + +implementation + + +uses + // Project + SysUtils, + IOUtils, + Types, + // VCL + UAppInfo, + UEncodings, + UIOUtils, + UResourceUtils, + UStructs, + UStrUtils; + + +const + DBValidVersions: TRange = (Min: 1; Max: 2); + +type + + /// Provides names of meta data files supported by various database + /// versions. + TDBMetaFileNames = record + public + const + ContributorsV1 = 'contrib.txt'; + TestersV1 = 'testers.txt'; + VersionV2AndLater = 'VERSION'; + LicenseV2 = 'LICENSE'; + LicenseInfoV2 = 'LICENSE-INFO'; + ContributorsV2 = 'CONTRIBUTORS'; + TestersV2 = 'TESTERS'; + end; + + /// Abstract base class for classes that access or emulate database + /// meta data files. + TDBMetaFiles = class abstract(TObject) + strict private + var + /// Directory of database for which meta data files are being + /// accessed. + fDBDir: string; + /// Returns encoding used by given meta file. + function GetFileEncoding(const FileName: TFileName): TEncoding; + strict protected + /// Makes a fully specified path to a given database file. + /// + /// FileName must contain no path information. + function MakePath(const FileName: string): string; + /// Checks if a given file exists in database directory. + function DBFileExists(const FileName: string): Boolean; + /// Reads all lines from given file and returns them as an array. + /// + /// FileName must contain no path information. + function ReadFileLines(const FileName: TFileName): TStringDynArray; + /// Reads all text from given file and returns it. + /// FileName must contain no path information. + function ReadFileText(const FileName: TFileName): string; + public + /// Constructs object that accesses meta data database files in + /// given directory. + constructor Create(const DBDir: string); + /// Returns text of the version file, or surrogate value. + /// + function Version: string; virtual; abstract; + /// Returns content license text file or surrogate value. + /// + function LicenseText: string; virtual; abstract; + /// Returns lines of license information file or surrogate value. + /// + function LicenseInfo: TStringDynArray; virtual; abstract; + /// Returns lines of contributors file or surrogate value. + /// + function Contributors: TStringDynArray; virtual; abstract; + /// Returns lines of testers file or surrogate value. + function Testers: TStringDynArray; virtual; abstract; + /// Checks if all the expected meta files are present. Returns + /// True if so or False if not. + /// ENotSupportedException must be raised if called on an + /// unsupported database version. + function AreAllFilesPresent: Boolean; virtual; abstract; + end; + + /// Class that accesses content of version 1 main database meta data + /// files. + /// Not all meta files are present in version main databases so + /// invariant placeholder content is provided to substitute for missing + /// files. + TV1DBMetaFiles = class sealed(TDBMetaFiles) + strict private + const + cContributorsFile = TDBMetaFileNames.ContributorsV1; + cTestersFile = TDBMetaFileNames.TestersV1; + public + /// Returns an surrogate, invariant value of 1 for the version + /// number. + /// No version file exists for this database version. The value + /// returned is deduced using documentation from the current code snippets + /// database project. + function Version: string; override; + /// Returns an surrogate, invariant value for the license text. + /// + /// No license text file exists for this database version. The + /// value returned is based on documentation of the database. + function LicenseText: string; override; + /// Returns an surrogate, invariant value for the lines of license + /// information. + function LicenseInfo: TStringDynArray; override; + /// Returns the lines of the contributors file. + function Contributors: TStringDynArray; override; + /// Returns the lines of the testers file. + function Testers: TStringDynArray; override; + /// Checks if all the expected meta files are present. Returns + /// True if so or False if not. + function AreAllFilesPresent: Boolean; override; + end; + + /// Class that accesses content of supported version 2 main database + /// meta files. + TV2DBMetaFiles = class sealed(TDBMetaFiles) + strict private + const + cVersionFile = TDBMetaFileNames.VersionV2AndLater; + cLicenseFile = TDBMetaFileNames.LicenseV2; + cLicenseInfoFile = TDBMetaFileNames.LicenseInfoV2; + cContributorsFile = TDBMetaFileNames.ContributorsV2; + cTestersFile = TDBMetaFileNames.TestersV2; + public + /// Returns the contents of the version file. + function Version: string; override; + /// Returns the contents of the license text file. + function LicenseText: string; override; + /// Returns the lines of the license info file. + function LicenseInfo: TStringDynArray; override; + /// Returns the lines of the contributors file. + function Contributors: TStringDynArray; override; + /// Returns the lines of the testers file. + function Testers: TStringDynArray; override; + /// Checks if all the expected meta files are present. Returns + /// True if so or False if not. + function AreAllFilesPresent: Boolean; override; + end; + + /// Class that represents later versions of database meta file + /// formats. + /// These formats have a valid version file but the version is not + /// supported and nothing is known about any other meta data files. + TLaterDBMetaFiles = class sealed(TDBMetaFiles) + strict private + const + cVersionFile = TDBMetaFileNames.VersionV2AndLater; + public + /// Returns the contents of the version file. + function Version: string; override; + /// Returns the empty string. + /// The file format is unknown, so the license text file cannot be + /// read and there is no information to deduce the value. + function LicenseText: string; override; + /// Returns an empty string array. + /// The file format is unknown, so the license information file + /// cannot be read and there is no information to deduce the value. + /// + function LicenseInfo: TStringDynArray; override; + /// Returns an empty string array. + /// The file format is unknown, so the contributors file cannot be + /// read and there is no information to deduce the value. + function Contributors: TStringDynArray; override; + /// Returns an empty string array. + /// The file format is unknown, so the testers file cannot be read + /// and there is no information to deduce the value. + function Testers: TStringDynArray; override; + /// Checks if all the expected meta files are present only if + /// the meta files come from a supported database format. + /// ENotSupportedException always raised since there is no way + /// of knowing what files should be present in an unsupported database + /// format. + function AreAllFilesPresent: Boolean; override; + end; + + /// Class that is present to represent unknown database meta file + /// formats. + /// Accesses no files and returns null results for all methods + /// except IsVersionSupported. + TUnknownMetaFiles = class sealed(TDBMetaFiles) + public + /// Returns the empty string. + /// The file format is unknown, so the version file cannot be read + /// and there is no information to deduce the value. + function Version: string; override; + /// Returns the empty string. + /// The file format is unknown, so the license text file cannot be + /// read and there is no information to deduce the value. + function LicenseText: string; override; + /// Returns an empty string array. + /// The file format is unknown, so the license information file + /// cannot be read and there is no information to deduce the value. + /// + function LicenseInfo: TStringDynArray; override; + /// Returns an empty string array. + /// The file format is unknown, so the contributors file cannot be + /// read and there is no information to deduce the value. + function Contributors: TStringDynArray; override; + /// Returns an empty string array. + /// The file format is unknown, so the testers file cannot be read + /// and there is no information to deduce the value. + function Testers: TStringDynArray; override; + /// Checks if all the expected meta files are present only if + /// the meta files come from a supported database format. + /// ENotSupportedException always raised since there is no way + /// of knowing what files should be present in an unrecognised database + /// format. + function AreAllFilesPresent: Boolean; override; + end; + + /// Factory to create the correct instance of database meta file + /// classes that can read the version of a database in a given folder. + /// + TDBMetaFilesFactory = record + public + class function GetInstance(const DBDir: string): TDBMetaFiles; + static; + end; + + /// Abstract base class for classes that provide main database meta + /// data. + TAbstractMainDBMetaData = class abstract(TInterfacedObject) + strict private + var + fMetaFiles: TDBMetaFiles; + fIsVersionLoaded: Boolean; + fVersion: TVersionNumber; + fIsLicenseAndCopyrightInfoLoaded: Boolean; + fLicenseInfo: TDBLicenseInfo; + fCopyrightInfo: TDBCopyrightInfo; + fContributors: IStringList; + fTesters: IStringList; + + procedure LoadLicenseAndCopyrightInfo; + + strict protected + function GetDBDir: string; virtual; abstract; + public + constructor Create; + procedure AfterConstruction; override; + destructor Destroy; override; + /// Returns database version number. + /// + /// A null version number is returned if the meta data does not come + /// from a recognised database. + /// Method of IDBMetaData. + /// + function GetVersion: TVersionNumber; + /// Returns database license information. + /// + /// Return value is meaningless if the meta data does not come + /// from a supported database. + /// Method of IDBMetaData. + /// + function GetLicenseInfo: TDBLicenseInfo; + /// Returns database copyright informatiom. + /// + /// Return value is meaningless if the meta data does not come + /// from a supported database. + /// Method of IDBMetaData. + /// + function GetCopyrightInfo: TDBCopyrightInfo; + /// Returns list of contributors to database. + /// + /// Return value is meaningless if the meta data does not come + /// from a supported database. + /// Method of IDBMetaData. + /// + function GetContributors: IStringList; + /// Returns list of testers of database. + /// + /// Return value is meaningless if the meta data does not come + /// from a supported database. + /// Method of IDBMetaData. + /// + function GetTesters: IStringList; + /// Checks if meta data is recognised as belonging to a valid + /// database, whether supported or not. + /// Method of IDBMetaData. + function IsRecognised: Boolean; + /// Checks if meta data is recognised as belonging to a supported + /// database version. + /// Method of IDBMetaData. + function IsSupportedVersion: Boolean; + /// Checks if meta data is corrupt. + /// + /// Should only be called if meta data belongs to a supported + /// database. + /// Method of IDBMetaData. + /// + /// ENotSupportedException raised if called on an unsupported + /// database. + function IsCorrupt: Boolean; + /// Refreshes the meta information by re-reading from database + /// meta files. + /// Method of IDBMetaData. + procedure Refresh; + end; + + /// Class that provides meta data for the main database. + TMainDBMetaData = class sealed(TAbstractMainDBMetaData, IDBMetaData) + strict protected + function GetDBDir: string; override; + end; + + /// Class that provides meta data for update database directories. + /// + TUpdateDBMetaData = class sealed(TAbstractMainDBMetaData, IDBMetaData) + strict private + var + fUpdateDir: string; + strict protected + function GetDBDir: string; override; + public + constructor Create(const UpdateDir: string); + end; + +{ TMainDBMetaDataFactory } + +class function TMainDBMetaDataFactory.MainDBMetaDataInstance: + IDBMetaData; +begin + if not Assigned(fMainDBSingleton) then + fMainDBSingleton := TMainDBMetaData.Create; + Result := fMainDBSingleton; +end; + +class function TMainDBMetaDataFactory.UpdateMetaDataInstance( + const UpdateDir: string): IDBMetaData; +begin + Result := TUpdateDBMetaData.Create(UpdateDir); +end; + +{ TAbstractMainDBMetaData } + +procedure TAbstractMainDBMetaData.AfterConstruction; +begin + inherited; + Refresh; +end; + +constructor TAbstractMainDBMetaData.Create; +begin + inherited; +// Refresh; +end; + +destructor TAbstractMainDBMetaData.Destroy; +begin + fMetaFiles.Free; + inherited; +end; + +function TAbstractMainDBMetaData.GetContributors: IStringList; +begin + if not Assigned(fContributors) then + fContributors := TIStringList.Create(fMetaFiles.Contributors); + Result := fContributors; +end; + +function TAbstractMainDBMetaData.GetCopyrightInfo: TDBCopyrightInfo; +begin + if not fIsLicenseAndCopyrightInfoLoaded then + LoadLicenseAndCopyrightInfo; + Result := fCopyrightInfo; +end; + +function TAbstractMainDBMetaData.GetLicenseInfo: TDBLicenseInfo; +begin + if not fIsLicenseAndCopyrightInfoLoaded then + LoadLicenseAndCopyrightInfo; + Result := fLicenseInfo; +end; + +function TAbstractMainDBMetaData.GetTesters: IStringList; +begin + if not Assigned(fTesters) then + fTesters := TIStringList.Create(fMetaFiles.Testers); + Result := fTesters; +end; + +function TAbstractMainDBMetaData.GetVersion: TVersionNumber; +begin + if not fIsVersionLoaded then + begin + if not TVersionNumber.TryStrToVersionNumber( + StrTrim(fMetaFiles.Version), fVersion + ) then + fVersion := TVersionNumber.Nul; + end; + fIsVersionLoaded := True; + Result := fVersion; +end; + +function TAbstractMainDBMetaData.IsCorrupt: Boolean; +resourcestring + sNotSupportedError = 'Can''t call IDBMetaData.IsCorrupt for an unsupported ' + + 'database version'; +begin + if not IsSupportedVersion then + raise ENotSupportedException.Create(sNotSupportedError); + Result := not fMetaFiles.AreAllFilesPresent; +end; + +function TAbstractMainDBMetaData.IsRecognised: Boolean; +begin + Result := not GetVersion.IsNull; +end; + +function TAbstractMainDBMetaData.IsSupportedVersion: Boolean; +var + ThisVersion: TVersionNumber; +begin + ThisVersion := GetVersion; + Result := DBValidVersions.Contains(ThisVersion.V1); +end; + +procedure TAbstractMainDBMetaData.LoadLicenseAndCopyrightInfo; +var + SL: TStringList; +begin + if fIsLicenseAndCopyrightInfoLoaded then + Exit; + SL := TStringList.Create; + try + StrArrayToStrList(fMetaFiles.LicenseInfo, SL); + fLicenseInfo := TDBLicenseInfo.Create( + SL.Values['LicenseName'], + SL.Values['LicenseSPDX'], + SL.Values['LicenseURL'], + fMetaFiles.LicenseText + ); + fCopyrightInfo := TDBCopyrightInfo.Create( + SL.Values['CopyrightDate'], + SL.Values['CopyrightHolder'], + SL.Values['CopyrightHolderURL'] + ); + finally + SL.Free; + end; + fIsLicenseAndCopyrightInfoLoaded := True; +end; + +procedure TAbstractMainDBMetaData.Refresh; +begin + FreeAndNil(fMetaFiles); + fMetaFiles := TDBMetaFilesFactory.GetInstance(GetDBDir); + fIsVersionLoaded := False; + fIsLicenseAndCopyrightInfoLoaded := False; + fContributors := nil; + fTesters := nil; +end; + +{ TMainDBMetaData } + +function TMainDBMetaData.GetDBDir: string; +begin + Result := TAppInfo.AppDataDir; +end; + +{ TUpdateDBMetaData } + +constructor TUpdateDBMetaData.Create(const UpdateDir: string); +begin + inherited Create; + fUpdateDir := ExcludeTrailingPathDelimiter(UpdateDir); +end; + +function TUpdateDBMetaData.GetDBDir: string; +begin + Result := fUpdateDir; +end; + +{ TDBMetaFiles } + +constructor TDBMetaFiles.Create(const DBDir: string); +begin + inherited Create; + fDBDir := DBDir; +end; + +function TDBMetaFiles.DBFileExists(const FileName: string): Boolean; +begin + Result := TFile.Exists(MakePath(FileName), False); +end; + +function TDBMetaFiles.GetFileEncoding(const FileName: TFileName): TEncoding; +begin + // Old v1 database meta files may be in the system default encodings, v1 and + // all v2 and later use UTF-8 with BOM. + if TFileIO.CheckBOM(MakePath(FileName), TEncoding.UTF8) then + Result := TEncoding.UTF8 + else + Result := TEncoding.Default; +end; + +function TDBMetaFiles.MakePath(const FileName: string): string; +begin + Assert(not StrContainsStr(PathDelim, FileName), + ClassName + '.MakePath: FileName must be a base file name.'); + Result := IncludeTrailingPathDelimiter(fDBDir) + FileName; +end; + +function TDBMetaFiles.ReadFileLines(const FileName: TFileName): TStringDynArray; +var + Encoding: TEncoding; +begin + if not DBFileExists(FileName) then + begin + SetLength(Result, 0); + Exit; + end; + Encoding := GetFileEncoding(FileName); + try + Result := TFileIO.ReadAllLines(MakePath(FileName), Encoding, True); + finally + TEncodingHelper.FreeEncoding(Encoding); + end; +end; + +function TDBMetaFiles.ReadFileText(const FileName: TFileName): string; +begin + if not DBFileExists(FileName) then + Exit(''); + Result := TFileIO.ReadAllText( + MakePath(FileName), GetFileEncoding(FileName), True + ); +end; + +{ TV1DBMetaFiles } + +function TV1DBMetaFiles.AreAllFilesPresent: Boolean; +begin + Result := DBFileExists(cContributorsFile) and DBFileExists(cTestersFile); +end; + +function TV1DBMetaFiles.Contributors: TStringDynArray; +begin + Result := ReadFileLines(cContributorsFile) +end; + +function TV1DBMetaFiles.LicenseInfo: TStringDynArray; +begin + Result := TStringDynArray.Create( + 'LicenseName=MIT License', + 'LicenseSPDX=MIT', + 'LicenseURL=https://opensource.org/licenses/MIT', + 'CopyrightDate=2005-2016', + 'CopyrightHolder=Peter Johnson & Contributors', + 'CopyrightHolderURL=http://gravatar.com/delphidabbler' + ); +end; + +function TV1DBMetaFiles.LicenseText: string; +begin + Result := LoadResourceAsString(HInstance, 'CSDBLICENSE', RT_RCDATA, etUTF8); +end; + +function TV1DBMetaFiles.Testers: TStringDynArray; +begin + Result := ReadFileLines(cTestersFile); +end; + +function TV1DBMetaFiles.Version: string; +begin + Result := '1'; +end; + +{ TV2DBMetaFiles } + +function TV2DBMetaFiles.AreAllFilesPresent: Boolean; +begin + Result := DBFileExists(cVersionFile) + and DBFileExists(cLicenseFile) + and DBFileExists(cLicenseInfoFile) + and DBFileExists(cContributorsFile) + and DBFileExists(cTestersFile); +end; + +function TV2DBMetaFiles.Contributors: TStringDynArray; +begin + Result := ReadFileLines(cContributorsFile); +end; + +function TV2DBMetaFiles.LicenseInfo: TStringDynArray; +begin + Result := ReadFileLines(cLicenseInfoFile); +end; + +function TV2DBMetaFiles.LicenseText: string; +begin + Result := StrTrimRight(ReadFileText(cLicenseFile)); +end; + +function TV2DBMetaFiles.Testers: TStringDynArray; +begin + Result := ReadFileLines(cTestersFile); +end; + +function TV2DBMetaFiles.Version: string; +begin + Result := StrTrim(ReadFileText(cVersionFile)); +end; + +{ TLaterDBMetaFiles } + +function TLaterDBMetaFiles.AreAllFilesPresent: Boolean; +resourcestring + sNotSupportedError = 'Calling %s.AreAllFilesPresent is not supported for an ' + + 'unsupported database format'; +begin + raise ENotSupportedException.CreateFmt(sNotSupportedError, [ClassName]); +end; + +function TLaterDBMetaFiles.Contributors: TStringDynArray; +begin + SetLength(Result, 0); +end; + +function TLaterDBMetaFiles.LicenseInfo: TStringDynArray; +begin + SetLength(Result, 0); +end; + +function TLaterDBMetaFiles.LicenseText: string; +begin + Result := ''; +end; + +function TLaterDBMetaFiles.Testers: TStringDynArray; +begin + SetLength(Result, 0); +end; + +function TLaterDBMetaFiles.Version: string; +begin + Result := StrTrim(ReadFileText(cVersionFile)); +end; + +{ TUnknownMetaFiles } + +function TUnknownMetaFiles.AreAllFilesPresent: Boolean; +resourcestring + sNotSupportedError = 'Calling %s.AreAllFilesPresent is not supported for an ' + + 'unrecognised database format'; +begin + raise ENotSupportedException.CreateFmt(sNotSupportedError, [ClassName]); +end; + +function TUnknownMetaFiles.Contributors: TStringDynArray; +begin + SetLength(Result, 0); +end; + +function TUnknownMetaFiles.LicenseInfo: TStringDynArray; +begin + SetLength(Result, 0); +end; + +function TUnknownMetaFiles.LicenseText: string; +begin + Result := ''; +end; + +function TUnknownMetaFiles.Testers: TStringDynArray; +begin + SetLength(Result, 0); +end; + +function TUnknownMetaFiles.Version: string; +begin + Result := ''; +end; + +{ TDBMetaFilesFactory } + +class function TDBMetaFilesFactory.GetInstance(const DBDir: string): + TDBMetaFiles; +resourcestring + sBadDirError = 'Database directory "%s" does not exist'; +var + VersionFile: string; + VersionStr: string; + Version: TVersionNumber; + DBPath: string; +begin + if not TDirectory.Exists(ExcludeTrailingPathDelimiter(DBDir)) then + raise EDBMetaData.CreateFmt(sBadDirError, [DBDir]); + + DBPath := IncludeTrailingPathDelimiter(DBDir); + + // Check if VERSION file exists: + // Yes: + // either: version is invalid - database format unknown + // or: version is 2.x.x.x - database format v2 recognised + // or: version is >2 - database format recognised but not supported + // No: + // either: expected v1 meta files exist - database format v1 recognised + // or: no v1 meta files - database format unknown + VersionFile := DBPath + TDBMetaFileNames.VersionV2AndLater; + if TFile.Exists(VersionFile, False) then + begin + VersionStr := TFileIO.ReadAllText(VersionFile, TEncoding.UTF8, True); + if not TVersionNumber.TryStrToVersionNumber(VersionStr, Version) then + Result := TUnknownMetaFiles.Create(DBDir) + else if Version.V1 = 2 then + Result := TV2DBMetaFiles.Create(DBDir) + else + Result := TLaterDBMetaFiles.Create(DBDir); + end + else + begin + if TFile.Exists(DBPath + TDBMetaFileNames.ContributorsV1, False) + and TFile.Exists(DBPath + TDBMetaFileNames.TestersV1, False) then + Result := TV1DBMetaFiles.Create(DBDir) + else + Result := TUnknownMetaFiles.Create(DBDir); + end; +end; + +{ TDBLicenseInfo } + +constructor TDBLicenseInfo.Create(const AName, ASPDX, AURL, AText: string); +begin + fName := AName; + fSPDX := ASPDX; + fURL := AURL; + fText := AText; +end; + +{ TDBCopyrightInfo } + +constructor TDBCopyrightInfo.Create(const ADate, AHolder, AHolderURL: string); +begin + fDate := ADate; + fHolder := AHolder; + fHolderURL := AHolderURL; +end; + +end. diff --git a/Src/Res/Misc/CSDB-v1-License.txt b/Src/Res/Misc/CSDB-v1-License.txt new file mode 100644 index 000000000..fedb839ec --- /dev/null +++ b/Src/Res/Misc/CSDB-v1-License.txt @@ -0,0 +1,21 @@ +All snippets in this collection are licensed under the MIT license (see below). + +MIT License +----------- + +>> Begin license text + +Copyright (c) 2005-2016 Peter Johnson and Contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +<< End license text + +Note +---- + +The contributors mentioned above are listed in the contrib.txt file. diff --git a/Src/Resources.rc b/Src/Resources.rc index 3d1b463d7..c5cbcd27f 100644 --- a/Src/Resources.rc +++ b/Src/Resources.rc @@ -84,3 +84,9 @@ LANGUAGE LANG_NEUTRAL , SUBLANG_NEUTRAL */ 1 24 "Res/Misc/CodeSnip.manifest" + +/* + Text of Code Snippets Database v1 license. + File is UTF-8 with NO BOM. +*/ +CSDBLICENSE RCDATA "Res/Misc/CSDB-v1-License.txt" From 63d7becc7d3e64badaf54641f500d208e64f2f69 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 21 Feb 2020 02:48:18 +0000 Subject: [PATCH 068/714] Modified About Box Database tab to display main database meta data using TDBMetaData --- Src/FmAboutDlg.pas | 194 +++++++++++++++------- Src/Res/HTML/dlg-about-database-tplt.html | 80 +++++---- 2 files changed, 180 insertions(+), 94 deletions(-) diff --git a/Src/FmAboutDlg.pas b/Src/FmAboutDlg.pas index 48dcde61e..93f1c963d 100644 --- a/Src/FmAboutDlg.pas +++ b/Src/FmAboutDlg.pas @@ -19,11 +19,23 @@ interface uses - // Delphi - Forms, ComCtrls, StdCtrls, Controls, ExtCtrls, Classes, Messages, + // VCL + Forms, + ComCtrls, + StdCtrls, + Controls, + ExtCtrls, + Classes, + Messages, // Project - Browser.UHTMLEvents, FmGenericViewDlg, FrBrowserBase, FrHTMLDlg, - FrHTMLTpltDlg, UContributors, UCSSBuilder; + Browser.UHTMLEvents, + DB.UMetaData, + FmGenericViewDlg, + FrBrowserBase, + FrHTMLDlg, + FrHTMLTpltDlg, + UCSSBuilder, + UIStringList; type @@ -104,6 +116,7 @@ TAboutDlg = class(TGenericViewDlg) fMainDBPathGp: TPathInfoBox; // control that displays main database folder fUserDBPathGp: TPathInfoBox; // control that displays user database folder fInstallPathGp: TPathInfoBox; // control that displays program install path + fMetaData: IDBMetaData; // stores main database meta data procedure HTMLEventHandler(Sender: TObject; const EventInfo: THTMLEventInfo); {Handles title frame's OnHTMLEvent event. Checks for easter-egg related @@ -111,11 +124,10 @@ TAboutDlg = class(TGenericViewDlg) @param Sender [in] Not used. @param EventInfo [in] Object providing information about the event. } - function ContribListHTML(const ContribClass: TContributorsClass): string; + function ContribListHTML(ContribList: IStringList): string; {Builds HTML used to display list of contributors or creates an error message if contributor list is not available. - @param ContribClass [in] Type of contributor class to use. This - determines names that are displayed. + @param ContribList [in] list of contributors. @return Required HTML. } procedure ViewConfigFile(const FileName, DlgTitle: string); @@ -160,32 +172,31 @@ implementation uses // Delphi - SysUtils, Graphics, Math, Windows, ShellAPI, IOUtils, + SysUtils, + Graphics, + Math, + Windows, + ShellAPI, + IOUtils, // Project - FmEasterEgg, FmPreviewDlg, UAppInfo, UColours, UConsts, - UCSSUtils, UCtrlArranger, UEncodings, UFontHelper, UGraphicUtils, UHTMLUtils, - UHTMLTemplate, UIOUtils, UMessageBox, UResourceUtils, UThemesEx; - - -{ - NOTE: - - The about box uses three HTML templates. These are stored in RT_HTML resources - as: - + "dlg-about-head-tplt.html" - + "dlg-about-program-tplt.html" - + "dlg-about-database-tplt.html". - - The following placeholders are used in one or more of the templates. The - placeholders are replaced by their values within this unit: - - <%Release%> program release number - <%ResURL%> url of programs HTML resources - <%ContribList%> list of program contributors - <%TesterList%> list of program testers - <%Year%> current year -} - + DB.UMain, + FmEasterEgg, + FmPreviewDlg, + UAppInfo, + UColours, + UConsts, + UCSSUtils, + UCtrlArranger, + UEncodings, + UFontHelper, + UGraphicUtils, + UHTMLUtils, + UHTMLTemplate, + UIOUtils, + UMessageBox, + UResourceUtils, + UStrUtils, + UThemesEx; {$R *.dfm} @@ -290,47 +301,41 @@ procedure TAboutDlg.ConfigForm; ); btnViewAppConfig.TabOrder := fUserDBPathGp.TabOrder + 1; btnViewUserConfig.TabOrder := btnViewAppConfig.TabOrder + 1; + // Create meta data object + fMetaData := TMainDBMetaDataFactory.MainDBMetaDataInstance; // Load content into HTML frames InitHTMLFrames; end; -function TAboutDlg.ContribListHTML(const ContribClass: TContributorsClass): +function TAboutDlg.ContribListHTML(ContribList: IStringList): string; - {Builds HTML used to display list of contributors or creates an error - message if contributor list is not available. - @param ContribClass [in] Type of contributor class to use. This determines - names that are displayed. + {Builds HTML used to display list of contributors or creates an error message + if contributor list is not available. + @param ContribList [in] list of contributors. @return Required HTML. } resourcestring // Error string used when contributor file not available - sNoContributors = 'List not available, please update database.'; + sNoContributors = 'No contributors list available. Database may be corrupt'; var - Contributors: TContributors; // contributors to database Contributor: string; // name of a contributor DivAttrs: IHTMLAttributes; // attributes of div tag begin Result := ''; - // Get list of contributors - Contributors := ContribClass.Create; - try - if not Contributors.IsError then - begin - for Contributor in Contributors do - Result := Result - + THTML.CompoundTag('div', THTML.Entities(Contributor)) - + EOL; - end - else - begin - // List couldn't be found: display warning message - DivAttrs := THTMLAttributes.Create('class', 'warning'); - Result := THTML.CompoundTag( - 'div', DivAttrs, THTML.Entities(sNoContributors) - ); - end; - finally - FreeAndNil(Contributors); + if ContribList.Count > 0 then + begin + for Contributor in ContribList do + Result := Result + + THTML.CompoundTag('div', THTML.Entities(Contributor)) + + EOL; + end + else + begin + // List couldn't be found: display warning message + DivAttrs := THTMLAttributes.Create('class', 'warning'); + Result := THTML.CompoundTag( + 'div', DivAttrs, THTML.Entities(sNoContributors) + ); end; end; @@ -433,7 +438,8 @@ procedure TAboutDlg.InitHTMLFrames; } begin pcDetail.ActivePage := tsProgram; // display page to let browser load OK - // TODO -cRefactor: Change this frmProgram so it's no longer a HTML template + { TODO -cRefactor: Change this frmProgram so it's no longer a HTML template + unless we need to add a gravatar link from Web.UInfo unit. } frmProgram.Initialise( 'dlg-about-program-tplt.html', procedure(Tplt: THTMLTemplate) @@ -447,19 +453,79 @@ procedure TAboutDlg.InitHTMLFrames; {Initialises and loads HTML into database frame. } begin - pcDetail.ActivePage := tsDatabase; // display page to let browser load OK + // Ensure browser loads page so we can process it + pcDetail.ActivePage := tsDatabase; + frmDatabase.Initialise( 'dlg-about-database-tplt.html', procedure(Tplt: THTMLTemplate) + var + IsDBAvalable: Boolean; + IsMetaDataAvailable: Boolean; + IsLicenseInfomAvailable: Boolean; begin + // Resolve conditionally displayed block placeholders + IsDBAvalable := Database.Snippets.Count(False) > 0; + IsMetaDataAvailable := fMetaData.IsSupportedVersion + and not fMetaData.IsCorrupt; + IsLicenseInfomAvailable := IsMetaDataAvailable + and (fMetaData.GetLicenseInfo.Name <> '') + and (fMetaData.GetCopyrightInfo.Date <> '') + and (fMetaData.GetCopyrightInfo.Holder <> ''); + Tplt.ResolvePlaceholderHTML( + 'DBAvailable', + TCSS.BlockDisplayProp(IsDBAvalable) + ); Tplt.ResolvePlaceholderHTML( - 'ContribList', ContribListHTML(TCodeContributors) + 'DBNotAvailable', + TCSS.BlockDisplayProp(not IsDBAvalable) ); Tplt.ResolvePlaceholderHTML( - 'TesterList', ContribListHTML(TTesters) + 'MetaDataAvailable', + TCSS.BlockDisplayProp(IsMetaDataAvailable) ); + Tplt.ResolvePlaceholderHTML( + 'MetaDataNotAvailable', + TCSS.BlockDisplayProp(not IsMetaDataAvailable) + ); + Tplt.ResolvePlaceholderHTML( + 'LicenseInfoAvailable', + TCSS.BlockDisplayProp(IsLicenseInfomAvailable) + ); + Tplt.ResolvePlaceholderHTML( + 'LicenseInfoNotAvailable', + TCSS.BlockDisplayProp(not IsLicenseInfomAvailable) + ); + + // Rsolve content placeholders Tplt.ResolvePlaceholderText( - 'Year', FormatDateTime('YYYY', Now) + 'CopyrightYear', + fMetaData.GetCopyrightInfo.Date + ); + Tplt.ResolvePlaceholderText( + 'CopyrightHolders', + fMetaData.GetCopyrightInfo.Holder + ); + Tplt.ResolvePlaceholderHTML( + 'DBLicense', + StrIf( + fMetaData.GetLicenseInfo.URL <> '', + THTML.CompoundTag( + 'a', + THTMLAttributes.Create([ + THTMLAttribute.Create('href', fMetaData.GetLicenseInfo.URL), + THTMLAttribute.Create('class', 'external-link') + ]), + THTML.Entities(fMetaData.GetLicenseInfo.Name) + ), + THTML.Entities(fMetaData.GetLicenseInfo.Name) + ) + ); + Tplt.ResolvePlaceholderHTML( + 'ContribList', ContribListHTML(fMetaData.GetContributors) + ); + Tplt.ResolvePlaceholderHTML( + 'TesterList', ContribListHTML(fMetaData.GetTesters) ); end ); diff --git a/Src/Res/HTML/dlg-about-database-tplt.html b/Src/Res/HTML/dlg-about-database-tplt.html index 1d72230ad..22b7eb11b 100644 --- a/Src/Res/HTML/dlg-about-database-tplt.html +++ b/Src/Res/HTML/dlg-about-database-tplt.html @@ -50,42 +50,62 @@ class="external-link" href="http://delphidabbler.com/url/csdb" title="View the online database" - >Code Snippets Database is an online resource containing numerous - fragments of useful Object Pascal code. + >Code Snippets Database is an online resource containing numerous fragments of useful Object Pascal code.

      -

      - The source code in the database is copyright © <%Year%> by the - database contributors (see below). It is made available under the terms of - the MIT License. The code is - used entirely at your own risk. -

      +
      -

      - Credits -

      +
      -

      - The following people have contributed code to the database, or have helped - to test it: -

      +

      + The source code in the database is copyright © <%CopyrightYear%> by <%CopyrightHolders%>. It is made available under the terms of the <%DBLicense%>. +

      + +

      + No copyright or licensing information is available. +

      + +

      + The code is used entirely at your own risk. +

      + +

      + Credits +

      + +

      + The following people have contributed code to the database, or have helped to test it: +

      + +
      +
      + Contributors +
      +
      + <%ContribList%> +
      +
      + Testers +
      +
      + <%TesterList%> +
      +
      -
      -
      - Contributors -
      -
      - <%ContribList%> -
      -
      - Testers -
      -
      - <%TesterList%>
      + +

      + Credits, License and Copyright information are not available. The main database may be corrupt. Please use the Database | Get DelphiDabbler Snippets Database menu option to display the Get DelphiDabbler Snippets Database dialogue box and follow the instructions there to get the latest version of the database. +

      + +
      + +
      + +

      + The database is not loaded. You can get it by following the instructions in the Get DelphiDabbler Snippets Database dialogue box that is displayed from the Database | Get DelphiDabbler Snippets Database menu option. +

      +
      From d93155b7d8c0b809743ec3c25cb71c9f1c208772 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 21 Feb 2020 02:51:04 +0000 Subject: [PATCH 069/714] Removed redundant UContributors unit. Functionality subsumed into DB.UMetaData unit --- Src/CodeSnip.dpr | 1 - Src/CodeSnip.dproj | 1 - Src/UContributors.pas | 161 ------------------------------------------ 3 files changed, 163 deletions(-) delete mode 100644 Src/UContributors.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 403526597..decc6329d 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -219,7 +219,6 @@ uses UConsoleApp in 'UConsoleApp.pas', UConsts in 'UConsts.pas', UContainers in 'UContainers.pas', - UContributors in 'UContributors.pas', UControlStateMgr in 'UControlStateMgr.pas', UCopyInfoMgr in 'UCopyInfoMgr.pas', UCopySourceMgr in 'UCopySourceMgr.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 74fec0f3a..9106a48b7 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -420,7 +420,6 @@ - diff --git a/Src/UContributors.pas b/Src/UContributors.pas deleted file mode 100644 index 28aa56dc6..000000000 --- a/Src/UContributors.pas +++ /dev/null @@ -1,161 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Defines a classes that encapsulates lists of database contributors taken from - * files. -} - - -unit UContributors; - - -interface - - -uses - // Delphi - Classes; - - -type - /// - /// Abstract base class for classes that load and encapsulate a list of - /// database contributors. - /// - TContributors = class abstract(TObject) - strict private - var - /// Stores list of contributors. - fContributors: TStringList; - /// Value of IsError property. - fIsError: Boolean; - /// Getter for Count property. - function GetCount: Integer; - /// Getter for indexed Items[] property. - function GetItem(const Idx: Integer): string; - strict protected - /// Gets base name of file containing details of contributors. - /// - function GetFileName: string; virtual; abstract; - public - /// Sets up object and loads contributor information. - constructor Create; virtual; - /// Tears down object. - destructor Destroy; override; - /// Creates and returns object enumerator. - function GetEnumerator: TStringsEnumerator; - /// Indexed list of contributors. - property Items[const Idx: Integer]: string read GetItem; default; - /// Number of contributors. - property Count: Integer read GetCount; - /// Flag indicating if there has been an error loading - /// contributors file. - property IsError: Boolean read fIsError; - end; - -type - /// - /// Encapsulates a list of people who have contributed code to the CodeSnip - /// database. - /// - TCodeContributors = class sealed(TContributors) - strict protected - /// Gets base name of file containing details of code - /// contributors. - function GetFileName: string; override; - end; - -type - /// - /// Encapsulates a list of people who have tested code in the CodeSnip - /// database. - /// - TTesters = class sealed(TContributors) - strict protected - /// Gets base name of file containing details of testers. - /// - function GetFileName: string; override; - end; - -type - /// Class reference for contributors classes. - TContributorsClass = class of TContributors; - - -implementation - - -uses - // Delphi - SysUtils, - // Project - UAppInfo; - - -{ TContributors } - -constructor TContributors.Create; -var - ContribFile: string; // name of file containing contributor information -begin - Assert(ClassType <> TContributors, - ClassName + '.Create: must only be called from descendants.'); - inherited; - fContributors := TStringList.Create; - // Load contributor file - ContribFile := IncludeTrailingPathDelimiter(TAppInfo.AppDataDir) - + GetFileName; - if FileExists(ContribFile) then - try - fContributors.LoadFromFile(ContribFile); - except - // swallow any exception: treat as empty contributor list - end; - // Error if list is empty: flag error - fIsError := Count = 0; -end; - -destructor TContributors.Destroy; -begin - fContributors.Free; - inherited; -end; - -function TContributors.GetCount: Integer; -begin - Result := fContributors.Count; -end; - -function TContributors.GetEnumerator: TStringsEnumerator; -begin - Result := fContributors.GetEnumerator; -end; - -function TContributors.GetItem(const Idx: Integer): string; -begin - Result := fContributors[Idx]; -end; - -{ TCodeContributors } - -function TCodeContributors.GetFileName: string; -begin - Result := 'contrib.txt' -end; - -{ TTesters } - -function TTesters.GetFileName: string; -begin - Result := 'testers.txt'; -end; - -end. - From ed6d232fc04cc18f5917ff7995cee4c9a9c71a88 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 21 Feb 2020 03:30:24 +0000 Subject: [PATCH 070/714] XMLDoc commented unit --- Src/FmAboutDlg.pas | 235 +++++++++++++++++---------------------------- 1 file changed, 86 insertions(+), 149 deletions(-) diff --git a/Src/FmAboutDlg.pas b/Src/FmAboutDlg.pas index 93f1c963d..b5d1cb1c2 100644 --- a/Src/FmAboutDlg.pas +++ b/Src/FmAboutDlg.pas @@ -40,56 +40,48 @@ interface type - { - TPathInfoBox: - Component that displays a path in a group box with an associated button that - displays the path in Windows Explorer. - } + /// Custom component that displays a path in a group box with an + /// associated button to display the path in Windows Explorer. TPathInfoBox = class(TCustomGroupBox) strict private - fPathLbl: TLabel; // Label that displays path - fViewBtn: TButton; // Button that displays path in explorer + var + /// Label that displays path. + fPathLbl: TLabel; + /// Button that displays path in explorer. + fViewBtn: TButton; + /// Read accessor for Path property. Gets and returns value from + /// path label. function GetPath: string; - {Read accessor for Path property. Gets value from label. - @return Property value. - } + /// Write accessor for Path property. Stores given value in path + /// label and updates state of button. procedure SetPath(const Value: string); - {Write accessor for Path property. Stores value in label and updates state - of button. - @param Value [in] New property value. - } + /// Button click event handler. Displays folder stored in Path + /// property in Windows Explorer. procedure BtnClick(Sender: TObject); - {Button click event handler. Displays folder stored in Path property in - Windows Explorer. - @param Sender [in] Not used. - } + /// Handles font changes by resizing control to allow for new font + /// size. + /// TMessage [in/out] Not used. procedure FontChange(var Msg: TMessage); message CM_FONTCHANGED; - {Handles font changes by resizing control to allow for new font size. - @param Msg [in/out] Not used. - } + /// Resizes and re-arranges control and its sub-components. + /// procedure ReArrange; - {Resizes and re-arranges control and its sub-components. - } strict protected + /// Handles control resizing. Re-arranges control's + /// sub-components. procedure Resize; override; - {Handles control resizing. Re-arranges control's sub-components. - } public + /// Component constructor. Creates sub-components and arranges + /// them. constructor Create(AOwner: TComponent); override; - {Component constructor. Creates sub-components and arranges them. - @param AOwner [in] Owning component. - } + /// Path displayed in group box and displayed by view button. + /// property Path: string read GetPath write SetPath; - {Path displayed in group box and displayed by view button} end; - { - TAboutDlg: - Implements an about dialog box that uses web browser controls to display - information about the program and the database. HTML templates containing - the dialog box content are loaded from resources. Also provides access to - the program's easter egg. - } + /// Implements program' about dialogue box. + /// Displays information about the program, the main database and + /// the program's user and application folders and config files. Also + /// provides access to the program's easter egg. TAboutDlg = class(TGenericViewDlg) bvlSeparator: TBevel; frmDatabase: THTMLTpltDlgFrame; @@ -110,60 +102,71 @@ TAboutDlg = class(TGenericViewDlg) /// a tab is clicked. procedure pcDetailMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + /// Handles button click event to display application config file. + /// procedure btnViewAppConfigClick(Sender: TObject); + /// Handles button click event to display per-user config file. + /// procedure btnViewUserConfigClick(Sender: TObject); strict private - fMainDBPathGp: TPathInfoBox; // control that displays main database folder - fUserDBPathGp: TPathInfoBox; // control that displays user database folder - fInstallPathGp: TPathInfoBox; // control that displays program install path - fMetaData: IDBMetaData; // stores main database meta data + var + /// Control that displays main database folder. + fMainDBPathGp: TPathInfoBox; + /// Control that displays user database folder. + fUserDBPathGp: TPathInfoBox; + /// Control that displays program install path. + fInstallPathGp: TPathInfoBox; + /// Provides access to main database meta data. + fMetaData: IDBMetaData; + /// Handles title frame's OnHTMLEvent event. Checks for mouse + /// events relating to display of the easter egg and acts accordingly. + /// + /// TObject [in] Not used. + /// THTMLEventInfo [in] Object providing + /// information about the event. procedure HTMLEventHandler(Sender: TObject; const EventInfo: THTMLEventInfo); - {Handles title frame's OnHTMLEvent event. Checks for easter-egg related - mouse events on icon image and acts accordingly. - @param Sender [in] Not used. - @param EventInfo [in] Object providing information about the event. - } + /// Builds HTML used to display list of contributors or an error + /// message if the list is empty. + /// IStringList [in] List of contributors to + /// display. + /// string. Required HTML. function ContribListHTML(ContribList: IStringList): string; - {Builds HTML used to display list of contributors or creates an error - message if contributor list is not available. - @param ContribList [in] list of contributors. - @return Required HTML. - } + /// Displays content of a config file in a dialogue box or an + /// error message if the file does not exist. + /// string [in] Name of config file to display. + /// + /// string [in] Title of dialogue box. procedure ViewConfigFile(const FileName, DlgTitle: string); - {Displays content of a config file in a preview dialogue box. If file - does not exist an error message is displayed. - @param FileName [in] Name of config file. - @param DlgTitle [in] Title of preview dialogue box. - } strict protected + /// Configures form by creating custom controls and initialising + /// HTML frames. + /// Called from ancestor class. procedure ConfigForm; override; - {Configures form by creating custom controls and initialising HTML frames. - Called from ancestor class. - } + /// Initialises HTML frames to use required HTML templates and + /// resolves all template placeholders. procedure InitHTMLFrames; - {Initialises HTML frames to use required template document with - placeholders replaced by required values. - } + /// Arranges controls on form. + /// Called from ancestor class. procedure ArrangeForm; override; - {Arranges controls on form. - } + /// Updates CSS used for HTML displayed in title frame. + /// TObject [in] Not used. + /// TCSSBuilder [in] Object used to update CSS. + /// procedure UpdateTitleCSS(Sender: TObject; const CSSBuilder: TCSSBuilder); - {Updates CSS used for HTML displayed in title frame. - @param Sender [in] Not used. - @param CSSBuilder [in] Object used to update CSS. - } + /// Updates CSS used for HTML displayed in detail frames. + /// + /// TObject [in] Not used. + /// TCSSBuilder [in] Object used to update CSS. + /// + /// Details frames form the body of the About Box on the Program + /// and Database tabs. procedure UpdateDetailCSS(Sender: TObject; const CSSBuilder: TCSSBuilder); - {Updates CSS used for HTML displayed in detail (i.e. program and database) - frames. - @param Sender [in] Not used. - @param CSSBuilder [in] Object used to update CSS. - } public + /// Displays dialog box. + /// TComponent [in] Component that owns this dialogus + /// box. class procedure Execute(AOwner: TComponent); - {Displays dialog box. - @param AOwner [in] Component that owns this dialog box. - } end; @@ -200,11 +203,10 @@ implementation {$R *.dfm} +/// Displays Windows Explorer showing a specific folder. +/// string [in] Folder to explore. +/// Boolean. True if explorer displayed, False if not. function ExploreFolder(const Folder: string): Boolean; - {Displays Windows Explorer showing a specified folder. - @param Folder [in] Folder to explore. - @return True if explorer displayed, False if not. - } begin if TDirectory.Exists(Folder) then Result := ShellExecute( @@ -217,8 +219,6 @@ function ExploreFolder(const Folder: string): Boolean; { TAboutDlg } procedure TAboutDlg.ArrangeForm; - {Arranges controls on form. - } var PathTabHeight: Integer; begin @@ -261,18 +261,11 @@ procedure TAboutDlg.btnViewUserConfigClick(Sender: TObject); end; procedure TAboutDlg.ConfigForm; - {Configures form by creating custom controls and initialising HTML frames. - Called from ancestor class. - } + // Creates and initialises a custom path information control with given + // caption, path and tab order. function CreatePathInfoBox(const Caption, Path: string; const TabOrder: Integer): TPathInfoBox; - {Creates and initialises a custom path information control. - @param Caption [in] Group box caption. - @param Path [in] Path to be displayed. - @param TabOrder [in] Tab order of info box. - @return New control. - } begin Result := TPathInfoBox.CreateParented(tsPaths.Handle); Result.Parent := tsPaths; @@ -309,11 +302,6 @@ procedure TAboutDlg.ConfigForm; function TAboutDlg.ContribListHTML(ContribList: IStringList): string; - {Builds HTML used to display list of contributors or creates an error message - if contributor list is not available. - @param ContribList [in] list of contributors. - @return Required HTML. - } resourcestring // Error string used when contributor file not available sNoContributors = 'No contributors list available. Database may be corrupt'; @@ -340,9 +328,6 @@ function TAboutDlg.ContribListHTML(ContribList: IStringList): end; class procedure TAboutDlg.Execute(AOwner: TComponent); - {Displays dialog box. - @param AOwner [in] Component that owns this dialog box. - } begin with Create(AOwner) do try @@ -353,9 +338,6 @@ class procedure TAboutDlg.Execute(AOwner: TComponent); end; procedure TAboutDlg.FormCreate(Sender: TObject); - {Form initialisation event handler. Sets handler that updates frame's CSS. - @param Sender [in] Not used. - } begin inherited; frmTitle.OnBuildCSS := UpdateTitleCSS; @@ -364,9 +346,6 @@ procedure TAboutDlg.FormCreate(Sender: TObject); end; procedure TAboutDlg.FormDestroy(Sender: TObject); - {Form destruction event handler. Frees non-owned controls. - @param Sender [in] Not used. - } begin inherited; fInstallPathGp.Free; @@ -376,11 +355,6 @@ procedure TAboutDlg.FormDestroy(Sender: TObject); procedure TAboutDlg.HTMLEventHandler(Sender: TObject; const EventInfo: THTMLEventInfo); - {Handles title frame's OnHTMLEvent event. Checks for easter-egg related mouse - events on icon image and acts accordingly. - @param Sender [in] Not used. - @param EventInfo [in] Object providing information about the event. - } const cIconImgId = 'icon'; // id of icon image begin @@ -412,14 +386,9 @@ procedure TAboutDlg.HTMLEventHandler(Sender: TObject; end; procedure TAboutDlg.InitHTMLFrames; - {Initialises HTML frames to use required template document with placeholders - replaced by required values. - } - // --------------------------------------------------------------------------- + // Initialises and loads HTML into title frame. procedure InitTitleFrame; - {Initialises and loads HTML into title frame. - } begin frmTitle.Initialise( 'dlg-about-head-tplt.html', @@ -433,9 +402,8 @@ procedure TAboutDlg.InitHTMLFrames; frmTitle.OnHTMLEvent := HTMLEventHandler; end; + // Initialises and loads HTML into program frame. procedure InitProgramFrame; - {Initialises and loads HTML into program frame. - } begin pcDetail.ActivePage := tsProgram; // display page to let browser load OK { TODO -cRefactor: Change this frmProgram so it's no longer a HTML template @@ -449,9 +417,8 @@ procedure TAboutDlg.InitHTMLFrames; ); end; + // Initialises and loads HTML into database frame. procedure InitDatabaseFrame; - {Initialises and loads HTML into database frame. - } begin // Ensure browser loads page so we can process it pcDetail.ActivePage := tsDatabase; @@ -547,11 +514,6 @@ procedure TAboutDlg.pcDetailMouseDown(Sender: TObject; Button: TMouseButton; procedure TAboutDlg.UpdateDetailCSS(Sender: TObject; const CSSBuilder: TCSSBuilder); - {Updates CSS used for HTML displayed in detail (i.e. program and database) - frames. - @param Sender [in] Not used. - @param CSSBuilder [in] Object used to update CSS. - } var ContentFont: TFont; // font used for content begin @@ -583,10 +545,6 @@ procedure TAboutDlg.UpdateDetailCSS(Sender: TObject; procedure TAboutDlg.UpdateTitleCSS(Sender: TObject; const CSSBuilder: TCSSBuilder); - {Updates CSS used for HTML displayed in title frame. - @param Sender [in] Not used. - @param CSSBuilder [in] Object used to update CSS. - } begin // Set body colour, and put border round it with CSSBuilder.Selectors['body'] do @@ -617,19 +575,12 @@ procedure TAboutDlg.ViewConfigFile(const FileName, DlgTitle: string); { TPathInfoBox } procedure TPathInfoBox.BtnClick(Sender: TObject); - {Button click event handler. Displays folder stored in Path property in - Windows Explorer. - @param Sender [in] Not used. - } begin if Assigned(fPathLbl) and (fPathLbl.Caption <> '') then ExploreFolder(fPathLbl.Caption); end; constructor TPathInfoBox.Create(AOwner: TComponent); - {Component constructor. Creates sub-components and arranges them. - @param AOwner [in] Owning component. - } resourcestring // Hint attached to view button sViewBtnHint = 'Explore...|Display the path in Windows Explorer'; @@ -663,25 +614,17 @@ constructor TPathInfoBox.Create(AOwner: TComponent); end; procedure TPathInfoBox.FontChange(var Msg: TMessage); - {Handles font changes by resizing control to allow for new font size. - @param Msg [in/out] Not used. - } begin inherited; ReArrange; end; function TPathInfoBox.GetPath: string; - {Read accessor for Path property. Gets value from label. - @return Property value. - } begin Result := fPathLbl.Caption; end; procedure TPathInfoBox.ReArrange; - {Resizes and re-arranges control and its sub-components. - } begin TCtrlArranger.SetLabelHeight(fPathLbl); Height := Max(fPathLbl.Height, fViewBtn.Height) + 24; @@ -695,18 +638,12 @@ procedure TPathInfoBox.ReArrange; end; procedure TPathInfoBox.Resize; - {Handles control resizing. Re-arranges control's sub-components. - } begin inherited; ReArrange; end; procedure TPathInfoBox.SetPath(const Value: string); - {Write accessor for Path property. Stores value in label and updates state - of button. - @param Value [in] New property value. - } resourcestring // hints used when path doesn't exist sShortPathDoesNotExist = 'Path does not exist'; From d367532b5123e2f7ddc78e1898bbdbe15d9d7c33 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 21 Feb 2020 03:37:03 +0000 Subject: [PATCH 071/714] Added InitForm override to TAboutDlg as place to create IDBMetaData instance Creation was originally in ConfigForm. Also refreshed meta data after creation of object. --- Src/FmAboutDlg.pas | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Src/FmAboutDlg.pas b/Src/FmAboutDlg.pas index b5d1cb1c2..18baab617 100644 --- a/Src/FmAboutDlg.pas +++ b/Src/FmAboutDlg.pas @@ -139,16 +139,19 @@ TAboutDlg = class(TGenericViewDlg) /// string [in] Title of dialogue box. procedure ViewConfigFile(const FileName, DlgTitle: string); strict protected + /// Initialises form by creating owned object(s). + /// Called from ancestor class. + procedure InitForm; override; /// Configures form by creating custom controls and initialising /// HTML frames. /// Called from ancestor class. procedure ConfigForm; override; - /// Initialises HTML frames to use required HTML templates and - /// resolves all template placeholders. - procedure InitHTMLFrames; /// Arranges controls on form. /// Called from ancestor class. procedure ArrangeForm; override; + /// Initialises HTML frames to use required HTML templates and + /// resolves all template placeholders. + procedure InitHTMLFrames; /// Updates CSS used for HTML displayed in title frame. /// TObject [in] Not used. /// TCSSBuilder [in] Object used to update CSS. @@ -294,8 +297,6 @@ procedure TAboutDlg.ConfigForm; ); btnViewAppConfig.TabOrder := fUserDBPathGp.TabOrder + 1; btnViewUserConfig.TabOrder := btnViewAppConfig.TabOrder + 1; - // Create meta data object - fMetaData := TMainDBMetaDataFactory.MainDBMetaDataInstance; // Load content into HTML frames InitHTMLFrames; end; @@ -385,6 +386,14 @@ procedure TAboutDlg.HTMLEventHandler(Sender: TObject; end; end; +procedure TAboutDlg.InitForm; +begin + inherited; + // Create meta data object for main database + fMetaData := TMainDBMetaDataFactory.MainDBMetaDataInstance; + fMetaData.Refresh; +end; + procedure TAboutDlg.InitHTMLFrames; // Initialises and loads HTML into title frame. From 1671824dee47b95b77bd6c6dfc28a10cec43278a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 21 Feb 2020 03:41:02 +0000 Subject: [PATCH 072/714] Removed singleton for main database meta data class. Fresh objects are now created every time factory class is asked for main database meta data object. --- Src/DB.UMetaData.pas | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Src/DB.UMetaData.pas b/Src/DB.UMetaData.pas index a1e61f9e0..badb61e66 100644 --- a/Src/DB.UMetaData.pas +++ b/Src/DB.UMetaData.pas @@ -190,11 +190,6 @@ TDBCopyrightInfo = record /// Factory that creates instances of objects that provide /// information about the main database and database updates. TMainDBMetaDataFactory = record - strict private - class var - /// Stores reference to a singleton instance of class that - /// provides information about the main database. - fMainDBSingleton: IDBMetaData; public /// Returns instance of class that provides meta data for the /// main database. @@ -537,9 +532,7 @@ TUpdateDBMetaData = class sealed(TAbstractMainDBMetaData, IDBMetaData) class function TMainDBMetaDataFactory.MainDBMetaDataInstance: IDBMetaData; begin - if not Assigned(fMainDBSingleton) then - fMainDBSingleton := TMainDBMetaData.Create; - Result := fMainDBSingleton; + Result := TMainDBMetaData.Create; end; class function TMainDBMetaDataFactory.UpdateMetaDataInstance( From 1be1d7a0186b745e687bc83cba7f550e219d10be Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 21 Feb 2020 03:42:57 +0000 Subject: [PATCH 073/714] Removed call to refresh fMetaData object There is no longer a need to call Refresh on fMetaData since main database meta data object is no longer a singleton and will read meta data from files each time it is created. --- Src/FmAboutDlg.pas | 1 - 1 file changed, 1 deletion(-) diff --git a/Src/FmAboutDlg.pas b/Src/FmAboutDlg.pas index 18baab617..c2a27a027 100644 --- a/Src/FmAboutDlg.pas +++ b/Src/FmAboutDlg.pas @@ -391,7 +391,6 @@ procedure TAboutDlg.InitForm; inherited; // Create meta data object for main database fMetaData := TMainDBMetaDataFactory.MainDBMetaDataInstance; - fMetaData.Refresh; end; procedure TAboutDlg.InitHTMLFrames; From 30026c09789faec36b0112b4518d4136e3c49eaa Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 21 Feb 2020 03:46:28 +0000 Subject: [PATCH 074/714] Reverted fMetaData creation to ConfigForm. Creating fMetaData in InitForm caused an access violation. --- Src/FmAboutDlg.pas | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Src/FmAboutDlg.pas b/Src/FmAboutDlg.pas index c2a27a027..68e56839c 100644 --- a/Src/FmAboutDlg.pas +++ b/Src/FmAboutDlg.pas @@ -139,11 +139,8 @@ TAboutDlg = class(TGenericViewDlg) /// string [in] Title of dialogue box. procedure ViewConfigFile(const FileName, DlgTitle: string); strict protected - /// Initialises form by creating owned object(s). - /// Called from ancestor class. - procedure InitForm; override; - /// Configures form by creating custom controls and initialising - /// HTML frames. + /// Configures form by creating owned object and custom controls + /// and initialising HTML frames. /// Called from ancestor class. procedure ConfigForm; override; /// Arranges controls on form. @@ -285,6 +282,8 @@ procedure TAboutDlg.ConfigForm; sUserDBPathGpCaption = 'User Database Directory'; begin inherited; + // Create meta data object for main database + fMetaData := TMainDBMetaDataFactory.MainDBMetaDataInstance; // Creates required custom controls fInstallPathGp := CreatePathInfoBox( sInstallPathGpCaption, TAppInfo.AppExeDir, 0 @@ -386,13 +385,6 @@ procedure TAboutDlg.HTMLEventHandler(Sender: TObject; end; end; -procedure TAboutDlg.InitForm; -begin - inherited; - // Create meta data object for main database - fMetaData := TMainDBMetaDataFactory.MainDBMetaDataInstance; -end; - procedure TAboutDlg.InitHTMLFrames; // Initialises and loads HTML into title frame. From 14ad98dfd96ac0771623f572c8c9c43cd12fb72b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 00:10:03 +0000 Subject: [PATCH 075/714] Updated mentioned menu option and dialogue box names --- Src/Res/HTML/dlg-about-database-tplt.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Res/HTML/dlg-about-database-tplt.html b/Src/Res/HTML/dlg-about-database-tplt.html index 22b7eb11b..2e2f0e8e5 100644 --- a/Src/Res/HTML/dlg-about-database-tplt.html +++ b/Src/Res/HTML/dlg-about-database-tplt.html @@ -95,7 +95,7 @@

      - Credits, License and Copyright information are not available. The main database may be corrupt. Please use the Database | Get DelphiDabbler Snippets Database menu option to display the Get DelphiDabbler Snippets Database dialogue box and follow the instructions there to get the latest version of the database. + Credits, License and Copyright information are not available. The main database may be corrupt. Please use the Database | Install or Update DelphiDabbler Snippets Database menu option to display the Install or Update DelphiDabbler Snippets Database dialogue box and follow the instructions there to get the latest version of the database.

      @@ -103,7 +103,7 @@

      - The database is not loaded. You can get it by following the instructions in the Get DelphiDabbler Snippets Database dialogue box that is displayed from the Database | Get DelphiDabbler Snippets Database menu option. + The database is not loaded. You can get it by following the instructions in the Install or Update DelphiDabbler Snippets Database dialogue box that is displayed from the Database | Install or Update DelphiDabbler Snippets Database menu option.

      From 0e5c20bdbc888baac80b843d4fc4370068603ae8 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 03:27:06 +0000 Subject: [PATCH 076/714] Added TODO --- Src/CodeSnip.todo | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index d71e0bccf..407d2c514 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,3 +1,6 @@ +{TODO -cHelp : +Add a Backup Database task help topis that describes how to backup and restore databases. +Then add help link to Res/HTML/dlg-dbupdate-intro-tplt.html} {TODO -cUI : Rationalise use of TFontHelper.SetDefaultFont(s) and .SetDefaultBaseFont(s) methods.} {TODO -cSharing : Decide if to continue to support user info in export files From f68bdaf3d7d32483d134045bc4176893b619a09e Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 10:40:18 +0000 Subject: [PATCH 077/714] Removed main update process dependency on web services. 1) Rewrote UFileUpdater unit to copy new database files from local directory instead of unpacking them from a combined file. 2) Rewrote UDBUpdateMgr unit to vaildate new database files in local directory and to manage copying them 3) Rewrote FmDBUpdateDlg as a wizard to guide process of updating database from loca files instead of the internet. 4) Added 3 new HTML resources for display in rewritten FMDBUpdateDlg --- Src/FmDBUpdateDlg.dfm | 243 +++++--- Src/FmDBUpdateDlg.pas | 664 ++++++++++++---------- Src/HTML.hrc | 7 +- Src/Res/HTML/dlg-dbupdate-finish.html | 40 ++ Src/Res/HTML/dlg-dbupdate-intro-tplt.html | 67 +++ Src/Res/HTML/dlg-dbupdate-load.html | 40 ++ Src/UDBUpdateMgr.pas | 530 ++++------------- Src/UFileUpdater.pas | 186 ++---- 8 files changed, 838 insertions(+), 939 deletions(-) create mode 100644 Src/Res/HTML/dlg-dbupdate-finish.html create mode 100644 Src/Res/HTML/dlg-dbupdate-intro-tplt.html create mode 100644 Src/Res/HTML/dlg-dbupdate-load.html diff --git a/Src/FmDBUpdateDlg.dfm b/Src/FmDBUpdateDlg.dfm index 27ee4208e..f8429c168 100644 --- a/Src/FmDBUpdateDlg.dfm +++ b/Src/FmDBUpdateDlg.dfm @@ -1,90 +1,181 @@ inherited DBUpdateDlg: TDBUpdateDlg - Left = 350 - Top = 171 - BorderIcons = [biMinimize, biMaximize] - Caption = 'Update From Web' - ClientHeight = 344 - OnCloseQuery = FormCloseQuery - ExplicitWidth = 474 - ExplicitHeight = 373 + Left = 0 + Top = 0 + Caption = 'Install or Update DelphiDabbler Snippets Database' + Position = poDesigned PixelsPerInch = 96 TextHeight = 13 inherited pnlBody: TPanel - Width = 329 - Height = 137 - ExplicitWidth = 329 - ExplicitHeight = 137 - object lblUpdateFromWeb: TLabel - Left = 0 - Top = 0 - Width = 329 - Height = 41 - Align = alTop - AutoSize = False - Caption = - 'To download or update the code snippets database please connect ' + - 'to the internet and then click the "Update from Web" button.' - WordWrap = True + Width = 409 + ExplicitWidth = 409 + inherited pnlHead: TPanel + Width = 409 + ExplicitWidth = 409 end - object lblError: TLabel - Left = 0 - Top = 0 - Width = 62 - Height = 13 - Cursor = crHandPoint - Caption = 'details below' - Visible = False + inherited pcWizard: TPageControl + Width = 409 + ActivePage = tsFinish + ExplicitWidth = 409 + object tsIntro: TTabSheet + Caption = 'tsIntro' + TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 + inline frmIntro: THTMLTpltDlgFrame + Left = 0 + Top = 0 + Width = 401 + Height = 236 + TabOrder = 0 + TabStop = True + ExplicitWidth = 401 + inherited pnlBrowser: TPanel + Width = 401 + ExplicitWidth = 401 + inherited wbBrowser: TWebBrowser + Width = 401 + ExplicitWidth = 320 + ExplicitHeight = 240 + ControlData = { + 4C00000072290000641800000000000000000000000000000000000000000000 + 000000004C000000000000000000000001000000E0D057007335CF11AE690800 + 2B2E126208000000000000004C0000000114020000000000C000000000000046 + 8000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000100000000000000000000000000000000000000} + end + end + end + end + object tsFolder: TTabSheet + Caption = 'tsFolder' + ImageIndex = 1 + TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 + object lblFolder: TLabel + Left = 0 + Top = 8 + Width = 322 + Height = 13 + Caption = + 'Enter database download &folder: (click button to browse for fol' + + 'der)' + FocusControl = edPath + end + object lblFolderPageInfo: TLabel + Left = 0 + Top = 72 + Width = 246 + Height = 13 + Caption = 'Click the Next button to update the local database.' + end + object edPath: TEdit + Left = 0 + Top = 28 + Width = 332 + Height = 21 + TabOrder = 0 + end + object btnBrowse: TButton + Left = 338 + Top = 28 + Width = 27 + Height = 21 + Action = actBrowse + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [fsBold] + ParentFont = False + TabOrder = 1 + end + end + object tsLoad: TTabSheet + Caption = 'tsLoad' + ImageIndex = 2 + TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 + inline frmLoad: TFixedHTMLDlgFrame + Left = 0 + Top = 0 + Width = 316 + Height = 236 + TabOrder = 0 + TabStop = True + inherited pnlBrowser: TPanel + inherited wbBrowser: TWebBrowser + ControlData = { + 4C000000A9200000641800000000000000000000000000000000000000000000 + 000000004C000000000000000000000001000000E0D057007335CF11AE690800 + 2B2E126208000000000000004C0000000114020000000000C000000000000046 + 8000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000100000000000000000000000000000000000000} + end + end + end + end + object tsFinish: TTabSheet + Caption = 'tsFinish' + ImageIndex = 3 + TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 + inline frmFinish: TFixedHTMLDlgFrame + Left = 0 + Top = 0 + Width = 316 + Height = 236 + TabOrder = 0 + TabStop = True + inherited pnlBrowser: TPanel + inherited wbBrowser: TWebBrowser + ControlData = { + 4C000000A9200000641800000000000000000000000000000000000000000000 + 000000004C000000000000000000000001000000E0D057007335CF11AE690800 + 2B2E126208000000000000004C0000000114020000000000C000000000000046 + 8000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000100000000000000000000000000000000000000} + end + end + end + end end - object lblHeadline: TLabel - Left = 0 + inline frmProgress: TProgressFrame + Left = 57 Top = 0 - Width = 62 - Height = 13 - Alignment = taCenter - Caption = 'lblHeadline' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False + Width = 320 + Height = 82 + ParentBackground = False + TabOrder = 2 Visible = False - end - object edProgress: TMemo - Left = 0 - Top = 19 - Width = 329 - Height = 112 - BevelInner = bvSpace - BevelKind = bkTile - BorderStyle = bsNone - ParentColor = True - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 1 - Visible = False - end - object btnDoUpdate: TButton - Left = 88 - Top = 47 - Width = 153 - Height = 41 - Caption = '&Update from Web' - TabOrder = 0 - OnClick = btnDoUpdateClick + ExplicitLeft = 57 + ExplicitHeight = 82 + inherited pnlBody: TPanel + Height = 82 + ExplicitHeight = 82 + end end end inherited btnHelp: TButton - TabOrder = 3 + Visible = False end - object btnCancel: TButton - Left = 120 - Top = 304 - Width = 91 - Height = 25 - Cancel = True - Caption = 'Cancel Update' - TabOrder = 2 - OnClick = btnCancelClick + object alMain: TActionList + Left = 448 + Top = 208 + object actBrowse: TAction + Caption = '...' + Hint = 'Browse for database folder' + OnExecute = actBrowseExecute + end end end diff --git a/Src/FmDBUpdateDlg.pas b/Src/FmDBUpdateDlg.pas index 90f899c47..e7722f509 100644 --- a/Src/FmDBUpdateDlg.pas +++ b/Src/FmDBUpdateDlg.pas @@ -3,142 +3,146 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2020, Peter Johnson (www.delphidabbler.com). * - * $Rev$ - * $Date$ - * - * Implements a dialogue box that updates the CodeSnip database from web. + * Implements a wizard dialogue box that handles the updating of the main + * DelphiDabbler Code Snippets database. } unit FmDBUpdateDlg; +// TODO -cHelp: Make help button visible once help topic is created. interface - uses // Project - Forms, StdCtrls, Controls, ExtCtrls, Classes, Messages, - // Delphi - FmGenericViewDlg, UBaseObjects, UDBUpdateMgr, UMemoProgBarMgr; - - + SysUtils, + Windows, + Classes, + ActnList, + StdCtrls, + Forms, + ComCtrls, + Controls, + ExtCtrls, + // VCL + FmWizardDlg, + FrBrowserBase, + FrFixedHTMLDlg, + FrHTMLDlg, + FrHTMLTpltDlg, + FrProgress, + UBaseObjects, + UCodeImportMgr, + UCSSBuilder, + UControlStateMgr, + UDBUpdateMgr; type - /// Dialogue box that checks to see if an update to the local copy - /// of the online Code Snippets database is available and downloads it if so. - /// - TDBUpdateDlg = class(TGenericViewDlg, INoPublicConstruct) - btnCancel: TButton; - btnDoUpdate: TButton; - lblUpdateFromWeb: TLabel; - lblError: TLabel; - edProgress: TMemo; - lblHeadline: TLabel; - /// Handles click on cancel button and cancels the update. - /// - procedure btnCancelClick(Sender: TObject); - /// Handles click on update button and performs update process. - /// - /// Database is only updated if updates are available. - procedure btnDoUpdateClick(Sender: TObject); - /// Performs required initialisation on form creation. + TDBUpdateDlg = class(TWizardDlg, INoPublicConstruct) + tsIntro: TTabSheet; + tsFolder: TTabSheet; + frmIntro: THTMLTpltDlgFrame; + lblFolder: TLabel; + edPath: TEdit; + lblFolderPageInfo: TLabel; + btnBrowse: TButton; + alMain: TActionList; + actBrowse: TAction; + tsLoad: TTabSheet; + tsFinish: TTabSheet; + frmLoad: TFixedHTMLDlgFrame; + frmProgress: TProgressFrame; + frmFinish: TFixedHTMLDlgFrame; + /// Displays standard Browse For Folder dialogue box to get + /// directory containing updated database files. + procedure actBrowseExecute(Sender: TObject); + /// Constructs owned object. procedure FormCreate(Sender: TObject); - /// Checks if form can close in response to user request. - /// - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - /// Tidies up on form destruction. + /// Destroys owned objects. procedure FormDestroy(Sender: TObject); strict private - type - /// Enumeration that specifies display style of 'headline' text - /// in dialogue box. - THeadlineStyle = (hsNormal, hsCancelled, hsError); - strict private + const + // Indices of wizard pages + cIntroPage = 0; + cSelectFolderPage = 1; + cLoadDatabasePage = 2; + cFinishPage = 3; var - /// Manages display of progress bar in prgress memo control. - /// - fProgressBarMgr: TMemoProgBarMgr; /// Flag that indicates if local database was updated. fDataUpdated: Boolean; - /// Flag that indicates if user cancelled update. - fCancelled: Boolean; - /// Object manages download and update process. - fUpdateMgr: TDBUpdateMgr; - - /// Handles activation of application by refreshing the display. - /// - /// This is necessary since hiding the dialogue window by - /// switching to another appliction then switching back causes some of the - /// controls to be hidden. Additionally, some controls are not always - /// displayed correctly when dialogue box is first displayed. - procedure WMActivateApp(var Msg: TMessage); message WM_ACTIVATEAPP; - - /// Returns the directory containing the local database files. - /// - function GetDataDir: string; - - /// Handles events triggered by the update manager object to - /// report current status. - /// TObject [in] Object triggering event. - /// TDBUpdateMgr.TStatus [in] Current status of update - /// manager. - /// Boolean [in/out] Flag that can be set True to - /// indicate that the update should be cancelled. - procedure UpdateStatusHandler(Sender: TObject; Status: TDBUpdateMgr.TStatus; - var Cancel: Boolean); - - /// Handles OnProgress event triggered by the database update - /// manager when downloading the database. Displays progress in a progress - /// bar. - /// TObject [in] Object triggering event. - /// Int64 [in] Total number of bytes received - /// to date. - /// Int64 [in] Total number of bytes to be - /// downloaded. - /// Boolean [in/out] Flag that can be set True to - /// indicate that the update should be cancelled. - /// NOTE: Setting cancel to True does not cancel the download, - /// which runs to completion. Instead the update process is cancelled after - /// the download completes. - procedure DownloadProgressHandler(Sender: TObject; const BytesReceived, - BytesExpected: Int64; var Cancel: Boolean); - - /// Handles OnProgress event triggered by the file updater when - /// when downloading the database. Displays progress in a progress bar. - /// - /// TObject [in] Object triggering event. - /// Bytes [in] Pecentage progress to date. - /// Boolean [in,out] Flag that event handler can set - /// True to abort the update. - /// NOTE: Setting cancel to True does not cancel the file update, - /// which runs to completion. Instead the update process is cancelled after - /// the file update completes. - procedure FileUpdateProgressHandler(Sender: TObject; const Percent: Byte; - var Cancel: Boolean); - - /// Displays the given progress message. - procedure ProgressMsg(const Msg: string); - - /// Displays a 'headline' message. - /// string [in] Message to display. - /// THeadlineStyle [in] Style of message to display. + /// Object used to disable and enable all controls on the form. + /// + fControlStateMgr: TControlStateMgr; + + /// Handles HTML template frame's OnBuildCSS event. Adds + /// additional CSS required by HTML in this form. + /// TObject [in] Reference to object triggering event. /// - procedure HeadlineMsg(const Msg: string; - const Kind: THeadlineStyle = hsNormal); + /// TCSSBuilder [in] Object used to construct the + /// CSS. + procedure BuildCSS(Sender: TObject; const CSSBuilder: TCSSBuilder); + + /// Validates entries on wizard pages indetified by the page + /// index. + procedure ValidatePage(const PageIdx: Integer); + + /// Retrieves import directory name from edit control where it is + /// entered. + function GetDirNameFromEditCtrl: string; + + /// Handles OnFileUpdateProgress event of TDBUpdateMgr by updating + /// progress display. + procedure CopyProgress(Sender: TObject; const Percentage: Single); + + /// Performs database update. + procedure DoUpdate; + + /// Handles given exception, converting expected exceptions into + /// ECodeSnip and re-raising all other unchanged. + /// Always raises a new exception. + /// This method is designed to handle exceptions raised when the + /// main database is updated. + procedure HandleException(const E: Exception); strict protected - /// Positions this dialogue box's controls with the form. - /// + /// Initialises wizard pages that display HTML content. + /// Overridden method called from ancestor class. + procedure ConfigForm; override; + + /// Aligns and arranges controls in each tab sheet and sizes + /// dialog box to accomodate controls. + /// Overridden method called from ancestor class. procedure ArrangeForm; override; - /// Initialises the form's controls. - procedure InitForm; override; + /// Protected constructor that sets up form. + constructor InternalCreate(AOwner: TComponent); override; + + /// Returns text of heading on page indexed by PageIdx. + /// Overridden method called from ancestor class. + function HeadingText(const PageIdx: Integer): string; override; + + /// Validates a specified page then performs any action required + /// before next page is displayed. + /// Integer [in] Index of page to be checked before + /// moving to next page. + /// Boolean [in/out] Set True to permit next page to + /// be displayed or False to inhibit this. Defaults to True. + /// Overridden method called from ancestor class. + procedure MoveForward(const PageIdx: Integer; var CanMove: Boolean); + override; + + /// Updates state and caption of buttons on page index by + /// PageIdx. + /// Implementation of abstract method called from ancestor class. + /// + procedure UpdateButtons(const PageIdx: Integer); override; public + /// Displays the dialogue box and performs any required database /// update. /// TComponent [in] Component that owns the dialogue @@ -148,135 +152,201 @@ TDBUpdateDlg = class(TGenericViewDlg, INoPublicConstruct) /// update was performed for any reason (i.e. cancelling, loca database is /// up to date or an error occurred. class function Execute(AOwner: TComponent): Boolean; + end; implementation - uses - // Delphi - SysUtils, + // VCL + IOUtils, + Math, // Project - UAppInfo, UColours, UConsts, UCtrlArranger, UStrUtils, UUtils; - + UAppInfo, + UBrowseForFolderDlg, + UColours, + UCtrlArranger, + UCSSUtils, + UExceptions, + UHTMLTemplate, + UMessageBox, + UStructs, + UStrUtils, + Web.UInfo; {$R *.dfm} +{ TGetDDabSnippetsDlg } + +procedure TDBUpdateDlg.actBrowseExecute(Sender: TObject); +var + Dlg: TBrowseForFolderDlg; // browse for folder standard dialogue box resourcestring - // Progress report messages - sLoggingOn = 'Logging on to web server'; - sCheckForUpdates = 'Checking for updates'; - sDownloading = 'Downloading database'; - sDownloaded = 'Database downloaded'; - sUpdating = 'Updating local database'; - sUpToDate = 'Database is up to date'; - sLoggingOff = 'Logging off'; - sCompleted = 'Update completed'; - sCancelled = 'Update cancelled'; - sCancelling = 'Cancelling...'; - // Dialog box messages - sRunning = 'Performing update'; - sUpdtSuccess = 'Files updated successfully'; - sUpdtUpToDate = 'Database is up to date'; - sUpdtCancelled = 'Update cancelled'; - sUpdtError = '%0:s:'; - // Detailed error message - sErrorDetail = 'Full details of "%0:s" error message are:' - + EOL2 + '%1:s'; - -{ TDBUpdateDlg } + sDlgTitle = 'Choose Database Download Directory'; + sDlgHeading = 'Choose an empty directory or create a new one'; +begin + Dlg := TBrowseForFolderDlg.Create(nil); + try + Dlg.Title := sDlgTitle; + Dlg.Headline := sDlgHeading; + Dlg.MakeFolderBtnVisible := True; + if Dlg.Execute then + edPath.Text := Dlg.FolderName; + finally + Dlg.Free; + end; +end; procedure TDBUpdateDlg.ArrangeForm; +var + HTMLFrameHeight: Integer; + HTMLFrameClientWidth: Integer; begin - // Arrange inherited controls - inherited; TCtrlArranger.SetLabelHeights(Self); - // Controls in initial display - btnDoUpdate.Top := TCtrlArranger.BottomOf(lblUpdateFromWeb, 16); - // Arrange additonal cancel button - btnCancel.Left := btnClose.Left + btnClose.Width - btnCancel.Width; - btnCancel.Top := btnClose.Top; - // Align error label - lblError.Left := (pnlBody.Width - lblError.Width) div 2; + + // Arrange controls on tab sheets + + HTMLFrameHeight := MaxIntValue([ + frmIntro.DocHeight, frmLoad.DocHeight, frmFinish.DocHeight + ]); + HTMLFrameClientWidth := frmIntro.ClientWidth; + + // tsInfo + frmIntro.Height := HTMLFrameHeight; + frmIntro.Top := 0; + frmIntro.Left := 0; + + // tsFile + TCtrlArranger.AlignVCentres( + TCtrlArranger.BottomOf(lblFolder, 6), [edPath, btnBrowse] + ); + lblFolderPageInfo.Top := TCtrlArranger.BottomOf([edPath, btnBrowse], 12); + + // tsLoad + frmLoad.Height := HTMLFrameHeight; + frmLoad.ClientWidth := HTMLFrameClientWidth; + frmLoad.Top := 0; + frmLoad.Left := 0; + + // tsFinish + frmFinish.Height := HTMLFrameHeight; + frmFinish.ClientWidth := HTMLFrameClientWidth; + frmFinish.Top := 0; + frmFinish.Left := 0; + + // Size body + pnlBody.ClientWidth := TCtrlArranger.MaxContainerWidth( + [tsIntro, tsFolder, tsLoad, tsFinish] + ) + pnlBody.ClientWidth - tsIntro.Width; + pnlBody.ClientHeight := TCtrlArranger.MaxContainerHeight( + [tsIntro, tsFolder, tsLoad, tsFinish] + ) + pnlBody.ClientHeight - tsIntro.Height; + + // Arrange inherited controls and size the form + inherited; end; -procedure TDBUpdateDlg.btnCancelClick(Sender: TObject); +procedure TDBUpdateDlg.BuildCSS(Sender: TObject; + const CSSBuilder: TCSSBuilder); begin inherited; - // Sets cancelled flag checked during download - fCancelled := True; - ProgressMsg(sCancelling); + // Set body style to use window colour and frame's font with no margin + with CSSBuilder.Selectors['a'] do + AddProperty(TCSS.ColorProp(clExternalLink)); + // Create .framed border style + with CSSBuilder.AddSelector('.framed') do + begin + AddProperty(TCSS.BorderProp(cssAll, 1, cbsSolid, clBorder)); + AddProperty(TCSS.PaddingProp(4)); + end; end; -procedure TDBUpdateDlg.btnDoUpdateClick(Sender: TObject); +procedure TDBUpdateDlg.ConfigForm; +resourcestring + sProgressFrameDesc = 'Copying files...'; begin - inherited; - // Create update manager - fUpdateMgr := TDBUpdateMgr.Create(GetDataDir, 'Manual'); + // Initialise Intro HTML frame + pcWizard.ActivePage := tsIntro; + frmIntro.OnBuildCSS := BuildCSS; + frmIntro.Initialise( + 'dlg-dbupdate-intro-tplt.html', + procedure (Tplt: THTMLTemplate) + begin + Tplt.ResolvePlaceholderText( + 'CSDBReleaseURL', + TWebInfo.CSDBReleaseURL + ); + end + ); + + // Initialise Load HTML frame + pcWizard.ActivePage := tsLoad; + frmLoad.OnBuildCSS := BuildCSS; + frmLoad.Initialise('dlg-dbupdate-load.html'); + + // Initialise Finish HTML frame + pcWizard.ActivePage := tsFinish; + frmFinish.OnBuildCSS := BuildCSS; + frmFinish.Initialise('dlg-dbupdate-finish.html'); + + // Initialise progress display frame + frmProgress.Visible := False; + frmProgress.Range := TRange.Create(0, 100); + frmProgress.Description := sProgressFrameDesc; +end; + +procedure TDBUpdateDlg.CopyProgress(Sender: TObject; + const Percentage: Single); +begin + frmProgress.Progress := Round(Percentage); + Application.ProcessMessages; +end; + +procedure TDBUpdateDlg.DoUpdate; + + procedure PrepareUIForUpdate; + begin + Enabled := False; + fControlStateMgr.Update; + frmLoad.Visible := False; + frmProgress.Show(pnlBody); + end; + + procedure RestoreUI; + begin + frmProgress.Hide; + frmLoad.Visible := True; + Enabled := True; + fControlStateMgr.Update; + end; + +var + UpdateMgr: TDBUpdateMgr; +begin + fDataUpdated := False; + PrepareUIForUpdate; try - fUpdateMgr.OnStatus := UpdateStatusHandler; - fUpdateMgr.OnDownloadProgress := DownloadProgressHandler; - fUpdateMgr.OnFileUpdateProgress := FileUpdateProgressHandler; - // Update control visibility - lblUpdateFromWeb.Visible := False; - lblError.Visible := False; - btnDoUpdate.Visible := False; - btnClose.Visible := False; - btnCancel.Visible := True; - edProgress.Visible := True; - HeadlineMsg(sRunning); - // Reset download flag to allow download to continue. Clicking cancel button - // sets this flag true - fCancelled := False; - // Perform the download and display message depending on result - fDataUpdated := False; - case fUpdateMgr.Execute of - urUpdated: - begin - // connection to web succeeded and files were updated - HeadlineMsg(sUpdtSuccess); + UpdateMgr := TDBUpdateMgr.Create( + TAppInfo.AppDataDir, GetDirNameFromEditCtrl + ); + UpdateMgr.OnFileUpdateProgress := CopyProgress; + try + try + UpdateMgr.Execute; fDataUpdated := True; + finally + UpdateMgr.Free; end; - urNoUpdate: - begin - // connection to web succeeded but no files were updated - HeadlineMsg(sUpdtUpToDate); - end; - urCancelled: - begin - // user cancelled update - HeadlineMsg(sUpdtCancelled, hsCancelled); - end; - urError: - begin - // an error occured during update - fProgressBarMgr.Hide; - ProgressMsg(''); - ProgressMsg(fUpdateMgr.LongError); - HeadlineMsg(Format(sUpdtError, [fUpdateMgr.ShortError]), hsError); - end; + except + on E: Exception do + HandleException(E); end; finally - FreeAndNil(fUpdateMgr); - // Reset cancelled flag - fCancelled := False; - // Hide cancel button and show close button - btnCancel.Visible := False; - btnClose.Visible := True; + RestoreUI; end; end; -procedure TDBUpdateDlg.DownloadProgressHandler(Sender: TObject; - const BytesReceived, BytesExpected: Int64; var Cancel: Boolean); -begin - if BytesReceived = 0 then - fProgressBarMgr.Max := BytesExpected; - fProgressBarMgr.Position := BytesReceived; - Cancel := fCancelled; - Application.ProcessMessages; -end; - class function TDBUpdateDlg.Execute(AOwner: TComponent): Boolean; begin with InternalCreate(AOwner) do @@ -288,141 +358,113 @@ class function TDBUpdateDlg.Execute(AOwner: TComponent): Boolean; end; end; -procedure TDBUpdateDlg.FileUpdateProgressHandler(Sender: TObject; - const Percent: Byte; var Cancel: Boolean); +procedure TDBUpdateDlg.FormCreate(Sender: TObject); begin - if Percent = 0 then - fProgressBarMgr.Max := 100; - fProgressBarMgr.Position := Percent; - Cancel := fCancelled; - Application.ProcessMessages; + inherited; + fControlStateMgr := TControlStateMgr.Create(Self); end; -procedure TDBUpdateDlg.FormCloseQuery(Sender: TObject; - var CanClose: Boolean); +procedure TDBUpdateDlg.FormDestroy(Sender: TObject); begin + fControlStateMgr.Free; inherited; - if btnClose.Visible then - CanClose := True - else - begin - CanClose := False; - fCancelled := True; - end; end; -procedure TDBUpdateDlg.FormCreate(Sender: TObject); +function TDBUpdateDlg.GetDirNameFromEditCtrl: string; begin - inherited; - // Record that no update yet taken place - fDataUpdated := False; - // Object that handles location and display of progress bar - fProgressBarMgr := TMemoProgBarMgr.Create(edProgress); + Result := StrTrim(edPath.Text); end; -procedure TDBUpdateDlg.FormDestroy(Sender: TObject); +procedure TDBUpdateDlg.HandleException(const E: Exception); begin - inherited; - FreeAndNil(fProgressBarMgr); + if (E is EInOutError) + or (E is ENotSupportedException) + or (E is EDirectoryNotFoundException) + or (E is EPathTooLongException) + or (E is EArgumentException) + or (E is EDBUpdateValidationError) then + raise ECodeSnip.Create(E.Message); + raise E; end; -function TDBUpdateDlg.GetDataDir: string; +function TDBUpdateDlg.HeadingText(const PageIdx: Integer): string; +resourcestring + sIntroHeading = 'Download the database'; + sSelectFolderHeading = 'Select database download folder'; + sLoadDataseHeading = 'Install the database'; + sFinishHeading = 'Database installed'; begin - Result := TAppInfo.AppDataDir; + case PageIdx of + cIntroPage: Result := sIntroHeading; + cSelectFolderPage: Result := sSelectFolderHeading; + cLoadDatabasePage: Result := sLoadDataseHeading; + cFinishPage: Result := sFinishHeading; + end; end; -procedure TDBUpdateDlg.HeadlineMsg(const Msg: string; - const Kind: THeadlineStyle); +constructor TDBUpdateDlg.InternalCreate(AOwner: TComponent); begin - // Display message - lblHeadline.Caption := Msg; - lblHeadline.Visible := True; - // Determine appearance - case Kind of - hsNormal: - begin - // Normal message: standard colours - lblHeadline.ParentFont := True; - lblError.Visible := False; - end; - hsCancelled: - begin - // Cancel message: show in warning text colour - lblHeadline.Font.Color := clWarningText; - lblError.Visible := False; + Assert(Supports(Self, INoPublicConstruct), ClassName + '.InternalCreate: ' + + 'Form''s protected constructor can''t be called'); + inherited InternalCreate(AOwner); +end; + +procedure TDBUpdateDlg.MoveForward(const PageIdx: Integer; + var CanMove: Boolean); +begin + // NOTE: Will never be called if PageIdx is last page. + CanMove := False; + try + ValidatePage(PageIdx); + case PageIdx of + cLoadDatabasePage: DoUpdate; end; - hsError: + CanMove := True; + except + on E: EDataEntry do begin - // Error message: show in warning text colour followed by extra error - // info. Make sure headline ends in one space to separate headline from - // error message - lblHeadline.Caption := StrTrimRight(lblHeadline.Caption) + ' '; - lblHeadline.Font.Color := clWarningText; - TCtrlArranger.MoveToRightOf(lblHeadline, lblError); - lblError.Top := lblHeadline.Top; - lblError.Visible := True; + TMessageBox.Error(Self, E.Message); + if Assigned(E.Ctrl) then + E.Ctrl.SetFocus; end; + on E: ECodeImportMgr do + TMessageBox.Error(Self, E.Message); end; end; -procedure TDBUpdateDlg.InitForm; +procedure TDBUpdateDlg.UpdateButtons(const PageIdx: Integer); +resourcestring + sLoadPageBtn = '&Load'; begin inherited; - btnCancel.Visible := False; - btnClose.Visible := True; + case PageIdx of + cLoadDatabasePage: btnNext.Caption := sLoadPageBtn; + cFinishPage: btnBack.Enabled := False; + end; end; -procedure TDBUpdateDlg.ProgressMsg(const Msg: string); -begin - edProgress.Lines.Add(Msg); -end; +procedure TDBUpdateDlg.ValidatePage(const PageIdx: Integer); -procedure TDBUpdateDlg.UpdateStatusHandler(Sender: TObject; - Status: TDBUpdateMgr.TStatus; var Cancel: Boolean); -begin - // Update UI according to status - case Status of - usLogOn: - ProgressMsg(sLoggingOn); - usCheckForUpdates: - ProgressMsg(sCheckForUpdates); - usDownloadStart: - begin - ProgressMsg(sDownloading + ' '); - fProgressBarMgr.Show(edProgress.Lines.Count - 1); - end; - usDownloadEnd: - begin - fProgressBarMgr.Hide; - ProgressMsg(sDownloaded); - end; - usUpdating: - begin - ProgressMsg(sUpdating + ' '); - fProgressBarMgr.Show(edProgress.Lines.Count - 1); - end; - usNoUpdate: - ProgressMsg(sUpToDate); - usLogOff: - ProgressMsg(sLoggingOff); - usCompleted: - begin - fProgressBarMgr.Hide; - ProgressMsg(sCompleted); + procedure ValidateSelectFolderPage; + resourcestring + sNoDirNameError = 'No update directory specified. Please enter one.'; + begin + if GetDirNameFromEditCtrl = '' then + raise EDataEntry.Create(sNoDirNameError, edPath); + try + TDBUpdateMgr.ValidateUpdate(GetDirNameFromEditCtrl); + except + on E: EDBUpdateValidationError do + raise EDataEntry.Create(E.Message, edPath); + else + raise; end; - usCancelled: - ProgressMsg(sCancelled); end; - // Application needs to process messages to allow any UI updates - Application.ProcessMessages; - // Halt update if user cancelled - Cancel := fCancelled; -end; -procedure TDBUpdateDlg.WMActivateApp(var Msg: TMessage); begin - Refresh; + case PageIdx of + cSelectFolderPage: ValidateSelectFolderPage; + end; end; end. - diff --git a/Src/HTML.hrc b/Src/HTML.hrc index 222a08d7e..2b920a012 100644 --- a/Src/HTML.hrc +++ b/Src/HTML.hrc @@ -50,6 +50,12 @@ Res\HTML\dlg-codesubmit-license.html Res\HTML\dlg-codesubmit-submit.html Res\HTML\dlg-codesubmit-finished.html +# get delphidabbler snippets database wizard +Res\HTML\dlg-dbupdate-intro-tplt.html +Res\HTML\dlg-dbupdate-load.html +Res\HTML\dlg-dbupdate-finish.html + + # Detail pane pages, scripts and CSS # ================================== @@ -140,4 +146,3 @@ Res\Img\Egg\blue-paper.png # donate dialogue - � sign image Res\Img\pound-sign.png - diff --git a/Src/Res/HTML/dlg-dbupdate-finish.html b/Src/Res/HTML/dlg-dbupdate-finish.html new file mode 100644 index 000000000..f43ed6e3e --- /dev/null +++ b/Src/Res/HTML/dlg-dbupdate-finish.html @@ -0,0 +1,40 @@ + + + + + + + + + + dlg-dbupdate-finish.html + + + + +

      + The database was installed successfully. +

      + +

      + Immediately this dialogue box is closed the database will be reloaded and the newly installed Code Snippets database will replace any earlier version. +

      + +

      + Click the Finish button to close the dialogue box. +

      + + + + diff --git a/Src/Res/HTML/dlg-dbupdate-intro-tplt.html b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html new file mode 100644 index 000000000..c9ef1d0ec --- /dev/null +++ b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html @@ -0,0 +1,67 @@ + + + + + + + + + + dlg-dbupdate-intro-tplt.html + + + + +

      + Important Note: you are strongly advised to back up your user database before going ahead with this installation. To do this cancel this dialogue box then use the Database | Backup User Database menu option to create a backup, then come back here. +

      + +

      + Before you can install a new version of the DelphiDabbler Code Snippets Database you need to download it from GitHub. +

      + +

      + First go to <%CSDBReleaseURL%> and find the latest release of the database built for CodeSnip v4.16 and later. Look for a zip file whose name has the form csdb416-v2.x.x.zip where 2.x.x is the database version number. +

      + +

      + Download the file and unzip it into a folder on your computer. Make a note of the folder's location - it will be needed in the next step. +

      + +

      + Note: Your chosen download folder: +

      + +
        +
      • + must be empty before downloading the database. +
      • +
      • + must not be a sub-directory of CodeSnip's application or user data directories. +
      • +
      + +

      + Once the file has been downloaded and unzipped, click the Next button. +

      + + + + diff --git a/Src/Res/HTML/dlg-dbupdate-load.html b/Src/Res/HTML/dlg-dbupdate-load.html new file mode 100644 index 000000000..50c97e1e7 --- /dev/null +++ b/Src/Res/HTML/dlg-dbupdate-load.html @@ -0,0 +1,40 @@ + + + + + + + + + + dlg-dbupdate-load.html + + + + +

      + Ready to install the new version of the database. +

      + +

      + Click the Load button to begin the installation. +

      + +

      + Note: Once you have clicked the Load button you cannot cancel the installation process. +

      + + + + diff --git a/Src/UDBUpdateMgr.pas b/Src/UDBUpdateMgr.pas index 13ef0dbc1..a8bdef02b 100644 --- a/Src/UDBUpdateMgr.pas +++ b/Src/UDBUpdateMgr.pas @@ -8,7 +8,7 @@ * $Rev$ * $Date$ * - * Object used to manage database updates from web. + * Object used to manage main Code Snippets database updates. } @@ -22,28 +22,21 @@ interface // Delphi SysUtils, // Project - UDOSDateTime, UEncodings, Web.UDBDownloadMgr; - + UExceptions; type - /// Manages the process of checking update availability and perform - /// updates of the local Code Snippets Database from the online version. + /// Type of exception raised when validating database update. /// + EDBUpdateValidationError = class(ECodeSnip); + +type + /// Manages the process of installing a main database update from a + /// local directory containing required database files. TDBUpdateMgr = class(TObject) public type - /// - /// Enumeration of possible results of a database update request. - /// - /// - urUpdated - local database was updated - /// - urNoUpdate - no update available: local database up to date. - /// - /// - urCancelled - user cancelled request. - /// - urError - an error occurred. - /// - TUpdateResult = (urUpdated, urNoUpdate, urCancelled, urError); - type + // TODO -cDBUpdate: Remove this type once dummy placeholder method removed /// /// Enumeration of possible result when querying if a database /// updated is available. @@ -52,203 +45,67 @@ TDBUpdateMgr = class(TObject) /// - uqError - an error occurred during the request. /// TUpdateQueryResult = (uqUpToDate, uqUpdateAvailable, uqError); - type - /// - /// Enumeration of different possible states of database update - /// manager during an update request. - /// -usLogon - logging on to update web service. - /// -usCheckForUpdates - checking for availability of update. - /// - /// -usDownloadStart - starting to download online database. - /// -usDownloadEnd - finished downloading online database. - /// -usUpdating - updating local database. - /// -usNoUpdate - no update available. - /// -usLogOff - logging off web service. - /// -usCompleted - completed update process. - /// -usCancelled - update process was cancelled. - /// - TStatus = ( - usLogOn, usCheckForUpdates, usDownloadStart, usDownloadEnd, usUpdating, - usNoUpdate, usLogOff, usCompleted, usCancelled - ); - type - /// Type of event triggered when status changes during an update - /// request. - /// TObject [in] Object that triggered event. - /// - /// TDBUpdateMgr.TStatus [in] Current status. - /// - /// Boolean [in,out] Flag that event handler can set - /// True to abort the update. - TStatusEvent = procedure(Sender: TObject; Status: TStatus; - var Cancel: Boolean) of object; - type - /// Type of event triggered to report progress when downloading - /// the online database.. - /// TObject [in] Object that triggered event. - /// - /// Int64 [in] Number of bytes downloaded so - /// far. - /// Int64 [in] Total number of bytes to be - /// downloaded. - /// Boolean [in,out] Flag that event handler can set - /// True to abort the update. - TDownloadEvent = procedure(Sender: TObject; const BytesHandled, - TotalBytes: Int64; var Cancel: Boolean) of object; type /// Type of event triggered to report progress when updating /// local database files. /// TObject [in] Object that triggered event. /// /// Bytes [in] Pecentage progress to date. - /// Boolean [in,out] Flag that event handler can set - /// True to abort the update. - TProgressEvent = procedure(Sender: TObject; const Progress: Byte; - var Cancel: Boolean) of object; + TProgressEvent = procedure(Sender: TObject; const Percentage: Single) + of object; + strict private var - /// Flag that indicates if an update request was cancelled. - /// - fCancelled: Boolean; - /// Object that interacts with database download web service. - /// - fDownloadMgr: TDBDownloadMgr; /// Directory when the local database files are stored. /// fLocalDir: string; - /// Value of LongError property. - fLongError: string; - /// Value of ShortError property. - fShortError: string; - /// Event handler for OnStatus event. - fOnStatus: TStatusEvent; - /// Event handler for OnDownloadProgress event. - fOnDownloadProgress: TDownloadEvent; + /// Directory containing updated database files. + fUpdateDir: string; /// Event handler for OnFileUpdateProgress event. fOnFileUpdateProgress: TProgressEvent; - /// Information specific to the code using this object. - /// - fCallerInfo: string; - /// Handles database download manager's OnProgress event. - /// + /// Handles file updater's OnProgress event by passing it on to + /// this class' own OnFileUpdateProgress event. /// TObject [in] Object that triggered event. - /// Int64 [in] Number of bytes downloaded so - /// far. - /// Int64 [in] Total number of bytes to be - /// downloaded. - procedure DownloadProgressHandler(Sender: TObject; const BytesToDate, - ExpectedBytes: Int64); - - /// Handles file updater's OnProgress event. - /// TObject [in] Object that triggered event. - /// Cardinal [in] Number of files updated to - /// date. - /// Cardinal [in] Total number of files to be - /// updated. - procedure FileUpdateProgressHandler(Sender: TObject; const AFilesHandled, - ATotalFiles: Cardinal); - - /// Returns the number of files in the local copy of the Code - /// Snippets database. - function LocalFileCount: Integer; - - /// Returns an object that encapsulate the last update date of - /// the newest file in the local copy of the Code Snippets database. - /// - function NewestLocalFileDate: IDOSDateTime; - - /// Checks if the local Code Snippets database files need to be - /// updated. - /// Boolean. True if an update is required or False if not or if - /// process was cancelled. - /// Compares date of newest local database file with last update - /// date of online database. - function UpdateNeeded: Boolean; - - /// Downloads database and updates local files. - /// Boolean. True if download and update succeeded or False if - /// the process was cancelled. - function PerformUpdate: Boolean; - - /// Logs on to web server. - /// Boolean. True if log-on succeeded or False if the process was - /// cancelled. - function LogOn: Boolean; - - /// Logs off web server. - procedure LogOff; - - /// Downloads a copy of the online database. - /// TEncodedData [out] Receives data containing the - /// downloaded database. - /// Boolean. True on success or False if process is cancelled. - /// - function DownloadDatabase(out Data: TEncodedData): Boolean; - - /// Updates the files in the local database from the downloaded - /// data. - /// TEncodedData [in] Data containing downloaded - /// database. - /// Boolean. True on success or False if process is cancelled. - /// - function UpdateLocalDatabase(const Data: TEncodedData): Boolean; - - /// Handles various types of known exception, recording their - /// messages. - /// Exception [in] Exception to be handled. - /// True if exception was handled or False otherwise. - /// Supported exception messages are made available via the - /// ShortError and LongError properties. - function HandleException(const E: Exception): Boolean; - - strict protected - /// Notifies a change in the status of an update request by - /// triggering the OnStatus event. - /// TDBUpdateMgr.TStatus [in] New status. - /// Boolean. True if event handler did not set Cancelled flag, - /// False otherwise. - function NotifyStatus(Status: TStatus): Boolean; virtual; + /// Single [in] Percentage progress. + procedure FileUpdateProgressHandler(Sender: TObject; + const Percentage: Single); + + /// Updates the files in the local database from the files in the + /// updated data directory. + procedure UpdateLocalDatabase; public /// Constructs and initialises a new object instance. /// string [in] Directory that contains the local /// copy of the Code Snippets database. - /// string [in] Information about calling code. + /// string [in] Directory containing updated + /// database files. /// - constructor Create(const LocalDir, CallerInfo: string); - - /// Destroys object instance. - destructor Destroy; override; + constructor Create(const LocalDir, UpdateDir: string); /// Performs a database update. - /// TDBUpdateMgr.TUpdateResult. Value that indicates if database - /// was updated, if process was cancelled or if there has been an error. - /// - function Execute: TUpdateResult; + /// EDBUpdateValidationError. Raised if database update fails + /// any validation checks. + /// Exception. May propagate any Exception or sub class if an + /// unexpected error is raised. + procedure Execute; /// Queries whether updates to the local database are available. /// - /// TDBUpdateMgr.TUpdateQueryResult. Value indicating whether a - /// update is available or not of if and error occured with the query. - /// + /// TDBUpdateMgr.TUpdateQueryResult value of uqUpToDate is always + /// returned. + /// This method is currently a stub left in place because it is + /// called by the redundant update checker thread that is slated for + /// removal. function CheckForUpdates: TUpdateQueryResult; - /// Full description of last update error. - property LongError: string read fLongError; - - /// Abbreviated description of last update error. - property ShortError: string read fShortError; - - /// Event triggered when the status of an update request changes. + /// Validates package of update files in given directory. /// - property OnStatus: TStatusEvent read fOnStatus write fOnStatus; - - /// Event triggered to report progress when downloading a copy of - /// the online database. - property OnDownloadProgress: TDownloadEvent - read fOnDownloadProgress write fOnDownloadProgress; + /// EDBUpdateValidationError raised if any validation test + /// fails. + class procedure ValidateUpdate(const UpdateDir: string); /// Event triggered to report progress when updating local /// database files. @@ -262,268 +119,125 @@ implementation uses // Delphi - Classes, Math, + IOUtils, // Project - IntfCommon, UConsts, UFileUpdater, UUtils, UExceptions; - - -resourcestring - // Error messages - sGeneralUpdateError = 'Update Error'; - sChecksumShortError = 'Corrupt File Error'; - sChecksumLongError = '%s' - + EOL2 - + 'This is probably caused by an internet transmisson error. Please try ' - + 'downloading again. If the problem persists please report it.'; + DB.UMetaData, + UAppInfo, + UFileUpdater, + UStrUtils, + UUtils; { TDBUpdateMgr } function TDBUpdateMgr.CheckForUpdates: TUpdateQueryResult; begin - try - LogOn; - if UpdateNeeded then - Result := uqUpdateAvailable - else - Result := uqUpToDate; - LogOff; - except - on E: Exception do - begin - Result := uqError; - if not HandleException(E) then - raise; - end; - end; + // TODO -cDBUpdate: Remove this temporary fix once update checker thread removed + // TODO -cDBUpdate: Remove this method once above TODO is completed + Result := uqUpToDate; end; -constructor TDBUpdateMgr.Create(const LocalDir, CallerInfo: string); +constructor TDBUpdateMgr.Create(const LocalDir, UpdateDir: string); begin inherited Create; - // Create download manager to download from remote web server - fDownloadMgr := TDBDownloadMgr.Create; - fDownloadMgr.OnProgress := DownloadProgressHandler; - fCallerInfo := CallerInfo; fLocalDir := LocalDir; + fUpdateDir := UpdateDir; EnsureFolders(fLocalDir); end; -destructor TDBUpdateMgr.Destroy; +procedure TDBUpdateMgr.Execute; begin - fDownloadMgr.Free; - inherited; -end; - -function TDBUpdateMgr.DownloadDatabase(out Data: TEncodedData): Boolean; -begin - Result := False; - if not NotifyStatus(usDownloadStart) then - Exit; - Data := fDownloadMgr.GetDatabase(True); - if not NotifyStatus(usDownloadEnd) then - Exit; - Result := not fCancelled; -end; - -procedure TDBUpdateMgr.DownloadProgresshandler(Sender: TObject; - const BytesToDate, ExpectedBytes: Int64); -begin - if Assigned(fOnDownloadProgress) then - fOnDownloadProgress(Self, BytesToDate, ExpectedBytes, fCancelled); -end; - -function TDBUpdateMgr.Execute: TUpdateResult; -begin - // Assume user cancelled - Result := urCancelled; - try - try - // Log on to web server - if not LogOn then - Exit; - // Check if we need an update - if UpdateNeeded then - begin - if not PerformUpdate then - Exit; - Result := urUpdated; - end - else - begin - if not NotifyStatus(usNoUpdate) then - Exit; - Result := urNoUpdate; - end; - // Log off web server - if not NotifyStatus(usLogOff) then - Exit; - LogOff; - if not NotifyStatus(usCompleted) then - Exit; - except - // Handle known exceptions - on E: Exception do - begin - Result := urError; - if not HandleException(E) then - raise; - end; - end; - finally - if fCancelled then - NotifyStatus(usCancelled); - end; + ValidateUpdate(fUpdateDir); + UpdateLocalDatabase end; procedure TDBUpdateMgr.FileUpdateProgressHandler(Sender: TObject; - const AFilesHandled, ATotalFiles: Cardinal); -var - FilesHandled: Cardinal; - TotalFiles: Cardinal; - Percent: Byte; + const Percentage: Single); begin if not Assigned(fOnFileUpdateProgress) then Exit; - // Ensure TotalFiles > 0 and 0 <= FilesHandled <= TotalFiles - TotalFiles := Max(1, ATotalFiles); - FilesHandled := Min(AFilesHandled, ATotalFiles); - Percent := Round(100 * FilesHandled / TotalFiles); - fOnFileUpdateProgress(Self, Percent, fCancelled); -end; - -function TDBUpdateMgr.HandleException(const E: Exception): Boolean; -begin - if E is EDBDownloadMgr then - begin - // Download manager exceptions provide both long and short error messages - fLongError := E.Message; - fShortError := (E as EDBDownloadMgr).ShortMsg; - Result := True; - end - else if E is EFileUpdater then - begin - // File updater exception represent checksum errors - fLongError := Format(sChecksumLongError, [E.Message]); - fShortError := sChecksumShortError; - Result := True; - end - else if E is ECodeSnip then - begin - // General non-bug exceptions - fLongError := E.Message; - fShortError := sGeneralUpdateError; - Result := True; - end - else - // Don't handle any other exception types - Result := False; -end; - -function TDBUpdateMgr.LocalFileCount: Integer; -var - LocalFiles: TStringList; // list of files in local database directory -begin - LocalFiles := TStringList.Create; - try - ListFiles(fLocalDir, '*.*', LocalFiles); - Result := LocalFiles.Count; - finally - LocalFiles.Free; - end; -end; - -procedure TDBUpdateMgr.LogOff; -begin - fDownloadMgr.LogOff; -end; - -function TDBUpdateMgr.LogOn: Boolean; -begin - Result := False; - if not NotifyStatus(usLogOn) then - Exit; - fDownloadMgr.LogOn(fCallerInfo); - Result := True; -end; - -function TDBUpdateMgr.NewestLocalFileDate: IDOSDateTime; -var - LocalFiles: TStringList; // list of files in local data directory - FileName: string; // name of a file in local data directory - FileDate: IDOSDateTime; // DOS date of a file -begin - Result := TDOSDateTimeFactory.CreateFromDOSTimeStamp(0); - // Get all files in directory - LocalFiles := TStringList.Create; - try - ListFiles(fLocalDir, '*.*', LocalFiles); - if LocalFiles.Count > 0 then - begin - for FileName in LocalFiles do - begin - FileDate := TDOSDateTimeFactory.CreateFromFile(FileName); - if Result.CompareTo(FileDate) < 0 then - (Result as IAssignable).Assign(FileDate); - end; - end; - finally - LocalFiles.Free; - end; -end; - -function TDBUpdateMgr.NotifyStatus(Status: TStatus): Boolean; -begin - if Assigned(fOnStatus) then - fOnStatus(Self, Status, fCancelled); - Result := not fCancelled; -end; - -function TDBUpdateMgr.PerformUpdate: Boolean; -var - Data: TEncodedData; // stores downloaded data -begin - Result := False; - if fCancelled then - Exit; - if DownloadDatabase(Data) then - Result := UpdateLocalDatabase(Data); + fOnFileUpdateProgress(Self, Percentage); end; -function TDBUpdateMgr.UpdateLocalDatabase(const Data: TEncodedData): Boolean; +procedure TDBUpdateMgr.UpdateLocalDatabase; var Updater: TFileUpdater; // object that performs file updates. begin - Result := False; - if not NotifyStatus(usUpdating) then - Exit; - Updater := TFileUpdater.Create(fLocalDir, Data); + Updater := TFileUpdater.Create(fLocalDir, fUpdateDir); try Updater.OnProgress := FileUpdateProgressHandler; Updater.Execute; - Result := True; finally Updater.Free; end; end; -function TDBUpdateMgr.UpdateNeeded: Boolean; +class procedure TDBUpdateMgr.ValidateUpdate(const UpdateDir: string); +resourcestring + // Error messages + sBadDirNameError = 'Update directory "%s" does not exist.'; + sEmptyDirError = 'Update directory "%s" is empty.'; + sIsSubDirError = 'The update directory must not be within CodeSnip''s ' + + 'application or user data directories, i.e. "%s" or "%s".'; + sUnrootedDirError = 'A full path to the update directory must be specified.'; + sInvalidDatabaseError = 'The update directory does not contain valid ' + + 'database files.'; + sUnrecognisedDatabaseError = 'The files in "%s" are not recognised as a ' + + 'valid database.'; + sUnsupportedDatabaseError = 'Database in "%0:s" is version %1:s. This ' + + 'version is not currently supported by CodeSnip.'; + sCurruptDatabaseError = 'The update database in "%s" is corrupt'; var - LastDatabaseUpdate: IDOSDateTime; // date of newest file in remote database -begin - Result := False; - if not NotifyStatus(usCheckForUpdates) then - Exit; - // first check if file counts match - Result := fDownloadMgr.FileCount <> LocalFileCount; - if not Result then - begin - // file count OK: compare last update dates - LastDatabaseUpdate := TDOSDateTimeFactory.CreateFromUnixTimeStamp( - StrToInt64(fDownloadMgr.LastUpdate) + Dir: string; + MetaData: IDBMetaData; +begin + Assert(UpdateDir <> '', + ClassName + '.ValidateUpdate: UpdateDir cannot be empty string'); + + Dir := ExcludeTrailingPathDelimiter(UpdateDir); + + // Dir must be rooted + if not TPath.IsPathRooted(Dir) then + raise EDBUpdateValidationError.Create(sUnrootedDirError); + + // Dir must exist + if not TDirectory.Exists(Dir, False) then + raise EDBUpdateValidationError.CreateFmt(sBadDirNameError, [Dir]); + + // Dir must not be located in CodeSnip's app or user data directories + if StrStartsText( + IncludeTrailingPathDelimiter(TAppInfo.CommonAppDir), + IncludeTrailingPathDelimiter(Dir) + ) or StrStartsText( + IncludeTrailingPathDelimiter(TAppInfo.UserAppDir), + IncludeTrailingPathDelimiter(Dir) + ) then + raise EDBUpdateValidationError.CreateFmt( + sIsSubDirError, [TAppInfo.CommonAppDir, TAppInfo.UserAppDir] ); - Result := LastDatabaseUpdate.CompareTo(NewestLocalFileDate) > 0; - end; + + // Dir must not be empty + if TDirectory.IsEmpty(Dir) then + raise EDBUpdateValidationError.CreateFmt(sEmptyDirError, [Dir]); + + // Check contents + MetaData := TMainDBMetaDataFactory.UpdateMetaDataInstance(Dir); + + // check if data files are recognised as valid database + if not MetaData.IsRecognised then + raise EDBUpdateValidationError.CreateFmt(sUnrecognisedDatabaseError, [Dir]); + + // seems to be valid database: check if it's a supported version + if not MetaData.IsSupportedVersion then + raise EDBUpdateValidationError.CreateFmt( + sUnsupportedDatabaseError, [Dir, string(MetaData.GetVersion)] + ); + + // database version supported: check if required meta data files and master db + // file are present + if MetaData.IsCorrupt + or not TFile.Exists(Dir + PathDelim + 'categories.ini', False) then + raise EDBUpdateValidationError.CreateFmt(sCurruptDatabaseError, [Dir]); end; end. diff --git a/Src/UFileUpdater.pas b/Src/UFileUpdater.pas index 2c9e10c30..79885a1b1 100644 --- a/Src/UFileUpdater.pas +++ b/Src/UFileUpdater.pas @@ -8,8 +8,8 @@ * $Rev$ * $Date$ * - * Object that updates local CodeSnip data files using a supplied stream of - * data. + * Implements a class that updates local CodeSnip data files from a directory + * containing updated files. } @@ -21,70 +21,47 @@ interface uses // Delphi - Classes, - // Project - UDataStreamIO, UEncodings, UExceptions; + Classes; type - /// - /// Class that updates local CodeSnip data files using a supplied stream of - /// data. - /// + /// Class that updates local CodeSnip data files from a directory + /// containing updated files. TFileUpdater = class(TObject) public type /// Type of event triggered when reporting progress in updating /// data files. - /// TObject [in] Object instance that triggered the - /// event. - /// Cardinal [in] Number of files updated to - /// date. - /// Cardinal [in] Total number of files to be - /// updated. - TProgressEvent = procedure(Sender: TObject; const FilesHandled, - TotalFiles: Cardinal) of object; + /// TObject [in] TFileUpdater object instance that + /// triggered the event. + /// Bytes [in] Pecentage progress to date. + TProgressEvent = procedure(Sender: TObject; const Percentage: Single) + of object; strict private var - /// Used to read formatted text data stream. - fReader: TTextStreamReader; - /// Local data directory. + /// Main database directory containg data files to be updated. + /// fLocalDir: string; + /// Directory containing updated database files. + fUpdateDir: string; /// Reference to any OnProgess event handler. fOnProgress: TProgressEvent; - /// - /// Reverts data files to state they were in before update. + /// Reverts data files to state they were in before update. /// procedure UndoUpdate; - /// - /// Creates a file from information in data stream. - /// - procedure UpdateFile; - /// - /// Writes a local database file. - /// - /// string [in] Name of file. - /// string [in] Content of file. - /// Int64 [in] Unix format GMT date stamp to be - /// applied to file. - procedure WriteFile(const Name, Content: string; const UnixDate: Int64); - /// - /// Triggers any assigned OnProgress event handler with information about - /// file update progress to date. - /// - /// Cardinal [in] Number of files updated to - /// date. - /// Cardinal [in] Total number of files to be - /// updated. - procedure ReportProgress(const FilesHandled, TotalFiles: Cardinal); + /// Handles directory copier object's OnCopyFileProgress + /// events and triggers this object's OnProgress event with same + /// parameters. + /// TObject [in] Not used. + /// Bytes [in] Pecentage progress to date. + procedure ProgressEventHandler(Sender: TObject; const Percent: Single); public /// Object constructor. Initialises object. - /// string [in] Directory storing local data files - /// that receives updated files. - /// TEncodedData [in] Update data. - constructor Create(const LocalDir: string; const UpdateData: TEncodedData); - /// Object destructor. Tears down object. - destructor Destroy; override; + /// string [in] Directory storing database data + /// files that receives updated files. + /// string [in] Directory where updated database + /// files are located. + constructor Create(const LocalDir, UpdateDir: string); /// Performs file updates. procedure Execute; /// Event that reports progress when updating local files. @@ -93,12 +70,6 @@ TFileUpdater = class(TObject) property OnProgress: TProgressEvent read fOnProgress write fOnProgress; end; -type - /// - /// Class of exception raised by TFileUpdater. - /// - EFileUpdater = class(ECodeSnip); - implementation @@ -107,82 +78,36 @@ implementation // Delphi SysUtils, // Project - UDataBackupMgr, UDOSDateTime, UIOUtils, UUtils; - - -resourcestring - // Exception messages - cDataCorruptError = 'The data is corrupt.'; - - -{ - Data stream format - ------------------ - - Stream comprises text characters from a MBCS encoding. Numbers are encoded as - hex, which must be single byte characters. - - Format is: - - FileCount: Int16; - number of files encoded in datastream - - followed by FileCount file records of: - - Name: SizedString16; - name of file - UnixDate: Int64; - file's modification date (GMT) in Unix format - (must be converted to local time and DOS date - stamp format) - Content: SizedString32; - file contents - - Data types are: - - Int16 - 16 bit integer encoded as 4 hex digits - Int32 - 32 bit integer encoded as 8 hex digits - Int64 - 64 bit integer encoded as 16 hex digits - SizedString16 - Int16 specifying string length followed by specified number - of characters - SizedString32 - Int32 specifying string length followed by specified number - of characters -} + UDataBackupMgr, + UDirectoryCopier, + UUtils; { TFileUpdater } -constructor TFileUpdater.Create(const LocalDir: string; - const UpdateData: TEncodedData); +constructor TFileUpdater.Create(const LocalDir, UpdateDir: string); begin inherited Create; fLocalDir := LocalDir; - fReader := TTextStreamReader.Create( - TBytesStream.Create(UpdateData.Data), - TEncodingHelper.GetEncoding(UpdateData.EncodingType), - [dsOwnsStream, dsOwnsEncoding] - ); -end; - -destructor TFileUpdater.Destroy; -begin - fReader.Free; - inherited; + fUpdateDir := UpdateDir; end; procedure TFileUpdater.Execute; var - FileCount: Integer; // number of files to copy to local directory - CopiedCount: Integer; // number of files copied + DirCopier: TDirectoryCopier; begin TDataBackupMgr.Backup; try // Clear local data directory UUtils.DeleteFiles(fLocalDir, '*.*'); - // Copy in new files - FileCount := fReader.ReadInt16; - CopiedCount := 0; - while CopiedCount < FileCount do - begin - UpdateFile; - Inc(CopiedCount); - ReportProgress(CopiedCount, FileCount); + DirCopier := TDirectoryCopier.Create; + try + DirCopier.OnBegin := nil; + DirCopier.OnCopyFileProgress := ProgressEventHandler; + DirCopier.OnEnd := nil; + DirCopier.Copy(fUpdateDir, fLocalDir); + finally + DirCopier.Free; end; except // Error: restore backup @@ -193,10 +118,11 @@ procedure TFileUpdater.Execute; TDataBackupMgr.DeleteBackup; end; -procedure TFileUpdater.ReportProgress(const FilesHandled, TotalFiles: Cardinal); +procedure TFileUpdater.ProgressEventHandler(Sender: TObject; + const Percent: Single); begin if Assigned(fOnProgress) then - fOnProgress(Self, FilesHandled, TotalFiles); + fOnProgress(Self, Percent); end; procedure TFileUpdater.UndoUpdate; @@ -205,31 +131,5 @@ procedure TFileUpdater.UndoUpdate; TDataBackupMgr.DeleteBackup; end; -procedure TFileUpdater.UpdateFile; -var - Name: string; // name of file - UnixDate: Int64; // file update date per server: Unix format & GMT - Content: string; // file content -begin - // Get info about file from data stream - Name := fReader.ReadSizedString16; - UnixDate := fReader.ReadInt64; - Content := fReader.ReadSizedString32; - // and create file - WriteFile(Name, Content, UnixDate); -end; - -procedure TFileUpdater.WriteFile(const Name, Content: string; - const UnixDate: Int64); -var - FilePath: string; // full path to local file - Date: IDOSDateTime; // object that encapsulates DOS date time value -begin - FilePath := IncludeTrailingPathDelimiter(fLocalDir) + Name; - TFileIO.WriteAllText(FilePath, Content, TEncoding.UTF8, True); - Date := TDOSDateTimeFactory.CreateFromUnixTimeStamp(UnixDate); - Date.ApplyToFile(FilePath); -end; - end. From 8d957256893011d94f33c3951126a8edfc1473d6 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 10:41:57 +0000 Subject: [PATCH 078/714] Changed text of menu item used to update main database Removed reference to online updating. --- Src/FmMain.dfm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 70397b545..ec7081e36 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -661,11 +661,10 @@ inherited MainForm: TMainForm end object actUpdateDbase: TAction Category = 'Database' - Caption = 'Update From Web...' + Caption = 'Install or Update DelphiDabbler Snippets Database...' Hint = - 'Update database from web|Update the main snippet database from t' + - 'he internet' - ImageIndex = 7 + 'Install or update DelphiDabbler Code Snippets database|Install o' + + 'r update the main DelphiDabbler Code Snippets database' OnExecute = actUpdateDbaseExecute end object actExportCode: TAction From 7dae9b0934dbabf3d33649949f60520f487421b1 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 10:42:43 +0000 Subject: [PATCH 079/714] Removed now unused Web.UDBDownloadMgr and Web.UStdWebService units. --- Src/CodeSnip.dpr | 2 - Src/CodeSnip.dproj | 2 - Src/Web.UDBDownloadMgr.pas | 419 ------------------------------------- Src/Web.UStdWebService.pas | 230 -------------------- 4 files changed, 653 deletions(-) delete mode 100644 Src/Web.UDBDownloadMgr.pas delete mode 100644 Src/Web.UStdWebService.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index decc6329d..fbdc507c5 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -390,12 +390,10 @@ uses UXMLDocumentEx in 'UXMLDocumentEx.pas', Web.UBaseWebService in 'Web.UBaseWebService.pas', Web.UCharEncodings in 'Web.UCharEncodings.pas', - Web.UDBDownloadMgr in 'Web.UDBDownloadMgr.pas', Web.UDownloadMonitor in 'Web.UDownloadMonitor.pas', Web.UExceptions in 'Web.UExceptions.pas', Web.UHTTPEx in 'Web.UHTTPEx.pas', Web.UInfo in 'Web.UInfo.pas', - Web.UStdWebService in 'Web.UStdWebService.pas', Web.USWAGRESTMgr in 'Web.USWAGRESTMgr.pas'; // Include resources diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 9106a48b7..4873b4ebe 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -591,12 +591,10 @@ - - diff --git a/Src/Web.UDBDownloadMgr.pas b/Src/Web.UDBDownloadMgr.pas deleted file mode 100644 index c64d11a67..000000000 --- a/Src/Web.UDBDownloadMgr.pas +++ /dev/null @@ -1,419 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2005-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a class that interfaces with a web service to update the local - * copy of the Code Snippets Database. -} - - -unit Web.UDBDownloadMgr; - - -interface - - -uses - // Delphi - Classes, - // Project - UEncodings, UURIParams, Web.UExceptions, Web.UStdWebService; - - -type - /// Provides an interface to the DelphiDabbler Code Snippets - /// Database update web service. - /// This class provides a public method for every command exposed by - /// the web service. - TDBDownloadMgr = class sealed(TStdWebService) - strict private - - /// Converts EWebError exceptions into EDBDownloadMgr exceptions - /// with both long and short descriptions. - /// EWebError [in] Exception to be converted. - /// Raises an EDBDownloadMgr exception based on the information - /// provided by exception E. - procedure HandleException(const E: EWebError); - - /// Includes the standard parameters required by every call to the - /// web service in the given parameter list. - procedure IncludeStdParams(const Params: TURIParams); - - /// Posts a command to the web service that includes the standard - /// parameters and returns the web service's response in a string list. - /// - /// string [in] Command to be sent to web service. - /// - /// TStrings [in] String list that receives the - /// response from the web service as lines of text. - /// EDBDownloadMgr taised if an EWebError exception is - /// encountered. - procedure PostStdCommand(const Cmd: string; const Response: TStrings); - - /// Posts a command to the web service and returns the data - /// component of the web service's response in a string list. - /// string [in] Command to be sent to web service. - /// - /// TURIParams [in] Parameters to be posted to the - /// web service. - /// TStrings [in] String list that receives the - /// response from the web service as lines of text. - /// EDBDownloadMgr raised if an EWebError exception is - /// encountered. - procedure SafePostCommand(const Cmd: string; const Params: TURIParams; - const Response: TStrings); - - public - - /// Creates a new object instance with the correct URL and - /// suitable user agent. - constructor Create; - - /// Logs on to the web service. - /// string [in] Specifies from where the web service - /// is called. - /// Boolean [in] Flag that indicates if an - /// OnProgress event is to be triggered while the web service's response is - /// being downloaded. - /// EDBDownloadMgr raised if an EWebError exception is - /// encountered. - procedure LogOn(const Caller: string; const WantProgress: Boolean = False); - - /// Logs off from the web server. - /// EDBDownloadMgr raised if an EWebError exception is - /// encountered. - /// Boolean [in] Flag that indicates if an - /// OnProgress event is to be triggered while the web service's response is - /// being downloaded. - procedure LogOff(const WantProgress: Boolean = False); - - /// Gets the date of the last update to the online Code Snippets - /// Database from the web service. - /// Boolean [in] Flag that indicates if an - /// OnProgress event is to be triggered while the web service's response is - /// being downloaded. - /// string. Last update date as a Unix date stamp converted to a - /// string. - /// EDBDownloadMgr raised if an EWebError exception is - /// encountered. - function LastUpdate(const WantProgress: Boolean = False): string; - - /// Gets the number of files on the online Code Snippets Database - /// from the web service. - /// Boolean [in] Flag that indicates if an - /// OnProgress event is to be triggered while the web service's response is - /// being downloaded. - /// Integer. Required file count. - /// EDBDownloadMgr raised if an EWebError exception is - /// encountered. - function FileCount(const WantProgress: Boolean = False): Integer; - - /// Gets a block of data containing the whole of the online Code - /// Snippets Database from the web service. - /// Boolean [in] Flag that indicates if an - /// OnProgress event is to be triggered while the web service's response is - /// being downloaded. - /// TEncodedData. The downloaded data as text in a specified - /// encoding. - /// EDBDownloadMgr raised if an EWebError exception is - /// encountered. - function GetDatabase(const WantProgress: Boolean = False): TEncodedData; - end; - -type - /// Class of exception raised by TDBDownloadMgr. - /// Contains both a full and abbreviated description of the - /// exception. The full description is in the inherited Message property and - /// the abbreviated version is in the ShortMsg property. - EDBDownloadMgr = class(EWebService) - strict private - var - /// Value of ShortMsg property. - fShortMsg: string; - public - /// Constructs a new exception instance. - /// string [in] Abbreviated exception description. - /// - /// string [in] Full exception description. - constructor Create(const ShortMsg, Msg: string); overload; - /// Constructs a new exception instance. - /// string [in] Abbreviated exception description. - /// - /// string [in] Format string for full exception - /// description. - /// array of const [in] Parameters for Fmt. - constructor CreateFmt(const ShortMsg, Fmt: string; - const Args: array of const); overload; - /// Abbreviated description of exception. - property ShortMsg: string read fShortMsg; - end; - - -implementation - - -uses - // Delphi - SysUtils, - // Project - UAppInfo, UConsts, UStrUtils, USystemInfo, Web.UCharEncodings, Web.UInfo; - - -{ - Web service notes: codesnip-updt.php v6 - ======================================= - - This web service enables CodeSnip to check if updated files are available in - on-line database and to update local database accordingly. - - The service accepts POSTed commands which must each have form: - cmd= [] - where is a list of parameters in form param-name=param-value. - - All responses from the v6 service have two parts: - + Successful responses have '0' on first line followed by optional lines of - data resulting from command. - + Error responses have +ve error code on first line and error message on 2nd - line. - - The web service expects a user agent of "DelphiDabbler-CodeSnip-Updater-v6" - and will return a 403 "Forbidden" error if this is not provided. - - Table of Commands - +----------------------------------------------------------------------------+ - |Command |Queries|Values |Response | - +-----------+-------|----------------------+---------------------------------| - |logon |cmd |"logon" |OK: Stream of news items which | - | |progid |unique id of program |is ignored | - | |version|program version number|ERROR: CSUPDT_ERR_STDPARAMS (8) | - | |os |operating system info |if required params not provided | - | |browser|version of IE browser | | - | |caller |application defined | | - | | |string | | - +-----------+-------+----------------------+---------------------------------+ - |filecount |cmd |"filecount" |OK: Integer indication number of | - | |progid |unique id of program |files in remote database | - | |version|program version number|ERROR: CSUPDT_ERR_STDPARAMS (8) | - | | | |if required params not provided | - | | | |ERROR: CSUPDT_ERR_LIST (2) if | - | | | |can't list files in database | - +-----------+-------+----------------------+---------------------------------+ - |lastupdate |cmd |"lastupdate" |OK: Unix time stamp representing | - | |progid |unique id of program |date on which online database was| - | |version|program version number|last updated | - | | | |ERROR: CSUPDT_ERR_STDPARAMS (8) | - | | | |if required params not provided | - | | | |ERROR: CSUPDT_ERR_LIST (2) if | - | | | |can't list files in database | - | | | |ERROR: CSUPDT_ERR_NOTFOUND (7) | - | | | |if can't access a file in | - | | | |database | - +-----------+-------+----------------------+---------------------------------+ - |getdatabase|cmd |"getdatabase" |OK: All files from on-line | - | |progid |unique id of program |database combined in single | - | |version|program version number|stream of data. | - | | | |ERROR: CSUPDT_ERR_STDPARAMS (8) | - | | | |if required params not provided | - | | | |ERROR: CSUPDT_ERR_LIST (2) if | - | | | |can't list files in database | - | | | |ERROR: CSUPDT_ERR_NOTFOUND (7) | - | | | |if can't access a file in | - | | | |database | - +-----------+-------+----------------------+---------------------------------+ - |logoff |cmd |"logoff" |OK: No data | - | |progid |unique id of program |ERRORS: CSUPDT_ERR_STDPARAMS (8) | | - | |version|program version number|if required params not provided | - +-----------+-------+----------------------+---------------------------------+ - If any other command (or no command) is specified then error code - CSUPDT_ERR_CMD (1) is returned. -} - - -const - // Web service info - cScriptURLTplt = 'http://%s/websvc/codesnip-updt'; - cUserAgent = 'DelphiDabbler-CodeSnip-Updater-v6'; - - -resourcestring - // Error messages - sShortHTTPError = 'HTTP Error'; - sLongHTTPError = 'The web server returned the following error: "%0:s"'; - sShortConnectionError = 'Connection Error'; - sShortTransmissionError = 'Transmission Error'; - sShortWebSvcFailure = 'Web Service Failure'; - sLongWebSvcFailure = 'The database update web service failed with the ' - + 'following error:' + EOL + '%0:s'; - sShortWebSvcError = 'Download Error'; - sLongWebSvcError = 'The database update web service returned the following ' - + 'error' + EOL + 'Error %0:d: %1:s'; - sBadFileCount = 'Web service returned an invalid value for the filecount ' - + 'command'; - - -{ TDBDownloadMgr } - -constructor TDBDownloadMgr.Create; -begin - inherited Create(TWebServiceInfo.Create(cScriptURLTplt, cUserAgent)); -end; - -function TDBDownloadMgr.FileCount(const WantProgress: Boolean): Integer; -var - Response: TStringList; // response from server -begin - Self.WantProgress := WantProgress; - Response := TStringList.Create; - try - PostStdCommand('filecount', Response); - if not TryStrToInt(StrTrim(Response.Text), Result) then - raise EWebServiceFailure.Create(sBadFileCount); - finally - Response.Free; - end; -end; - -function TDBDownloadMgr.GetDatabase(const WantProgress: Boolean): TEncodedData; -var - Response: TStringList; // response from server -begin - Self.WantProgress := WantProgress; - Response := TStringList.Create; - try - PostStdCommand('getdatabase', Response); - Result := TEncodedData.Create( - Response.Text, TWebCharEncodings.GetEncodingType(ResponseCharSet) - ); - finally - Response.Free; - end; -end; - -procedure TDBDownloadMgr.HandleException(const E: EWebError); -begin - if E is EHTTPError then - raise EDBDownloadMgr.CreateFmt( - sShortHTTPError, sLongHTTPError, [E.Message] - ); - if E is EWebConnectionError then - raise EDBDownloadMgr.Create(sShortConnectionError, E.Message); - if E is EWebTransmissionError then - raise EDBDownloadMgr.Create(sShortTransmissionError, E.Message); - if E is EWebServiceFailure then - raise EDBDownloadMgr.CreateFmt( - sShortWebSvcFailure, sLongWebSvcFailure, [E.Message] - ); - if E is EWebServiceError then - // Include web service error code in long description - raise EDBDownloadMgr.CreateFmt( - sShortWebSvcError, - sLongWebSvcError, - [(E as EWebServiceError).ErrorCode, E.Message] - ); -end; - -procedure TDBDownloadMgr.IncludeStdParams(const Params: TURIParams); -begin - Params.Add('progid', TAppInfo.ProgramKey); - Params.Add('version', TAppInfo.ProgramReleaseVersion); -end; - -function TDBDownloadMgr.LastUpdate(const WantProgress: Boolean): string; -var - Response: TStringList; // response from server -begin - Self.WantProgress := WantProgress; - Response := TStringList.Create; - try - PostStdCommand('lastupdate', Response); - Result := StrTrim(Response.Text); - finally - Response.Free; - end; -end; - -procedure TDBDownloadMgr.LogOff(const WantProgress: Boolean); -var - Response: TStringList; // response from server -begin - Self.WantProgress := WantProgress; - Response := TStringList.Create; - try - PostStdCommand('logoff', Response); // No response data expected - finally - Response.Free; - end; -end; - -procedure TDBDownloadMgr.LogOn(const Caller: string; - const WantProgress: Boolean); -var - Response: TStringList; // response from server - Params: TURIParams; // parameters to send with command -begin - Self.WantProgress := WantProgress; - Response := TStringList.Create; - try - Params := TURIParams.Create; - try - IncludeStdParams(Params); - Params.Add('os', SanitiseString(TOSInfo.Description)); - Params.Add('browser', IntToStr(TIEInfo.MajorVersion)); - Params.Add('caller', SanitiseString(Caller)); - SafePostCommand('logon', Params, Response); - finally - Params.Free; - end; - finally - Response.Free; - end; -end; - -procedure TDBDownloadMgr.PostStdCommand(const Cmd: string; - const Response: TStrings); -var - StdParams: TURIParams; -begin - StdParams := TURIParams.Create; - try - IncludeStdParams(StdParams); - SafePostCommand(Cmd, StdParams, Response); - finally - StdParams.Free; - end; -end; - -procedure TDBDownloadMgr.SafePostCommand(const Cmd: string; - const Params: TURIParams; const Response: TStrings); -begin - try - PostCommand(Cmd, Params, Response); - except - on E: EWebError do - HandleException(E); - end; -end; - -{ EDBDownloadMgr } - -constructor EDBDownloadMgr.Create(const ShortMsg, Msg: string); -begin - inherited Create(Msg); - fShortMsg := ShortMsg; -end; - -constructor EDBDownloadMgr.CreateFmt(const ShortMsg, Fmt: string; - const Args: array of const); -begin - inherited CreateFmt(Fmt, Args); - fShortMsg := ShortMsg; -end; - -end. - diff --git a/Src/Web.UStdWebService.pas b/Src/Web.UStdWebService.pas deleted file mode 100644 index 14b3a4170..000000000 --- a/Src/Web.UStdWebService.pas +++ /dev/null @@ -1,230 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a class that provides basic interaction with DelphiDabbler - * standard web services via HTTP. -} - - -unit Web.UStdWebService; - - -interface - - -uses - // Delphi - SysUtils, Classes, - // Project - UURIParams, Web.UBaseWebService; - - -type - /// Base class for web services that interact with standard - /// DelphiDabbler web services. - /// - /// Standard web services always place a numeric status code in first - /// line of the response followed by any resulting data. The status code is - /// zero for normal responses and non-zero when an error response is - /// returned. - /// This class outputs data for normal responses and generates - /// EWebServiceError exceptions for error responses, using the response data - /// as the error message. Malformed responses generate EWebServiceFailure - /// exceptions. - /// - TStdWebService = class(TBaseWebService) - strict protected - - /// Converts string S into a form that is suitable for sending to - /// the a web service. - class function SanitiseString(const S: string): string; - - /// Analyses lines of text returned from web services and extracts - /// the data component of successful responses. Exceptions are raised for - /// error responses using the returned text as the exception message. - /// - /// TStrings [in] When the method is called Response - /// must contain the lines of text received from the web service. After - /// processing the first line containing the status code is removed, - /// leaving only 0 or more lines of data. - /// EWebServiceError raised on receipt of a valid error - /// response. - /// EWebServiceFailure raised if the format of the response is - /// invalid. - procedure ProcessResponse(const Response: TStrings); - - /// Posts a command to the web service and returns the data - /// component of the response in a string list. - /// string [in] Command to be executed. - /// TURIParams [in] Parameters associated with the - /// command. - /// TStrings [in] String list set to reponse from - /// web service, stripped of the status code, where each line of the - /// response is a line of the string list. - /// EWebServiceError raised on receipt of a valid error - /// response. - /// EWebServiceFailure raised if the web service returns an - /// invalid response. - /// EWebConnectionError raised if an EIdSocketError is - /// encountered. - /// EWebTransmissionError raised if response data is garbled in - /// transmission. - /// EHTTPError raised if an EIdHTTPProtocolException exception - /// is encountered. - /// Trapped EIdException or descendant exceptions are re-raised. - /// - procedure PostCommand(const Cmd: string; const Params: TURIParams; - const Response: TStrings); - - /// Posts a query string to the web service and returns the data - /// component of the response in a string list. - /// TURIParams [in] Parameters for inclusion in query - /// string. - /// TStrings [in] String list set to reponse from - /// web service, stripped of the status code, where each line of the - /// response is a line of the string list. - /// EWebServiceError raised on receipt of a valid error - /// response. - /// EWebServiceFailure raised if the web service returns an - /// invalid response. - /// EWebConnectionError raised if an EIdSocketError is - /// encountered. - /// EWebTransmissionError raised if response data is garbled in - /// transmission. - /// EHTTPError raised if an EIdHTTPProtocolException exception - /// is encountered. - /// Trapped EIdException or descendant exceptions are re-raised. - /// - procedure PostQuery(const Query: TURIParams; const Response: TStrings); - - /// Posts raw data to the web service and returns the data - /// component of the response in a string list. - /// TStream [in] Stream containing data to be posted. - /// - /// TStrings [in] String list set to reponse from - /// web service, stripped of the status code, where each line of the - /// response is a line of the string list. - /// EWebServiceError raised on receipt of a valid error - /// response. - /// EWebServiceFailure raised if the web service returns an - /// invalid response. - /// EWebConnectionError raised if an EIdSocketError is - /// encountered. - /// EWebTransmissionError raised if response data is garbled in - /// transmission. - /// EHTTPError raised if an EIdHTTPProtocolException exception - /// is encountered. - /// Trapped EIdException or descendant exceptions are re-raised. - /// - procedure PostData(const Data: TStream; const Response: TStrings); overload; - - /// Posts raw data to the web service and returns the data - /// component of the response in a string list. - /// TBytes [in] Byte array containing data to be posted. - /// - /// TStrings [in] String list set to reponse from - /// web service, stripped of the status code, where each line of the - /// response is a line of the string list. - /// EWebServiceError raised on receipt of a valid error - /// response. - /// EWebServiceFailure raised if the web service returns an - /// invalid response. - /// EWebConnectionError raised if an EIdSocketError is - /// encountered. - /// EWebTransmissionError raised if response data is garbled in - /// transmission. - /// EHTTPError raised if an EIdHTTPProtocolException exception - /// is encountered. - /// Trapped EIdException or descendant exceptions are re-raised. - /// - procedure PostData(const Data: TBytes; const Response: TStrings); overload; - end; - - -implementation - - -uses - // Project - UStrUtils, Web.UExceptions; - - -{ TStdWebService } - -resourcestring - // Error messages - sEmptyResponse = 'Empty response received from web service'; - sBadStatusCode = 'Web service returned response with bad status code'; - sUnrecognizedError = 'Unrecognized error notified by web service'; - -procedure TStdWebService.PostCommand(const Cmd: string; - const Params: TURIParams; const Response: TStrings); -begin - Params.Add('cmd', Cmd); - PostQuery(Params, Response); -end; - -procedure TStdWebService.PostData(const Data: TBytes; const Response: TStrings); -begin - PostStrings(Data, Response); - ProcessResponse(Response); -end; - -procedure TStdWebService.PostData(const Data: TStream; - const Response: TStrings); -begin - PostStrings(Data, Response); - ProcessResponse(Response); -end; - -procedure TStdWebService.PostQuery(const Query: TURIParams; - const Response: TStrings); -begin - PostStrings(Query, Response); - ProcessResponse(Response); -end; - -procedure TStdWebService.ProcessResponse(const Response: TStrings); -var - StatusCode: Integer; // status code from response -begin - // All responses have content => empty reponse is error - if Response.Count = 0 then - raise EWebServiceFailure.Create(sEmptyResponse); - // All valid responses have status code as first line of response - if not TryStrToInt(Response[0], StatusCode) then - raise EWebServiceFailure.Create(sBadStatusCode); - // We have got status code: chop it off to leave data in Response - Response.Delete(0); - // Check status code in first line: 0 => OK, otherwise error - if StatusCode <> 0 then - begin - // Error response: raise web service error exception unless data doesn't - // contain expected error message when failure exception is raised - if StrTrim(Response.Text) = '' then - raise EWebServiceFailure.Create(sUnrecognizedError); - raise EWebServiceError.Create(StrTrim(Response.Text), StatusCode); - end -end; - -class function TStdWebService.SanitiseString(const S: string): string; -const - IllegalChars = [#$00..#$1F, #$7F]; -var - Idx: Integer; -begin - Result := S; - for Idx := 1 to Length(S) do - if CharInSet(Result[Idx], IllegalChars) then - Result[Idx] := ' '; -end; - -end. - From 91c4c067c7a05e0cee214f08fd6a7c8cb00a9f3b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 10:51:22 +0000 Subject: [PATCH 080/714] Removed background update checking & notification Background update checking relied on web services and so is redundant. The background notification system was used only by the background update checkers --- Src/FmMain.pas | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 17fb78c8c..83cb77019 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -26,7 +26,7 @@ interface // Project Favourites.UManager, FmHelpAware, FrDetail, FrOverview, FrTitled, IntfNotifier, UCompileMgr, UDialogMgr, UHistory, UMainDisplayMgr, USearch, - UStatusBarMgr, UUpdateCheckers, UWindowSettings; + UStatusBarMgr, UWindowSettings; type @@ -505,9 +505,6 @@ TMainForm = class(THelpAwareForm) fCompileMgr: TMainCompileMgr; /// Object that manages favourites. fFavouritesMgr: TFavouritesManager; - /// Object that checks for program and database updates in a - /// background thread. - fUpdateChecker: TUpdateCheckerMgr; /// Displays view item given by TViewItemAction instance /// referenced by Sender and adds to history list. @@ -575,7 +572,7 @@ implementation Windows, Graphics, // Project DB.UCategory, DB.UMain, DB.USnippet, FmSplash, FmTrappedBugReportDlg, - FmWaitDlg, IntfFrameMgrs, Notifications.UDisplayMgr, UActionFactory, UAppInfo, + FmWaitDlg, IntfFrameMgrs, UActionFactory, UAppInfo, UClassHelpers, UCodeShareMgr, UCommandBars, UConsts, UCopyInfoMgr, UCopySourceMgr, UDatabaseLoader, UDatabaseLoaderUI, UDetailTabAction, UEditSnippetAction, UExceptions, UHelpMgr, UHistoryMenus, UKeysHelper, @@ -1282,13 +1279,6 @@ procedure TMainForm.FormCreate(Sender: TObject); procedure TMainForm.FormDestroy(Sender: TObject); begin inherited; - // Stop update checking threads - fUpdateChecker.StopThreads; - fUpdateChecker.Free; - - // Stop notification display sub-system - TNotificationDisplayMgr.Stop; - // Save any changes to user database with Database as IDatabaseEdit do begin @@ -1528,13 +1518,6 @@ procedure TMainForm.InitForm; // *** Must be done AFTER database has loaded *** fFavouritesMgr := TFavouritesManager.Create(fNotifier); - // Start notification display sub-system - TNotificationDisplayMgr.Start(Self); - - // Start update checking manager - // *** Should be done after notification window listener starts - fUpdateChecker := TUpdateCheckerMgr.Create; - fUpdateChecker.StartThreads; finally // Ready to start using app: request splash form closes and enable form SplashForm.RequestClose; From 482ecd0b48862db96f24a6afc31f348b317e8558 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 11:00:21 +0000 Subject: [PATCH 081/714] Removed redundant units. All the removed units were made redundant by the removal of background update checking and the background notification. --- Src/CodeSnip.dpr | 8 - Src/CodeSnip.dproj | 8 - Src/Notifications.UData.pas | 117 ------ Src/Notifications.UDisplayMgr.pas | 114 ------ Src/Notifications.UDisplayThread.pas | 141 ------- Src/Notifications.UQueue.pas | 178 -------- Src/Notifications.URecorderThread.pas | 137 ------- Src/Notifications.UWindow.pas | 559 -------------------------- Src/UThreadGroup.pas | 212 ---------- Src/UUpdateCheckers.pas | 256 ------------ 10 files changed, 1730 deletions(-) delete mode 100644 Src/Notifications.UData.pas delete mode 100644 Src/Notifications.UDisplayMgr.pas delete mode 100644 Src/Notifications.UDisplayThread.pas delete mode 100644 Src/Notifications.UQueue.pas delete mode 100644 Src/Notifications.URecorderThread.pas delete mode 100644 Src/Notifications.UWindow.pas delete mode 100644 Src/UThreadGroup.pas delete mode 100644 Src/UUpdateCheckers.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index fbdc507c5..d6fff47a6 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -183,12 +183,6 @@ uses IntfFrameMgrs in 'IntfFrameMgrs.pas', IntfNotifier in 'IntfNotifier.pas', IntfPreview in 'IntfPreview.pas', - Notifications.UDisplayMgr in 'Notifications.UDisplayMgr.pas', - Notifications.UData in 'Notifications.UData.pas', - Notifications.UDisplayThread in 'Notifications.UDisplayThread.pas', - Notifications.UQueue in 'Notifications.UQueue.pas', - Notifications.URecorderThread in 'Notifications.URecorderThread.pas', - Notifications.UWindow in 'Notifications.UWindow.pas', SWAG.UCommon in 'SWAG.UCommon.pas', SWAG.UImporter in 'SWAG.UImporter.pas', SWAG.UReader in 'SWAG.UReader.pas', @@ -358,14 +352,12 @@ uses UTestUnitDlgMgr in 'UTestUnitDlgMgr.pas', UTextSnippetDoc in 'UTextSnippetDoc.pas', UThemesEx in 'UThemesEx.pas', - UThreadGroup in 'UThreadGroup.pas', UToolButtonEx in 'UToolButtonEx.pas', UTVCheckBoxes in 'UTVCheckBoxes.pas', UUIWidgetImages in 'UUIWidgetImages.pas', UUniqueID in 'UUniqueID.pas', UUnitAnalyser in 'UUnitAnalyser.pas', UUnitsChkListMgr in 'UUnitsChkListMgr.pas', - UUpdateCheckers in 'UUpdateCheckers.pas', UURIEncode in 'UURIEncode.pas', UURIParams in 'UURIParams.pas', UUrlMonEx in 'UUrlMonEx.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 4873b4ebe..33442f16e 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -384,12 +384,6 @@ - - - - - - @@ -559,14 +553,12 @@ - - diff --git a/Src/Notifications.UData.pas b/Src/Notifications.UData.pas deleted file mode 100644 index 6e343d00e..000000000 --- a/Src/Notifications.UData.pas +++ /dev/null @@ -1,117 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Defines a record that stores information to be displayed in a notification - * window along with a related task that can be performed from the window. -} - - -unit Notifications.UData; - - -interface - - -uses - // Delphi - SysUtils; - - -type - /// Stores information to be displayed in a notification window - /// along with a related task that can be performed from the window. - /// - /// - /// A notification always has a title and at least one paragraph of - /// content text. - /// An associated task and help keyword are optional. - /// - TNotificationData = record - strict private - var - /// Value of Title property. - fTitle: string; - /// Value of Content property. - fContent: TArray; - /// Value of HelpKeyword property. - fHelpKeyword: string; - /// Valure of TaskCallback property. - fTaskCallback: TProc; - /// Value of TaskPrompt property. - fTaskPrompt: string; - public - /// Title of notification. - property Title: string read fTitle; - - /// Notification content. - /// Each array element is a paragraph of text. - property Content: TArray read fContent; - - /// Keyword of any related help topic. - /// Set to the empty string to inhibit display of help. - property HelpKeyword: string read fHelpKeyword; - - /// Callback procedure called from notification window when user - /// clicks the task button. - /// Note that no task button will appear if this property is nil. - /// - property TaskCallback: TProc read fTaskCallback; - - /// Prompt text that appears in notification window's task button. - /// - /// This property is ignored if TaskCallback is nil. - property TaskPrompt: string read fTaskPrompt; - - /// Creates an initialised notification data record. - /// string [in] Notification title. Must be empty - /// string or contain only white space. - /// array of string [in] Paragraphs of text forming - /// content of notification. Must contain at least one element that - /// contains non-whitespace text. Empty elements or elements containing - /// only white space are ignored. - /// string [in] A-link keyword of associated - /// help topic or empty string if there is no such help topic. - /// TProc [in] Procedure to be called from - /// notification window if user clicks the task button, or nil if no - /// such button is required. - /// string [in] Prompt or caption to appear on - /// any task button. May be empty string if ATaskCallback is nil. - /// TProc [in] Procedure to be called from - /// notification window if user chooses to inhibit similar messages in - /// future, or nil if message can't be inhibited. - constructor Create(const ATitle: string; const AContent: array of string; - const AHelpKeyord: string; const ATaskCallback: TProc; - const ATaskPrompt: string); - end; - -implementation - -{ TNotificationData } - -constructor TNotificationData.Create(const ATitle: string; - const AContent: array of string; const AHelpKeyord: string; - const ATaskCallback: TProc; const ATaskPrompt: string); -var - I: Integer; -begin - Assert(ATitle <> '', 'TNotificationData.Create: ATitle = empty string'); - Assert((Length(AContent) > 0), - 'TNotificationData.Create: AContent has no elements'); - fTitle := ATitle; - SetLength(fContent, Length(AContent)); - for I := 0 to Pred(Length(AContent)) do - fContent[I] := AContent[I]; - fHelpKeyword := AHelpKeyord; - fTaskCallback := ATaskCallback; - fTaskPrompt := ATaskPrompt; -end; - -end. - diff --git a/Src/Notifications.UDisplayMgr.pas b/Src/Notifications.UDisplayMgr.pas deleted file mode 100644 index 28e4c7a4e..000000000 --- a/Src/Notifications.UDisplayMgr.pas +++ /dev/null @@ -1,114 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a static object that manages the notification display sub-system. -} - - -unit Notifications.UDisplayMgr; - - -interface - - -uses - // Delphi - Controls, - // Project - Notifications.UDisplayThread, Notifications.UWindow, UBaseObjects; - - -type - /// Static class that manages the notification display sub-system. - /// - /// This class manages the background thread that reads the - /// notification queue and displays the notifications sequentially in a - /// suitable pop-up window. - TNotificationDisplayMgr = class(TNoConstructObject) - strict private - const - /// Amount of time the notification window is displayed on - /// screen before hiding itself. - WindowDisplayTime = 20 * 1000; // 20 seconds - class var - /// Notification window object. - fWindow: TNotificationWindow; - /// Thread that reads the notification queue and displays the - /// notifications sequentially in the notification window. - /// - fDisplayThread: TNotificationDisplayThread; - public - /// Class destructor. Ensures the noification window and display - /// thread are destroyed when the program closes. - class destructor Destroy; - /// Starts the notification display sub-system. - /// TWinControl [in] Window control that is to - /// be the parent of the notification window. Must not be nil. - /// Creates a new notification window object and a linked display - /// thread. - class procedure Start(const WindowParent: TWinControl); - /// Stops the notification display sub-system. - /// The display thread and notification window are destroyed. - /// - class procedure Stop; - end; - - -implementation - - -uses - SysUtils, Classes, - // Project - Notifications.UData, Notifications.UQueue; - - -{ TNotificationDisplayMgr } - -class destructor TNotificationDisplayMgr.Destroy; -begin - Stop; -end; - -class procedure TNotificationDisplayMgr.Start(const WindowParent: TWinControl); -begin - Assert(Assigned(WindowParent), ClassName + '.Start: WindowParent is nil'); - - if Assigned(fWindow) or Assigned(fDisplayThread) then - Stop; - - fWindow := TNotificationWindow.Create(nil); - fWindow.Parent := WindowParent; - fWindow.DisplayTime := WindowDisplayTime; - - fDisplayThread := TNotificationDisplayThread.Create( - fWindow.DisplayLock, - procedure(N: TNotificationData) - begin - Assert(fWindow.State = nwsClosed, - ClassName + '.Create:AnonCallback: Window not closed'); - fWindow.SlideIn(N); - end - ); - fDisplayThread.FreeOnTerminate := False; - fDisplayThread.Priority := tpLowest; - fDisplayThread.Start; -end; - -class procedure TNotificationDisplayMgr.Stop; -begin - // FreeAndNil is necessary here - TNotificationQueue.ReleaseLocks; - FreeAndNil(fDisplayThread); - FreeAndNil(fWindow); -end; - -end. - diff --git a/Src/Notifications.UDisplayThread.pas b/Src/Notifications.UDisplayThread.pas deleted file mode 100644 index bf0dd665c..000000000 --- a/Src/Notifications.UDisplayThread.pas +++ /dev/null @@ -1,141 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a thread that pops any waiting items from notification queue and - * causes them to be displayed. -} - - -unit Notifications.UDisplayThread; - - -interface - - -uses - // Delphi - SysUtils, Classes, SyncObjs, - // Project - Notifications.UData, Notifications.UQueue; - - -type - /// Thread that pops pending notifications from the notification - /// queue and causes them to be displayed. - /// - /// This class is display agnostic. It has no knowledge of the object - /// that actually displays the notification and simply a provided callback - /// procedure to request display of a notification. - /// The thread waits for any currently displayed notification to clear - /// before displaying another notification. - /// NOTE: There should only be one instance of this thread running at - /// any time. - /// - TNotificationDisplayThread = class(TThread) - strict private - const - /// Timeout, in ms, when waiting for a notification display to - /// become available. - DisplayLockTimeout = 20000; // 20 seconds - /// Timeout, in ms, when waiting for notification queue's - /// 'empty' lock. - EmptyLockTimeout = 10000; // 10 seconds - var - /// Object that provides access to notification queue. - fQueue: TNotificationQueue; - /// Caller-provided closure used to display a notification. - /// - /// This closure is called in the context of the main thread. - /// - fDisplayProc: TProc; - /// Event object that signals when the notification display - /// object is available for use. - fDisplayLock: TSimpleEvent; - strict protected - /// Executes the main thread logic. Waits to pop a notification - /// item from the queue then causes it to be displayed. - procedure Execute; override; - public - /// Constructs a suspended thread instance. - /// TSimpleEvent [in] Lock used by notification - /// window while it is being displayed. - /// TProc<TNotificationData> Anonymous - /// method that the thread calls when it wants to display a notification. - /// - constructor Create(const DisplayLock: TSimpleEvent; - const DisplayProc: TProc); - /// Destroys the thread instance, freeing owned objects. - destructor Destroy; override; - end; - - -implementation - - -{ TNotificationDisplayThread } - -constructor TNotificationDisplayThread.Create(const DisplayLock: TSimpleEvent; - const DisplayProc: TProc); -begin - Assert(Assigned(DisplayLock), ClassName + '.Create: DisplayLock is nil'); - Assert(Assigned(DisplayProc), ClassName + '.Create: DisplayProc is nil'); - inherited Create(True); - fDisplayLock := DisplayLock; - fDisplayProc := DisplayProc; - fQueue := TNotificationQueue.Create; -end; - -destructor TNotificationDisplayThread.Destroy; -begin - fQueue.Free; - inherited; -end; - -procedure TNotificationDisplayThread.Execute; -var - NotificationData: TNotificationData; - EmptyQueueWaitResult: TWaitResult; -begin - while not Terminated do - begin - EmptyQueueWaitResult := fQueue.WaitForEmptyLock(EmptyLockTimeout); - if not (EmptyQueueWaitResult in [wrSignaled, wrTimeout]) then - Terminate; - if Terminated then - Exit; - if not fQueue.Pop(NotificationData) then - Continue; - if Terminated then - Exit; - - while not Terminated do - begin - case fDisplayLock.WaitFor(DisplayLockTimeout) of - wrSignaled: - begin - Synchronize( - procedure - begin - fDisplayProc(NotificationData); - end - ); - Break; - end; - wrTimeout: - Continue; - else - Terminate; - end; - end; - end; -end; - -end. - diff --git a/Src/Notifications.UQueue.pas b/Src/Notifications.UQueue.pas deleted file mode 100644 index 1e3d2be71..000000000 --- a/Src/Notifications.UQueue.pas +++ /dev/null @@ -1,178 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Defines a class that manages a thread safe queue of notifications that are - * awaiting display. -} - - -unit Notifications.UQueue; - - -interface - - -uses - // Delphi - SyncObjs, Generics.Collections, - // Project - Notifications.UData; - - -type - /// Manages a thread safe queue of notifications that are awaiting - /// display. - /// Notifications can be placed in the queue and removed from it by - /// different threads. - TNotificationQueue = class(TObject) - strict private - - const - /// Maximum size of queue. - MaxQueueSize = 20; - - class var - /// Queue of notifications. - fQueue: TQueue; - /// Critical section that ensures queue is accessed by only one - /// thread at a time. - fCriticalSection: TCriticalSection; - /// Event object that enables threads reading the queue to block - /// while the queue is empty. - /// NOTE: This lock is designed for use with a single reading - /// thread and is not guaranteed to work properly should more than one - /// task block on the empty queue. - fEmptyLock: TSimpleEvent; - - strict private - - /// Checks if the queue is full. - function IsFull: Boolean; inline; - - /// Checks if the queue is empty. - function IsEmpty: Boolean; inline; - - public - - /// Creates objects shared amongst all instances. - class constructor Create; - - /// Frees objects shared amongst all instances. - class destructor Destroy; - - /// Attempts to add a new notification data item onto the end of - /// the queue. - /// TNotificationData [in] Notification data to be - /// added to queue. - /// Boolean. True if data was added to the queue or False if the - /// queue was full and the data was not added. - function Push(const Value: TNotificationData): Boolean; - - /// Attempts to read and remove a notification data item from the - /// front of the queue. - /// TNotificationData [out] Receives any notification - /// data added to queue. - /// Boolean. True if data was read from the queue or False if the - /// queue was empty and no data could be read. - /// If False is returned, Value is undefined. - function Pop(out Value: TNotificationData): Boolean; - - /// Waits for the empty lock event to enter a singalled state. - /// - /// Cardinal [in] Maximum amount of time to wait. - /// - /// TWaitResult. Indicates how the wait operation finished. - /// - class function WaitForEmptyLock(Timeout: Cardinal): TWaitResult; - - /// Releases any locks on the queue. - class procedure ReleaseLocks; - end; - - -implementation - - -{ TNotificationQueue } - -class constructor TNotificationQueue.Create; -begin - fCriticalSection := TCriticalSection.Create; - fQueue := TQueue.Create; - fEmptyLock := TSimpleEvent.Create; - fEmptyLock.ResetEvent; -end; - -class destructor TNotificationQueue.Destroy; -begin - fEmptyLock.Free; - fQueue.Free; - fCriticalSection.Free; -end; - -function TNotificationQueue.IsEmpty: Boolean; -begin - Result := fQueue.Count = 0; -end; - -function TNotificationQueue.IsFull: Boolean; -begin - Result := fQueue.Count = MaxQueueSize; -end; - -function TNotificationQueue.Pop(out Value: TNotificationData): Boolean; -begin - fCriticalSection.Acquire; - try - Result := not IsEmpty; - if Result then - begin - Value := fQueue.Dequeue; - if IsEmpty then - fEmptyLock.ResetEvent; - end; - finally - fCriticalSection.Release; - end; -end; - -function TNotificationQueue.Push(const Value: TNotificationData): Boolean; -var - WasEmpty: Boolean; -begin - fCriticalSection.Acquire; - try - WasEmpty := IsEmpty; - Result := not IsFull; - if Result then - begin - fQueue.Enqueue(Value); - if WasEmpty then - fEmptyLock.SetEvent; - end; - finally - fCriticalSection.Release; - end; -end; - -class procedure TNotificationQueue.ReleaseLocks; -begin - // only the one lock! - fEmptyLock.SetEvent; -end; - -class function TNotificationQueue.WaitForEmptyLock(Timeout: Cardinal): - TWaitResult; -begin - Result := fEmptyLock.WaitFor(Timeout); -end; - -end. - diff --git a/Src/Notifications.URecorderThread.pas b/Src/Notifications.URecorderThread.pas deleted file mode 100644 index ce6625e07..000000000 --- a/Src/Notifications.URecorderThread.pas +++ /dev/null @@ -1,137 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Defines an abstract base class for threads that generate and record - * notification data in the notification queue. -} - - -unit Notifications.URecorderThread; - - -interface - - -uses - // Delphi - Classes, - // Project - Notifications.UData; - - -type - /// Abstract base class for threads that generate or receive a - /// notification that is to be recorded in the notification queue. - /// Sub-classes must override GetNotification to provide any - /// notification data record to be queued. - TNotificationRecorderThread = class abstract(TThread) - strict private - var - /// Number of milliseconds to delay start of thread's execution. - /// - fStartDelay: Cardinal; - /// Performs a busy wait for the time specified by fStartDelay. - /// - procedure DoDelay; - strict protected - /// Gets notification data to be queued. - /// TNotificationData [out] Set to required notification - /// data item. - /// Boolean. True on success or False if no notification data is - /// available. - /// N can be undefined if False is returned. - function GetNotification(out N: TNotificationData): Boolean; virtual; - abstract; - /// Stores the given notification data item in the notification - /// queue. - /// If notification can't be queued it is discarded. - procedure RecordNotification(const N: TNotificationData); - /// Gets and stores a notification in the notification queue. - /// - /// Called when thread is started. - procedure Execute; override; - public - /// Creates the and initialises the thread instance. - /// Cardinal [in] Number of milliseconds to delay - /// the start of the thread's execution. Passing 0 indicates no delay. - /// Non-zero delays are rounded up to the nearest 1/5th second. - constructor Create(StartDelay: Cardinal = 0); - end; - - -implementation - - -uses - // Delphi - Windows, - // Project - Notifications.UQueue; - - -{ TNotificationRecorderThread } - -constructor TNotificationRecorderThread.Create(StartDelay: Cardinal); -begin - inherited Create(True); - fStartDelay := StartDelay; -end; - -procedure TNotificationRecorderThread.DoDelay; -var - StartTC: Cardinal; - CurrentTC: Int64; -begin - StartTC := GetTickCount; - repeat - if Terminated then - Exit; - CurrentTC := Windows.GetTickCount; - if CurrentTC < StartTC then - CurrentTC := CurrentTC + High(Cardinal); - Sleep(200); // 1/5 second - until CurrentTC - StartTC >= fStartDelay; -end; - -procedure TNotificationRecorderThread.Execute; -var - N: TNotificationData; -begin - if fStartDelay > 0 then - DoDelay; - if Terminated then - Exit; - if not GetNotification(N) or Terminated then - Exit; - RecordNotification(N); -end; - -procedure TNotificationRecorderThread.RecordNotification( - const N: TNotificationData); -var - Queue: TNotificationQueue; -begin - Queue := TNotificationQueue.Create; - try - if Terminated then - Exit; - // Attempt to push notification data onto queue. This may fail if queue is - // full, in which case we ignore the problem and ditch the notification. - // If in future some other action needs to be taken when the queue is - // full, just test the return value of the Push method - False => queue - // full. - Queue.Push(N); // call this may block waiting for critical section - finally - Queue.Free; - end; -end; - - -end. diff --git a/Src/Notifications.UWindow.pas b/Src/Notifications.UWindow.pas deleted file mode 100644 index c5548f71b..000000000 --- a/Src/Notifications.UWindow.pas +++ /dev/null @@ -1,559 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a slide-in notification window that appears at the bottom right - * of its parent window. -} - - -unit Notifications.UWindow; - - -interface - - -uses - // Delphi - Classes, StdCtrls, ExtCtrls, Controls, Buttons, Generics.Collections, - Windows {must come before Graphics}, Graphics, Messages, SyncObjs, - // Project - Notifications.UData, UStructs; - - -type - /// VCL control that encapsulates notification window that appears - /// at the bottom right of its parent window and can be animated to slide on - /// and off screen. - TNotificationWindow = class(TCustomControl) - public - type - /// - /// Possible states of notification window. - /// - nwsOpen - window is fully open. - /// - nwsClosed - window is fully closed (hidden). - /// - nwsOpening - window is transitioning from closed to open. - /// - /// - nwsClosing - window is transitioning from open to closed. - /// - /// - TState = (nwsOpen, nwsClosed, nwsOpening, nwsClosing); - strict private - const - /// Custom window message used to indicate window has been - /// concealed (i.e. slide-out has completed). - WM_CONCEALED = WM_USER + 234; - /// Colour that defines starting point (top) of window's - /// gradient fill. - GradColour1 = clWhite; - /// Colour that defines end point (bottom) of window's gradient - /// fill. - GradColour2 = $edbc96; - /// Colour of window border. - BorderColour = $cc8888; - /// Step size used when slliding window in or out. - /// A complete move is taken to range from 0.0 to 1.0. - SlideStep = 0.02; - /// Spacing between paragraphs of text from Contents property. - /// - ParaSpacing = 4; - /// Character used for close button. - /// Character must be rendered in Marlett font. - CloseButtonChar = #$75; - /// Character used for help button. - /// Character must be rendered in Marlett font. - HelpButtonChar = #$73; - strict private - var - /// Value of DisplayLock property. - fDisplayLock: TSimpleEvent; - /// Value of State property. - fState: TState; - /// Stores the properties and tasks associated with the last - /// window displayed. - /// This record is updated by every call to the SlideIn method. - /// It is undefined until SlideIn is first called. - fNotificationData: TNotificationData; - /// Button used to close (hide) an open window. - fCloseBtn: TSpeedButton; - /// Button used to display context sensitive help. - fHelpBtn: TSpeedButton; - /// Button used to perform any task associated with current - /// notification. - fTaskBtn: TButton; - /// Displays window's title text. - fTitleLbl: TLabel; - /// Timer used to automatically close (hide) an open window - /// after a specified time. - fHideTimer: TTimer; - /// Bounding rectangle of 'light bulb' glyph in window. - /// - fGlyphBounds: TRectEx; - /// Maintains a list of labels used to display the paragraphs - /// of text from the Contents property. - fContentLblList: TObjectList; - /// 'Light bulb' glyph displayed in window. - fLightBulb: TBitmap; - - strict private - - /// Handles the custom message sent when the window has been - /// concealed after sliding off screen. - /// The window display lock event is signalled. - procedure WMConcealed(var Msg: TMessage); message WM_CONCEALED; - - /// OnClick event handler for task button. Calls any callback - /// procedure registered for the current task. - procedure TaskBtnClick(Sender: TObject); - - /// Creates labels required to display given content. - /// One label is created for each element of the given array. - /// - procedure CreateContentLabels(const AContent: TArray); - - /// Getter for DisplayTime property. - function GetDisplayTime: Cardinal; - - /// Setter for DisplayTime property. - procedure SetDisplayTime(const MS: Cardinal); - - /// Sets window property values for current notification and - /// rearranges and sizes window accordingly. - procedure UpdateWindow; - - /// Creates and initialises all the window's controls. - procedure CreateCtrls; - - /// Handles clicks on Close button by hiding (closing) window. - /// - /// Does nothing if window is not fully open. - procedure CloseBtnClickHandler(Sender: TObject); - - /// Handles clicks on Help button by displaying any help topic - /// specified by the HelpKeyword field of the current notification data - /// record. - /// Does nothing if the help keyword is the empty string. - /// - procedure HelpBtnClickHandler(Sender: TObject); - - /// Closes (hides) the window when the timer's event fires. - /// - /// The event is ignored if the window is not fully open. - /// - procedure TimerTickHandler(Sender: TObject); - - strict protected - - /// Sets this control's parent to the given control. Ensures that - /// this window is aligned at the bottom right of the parent window. - /// - procedure SetParent(AParent: TWinControl); override; - - /// Paints window background and glyph. - procedure Paint; override; - - public - - /// Creates and initialises a new component instance. - constructor Create(AOwner: TComponent); override; - - /// Destroys the current component instance. - destructor Destroy; override; - - /// Sizes and locates the window. ALeft is ignored and is always - /// set so that the window appears at the right edge of the parent window. - /// - procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; - - /// Opens (displays) the window with the content and tasks - /// specified by the given notification data records. The window slides - /// on-screen. - /// - /// Does nothing unless State = nwsClosed. - /// State = nwsOpening while window is sliding and changes to - /// nwsOpen when it is fully hidden. - /// The window display lock is closed iff State = mwsClose when the - /// method is called. - /// - procedure SlideIn(const N: TNotificationData); - - /// Closes (hides) the window by sliding it off-screen. - /// - /// Does nothing unless State = nwsOpen. - /// State = nwsClosing while window is sliding and changes to - /// nwsClosed when it is fully hidden. - /// Posts a WM_CONCEALED message when the window is fully closed. - /// - /// - procedure SlideOut; - - /// Event object used as lock when window is displayed. - /// - /// This lock is used by calling code to prevent them from - /// trying to display the window until it is closed. - property DisplayLock: TSimpleEvent read fDisplayLock; - - /// Current state of window. - /// State is always nwsClosed when the window is created, i.e. it - /// is hidden by default. - property State: TState read fState; - - /// Amount of time, in milliseconds, the notification is to be - /// displayed before being hidden automatically. - /// - /// Defaults to 10000 (10 seconds). - /// If DisplayTime is zero the notification is not hidden - /// automatically. - /// - property DisplayTime: Cardinal read GetDisplayTime write SetDisplayTime; - end; - - -implementation - - -uses - // Delphi - GraphUtil, Math, - // Project - UCtrlArranger, UFontHelper, UGraphicUtils, UHelpMgr, UUtils; - - -{ TNotificationWindow } - -procedure TNotificationWindow.CloseBtnClickHandler(Sender: TObject); -begin - SlideOut; // does nothing if State <> nwsOpen -end; - -constructor TNotificationWindow.Create(AOwner: TComponent); -resourcestring - sDefaultTitle = 'Notification'; -begin - inherited Create(AOwner); - fContentLblList := TObjectList.Create(True); - Width := 300; - Height := 150; - ControlStyle := ControlStyle - [csOpaque]; - Anchors := [akBottom, akRight]; - Color := $FFFFFF; - Visible := False; - fState := nwsClosed; - fLightBulb := TBitmap.Create; - fLightBulb.LoadFromResourceName(HInstance, 'NOTIFICATION'); - CreateCtrls; - fTitleLbl.Caption := sDefaultTitle; - fHideTimer.Interval := 10000; - fDisplayLock := TSimpleEvent.Create; - fDisplayLock.SetEvent; - UpdateWindow; -end; - -procedure TNotificationWindow.CreateContentLabels( - const AContent: TArray); -var - Para: string; - Lbl: TLabel; -begin - fContentLblList.Clear; // frees any existing labels - for Para in AContent do - begin - Lbl := TLabel.Create(nil); - Lbl.Parent := Self; - TFontHelper.SetDefaultFont(Lbl.Font); - Lbl.Caption := Para; - Lbl.AutoSize := False; - Lbl.WordWrap := True; - fContentLblList.Add(Lbl); - end; -end; - -procedure TNotificationWindow.CreateCtrls; -resourcestring - sDontShowText = 'Don''t show this notification again.'; - sHelpBtnHint = 'Help'; - sCloseBtnHint = 'Hide this window'; - - // Creates a new speed button with a character from the Marlett font as - // caption and with given OnClick event handler. - function CreateSymbolButton(Symbol: Char; ClickHandler: TNotifyEvent; - const Hint: string): - TSpeedButton; - begin - Result := TSpeedButton.Create(Self); - Result.Parent := Self; - Result.Width := 16; - Result.Height := 20; - Result.Flat := True; - Result.OnClick := ClickHandler; - Result.Font.Name := 'Marlett'; - Result.Font.Size := 9; - Result.Caption := Symbol; - Result.ShowHint := Hint <> ''; - Result.Hint := Hint; - end; - -begin - // create title label - fTitleLbl := TLabel.Create(Self); - fTitleLbl.Parent := Self; - fTitleLbl.Font.Style := [fsBold]; - fTitleLbl.Font.Size := fTitleLbl.Font.Size + 1; - fTitleLbl.AutoSize := False; - fTitleLbl.EllipsisPosition := epEndEllipsis; - TFontHelper.SetDefaultBaseFont(fTitleLbl.Font); - - // create task button with default size (width changed to suit text) - fTaskBtn := TButton.Create(Self); - fTaskBtn.Parent := Self; - fTaskBtn.Visible := False; - fTaskBtn.Enabled := False; // enabled only when window displayed - fTaskBtn.OnClick := TaskBtnClick; - - // create close button with down arrow symbol - fCloseBtn := CreateSymbolButton( - CloseButtonChar, CloseBtnClickHandler, sCloseBtnHint - ); - - // create help button with "?" symbol - fHelpBtn := CreateSymbolButton( - HelpButtonChar, HelpBtnClickHandler, sHelpBtnHint - ); - fHelpBtn.Visible := False; - - // create timer used to automatically hide window - fHideTimer := TTimer.Create(Self); - fHideTimer.Enabled := False; - fHideTimer.OnTimer := TimerTickHandler; -end; - -destructor TNotificationWindow.Destroy; -begin - fLightBulb.Free; - fContentLblList.Free; - fDisplayLock.SetEvent; - fDisplayLock.Free; - inherited; -end; - -function TNotificationWindow.GetDisplayTime: Cardinal; -begin - Result := fHideTimer.Interval; -end; - -procedure TNotificationWindow.HelpBtnClickHandler(Sender: TObject); -begin - if fNotificationData.HelpKeyword <> '' then - HelpMgr.ShowHelp(fNotificationData.HelpKeyword); -end; - -procedure TNotificationWindow.Paint; -begin - GradientFillCanvas(Canvas, GradColour1, GradColour2, ClientRect, gdVertical); - Canvas.Pen.Color := BorderColour; - Canvas.Brush.Style := bsClear; - Canvas.Rectangle(ClientRect); - Canvas.BrushCopy( - fGlyphBounds, - fLightBulb, - TRectEx.Create(0, 0, fLightBulb.Width, fLightBulb.Height), - clFuchsia - ); -end; - -procedure TNotificationWindow.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); -var - ParentBounds: TRectEx; -begin - if Assigned(Parent) then - begin - // align at bottom right of parent - ParentBounds := Parent.ClientRect; - ALeft := ParentBounds.Right - AWidth - 6; - end; - inherited SetBounds(ALeft, ATop, AWidth, AHeight); -end; - -procedure TNotificationWindow.SetDisplayTime(const MS: Cardinal); -begin - fHideTimer.Interval := MS; -end; - -procedure TNotificationWindow.SetParent(AParent: TWinControl); -begin - inherited; - SetBounds(0, 0, Width, Height); -end; - -procedure TNotificationWindow.SlideIn(const N: TNotificationData); -var - ClosedTop: Integer; - OpenedTop: Integer; - Range: Integer; - Scale: Double; -begin - if State <> nwsClosed then - Exit; - fNotificationData := N; - UpdateWindow; - fDisplayLock.ResetEvent; - fState := nwsOpening; - ClosedTop := Parent.ClientRect.Bottom + 1; - OpenedTop := Parent.ClientRect.Bottom - Height; - Range := ClosedTop - OpenedTop; - Top := ClosedTop; - Visible := True; - Scale := SlideStep; - while Scale < 1.0 - SlideStep do - begin - Top := ClosedTop - Round(Range * Scale); - Scale := Scale + SlideStep; - Pause(2); - end; - Top := OpenedTop; - fState := nwsOpen; - fTaskBtn.Enabled := True; - fHideTimer.Enabled := DisplayTime > 0; -end; - -procedure TNotificationWindow.SlideOut; -var - ClosedTop: Integer; - OpenedTop: Integer; - Range: Integer; - Scale: Double; -begin - if State <> nwsOpen then - Exit; - fHideTimer.Enabled := False; - fTaskBtn.Enabled := False; - fState := nwsClosing; - ClosedTop := Parent.ClientRect.Bottom + 1; - OpenedTop := Parent.ClientRect.Bottom - Height; - Range := ClosedTop - OpenedTop; - Top := OpenedTop; - Scale := SlideStep; - while Scale < 1.0 - SlideStep do - begin - Top := OpenedTop + Round(Range * Scale); - Scale := Scale + SlideStep; - Pause(2); - end; - Top := ClosedTop; - Visible := False; - fState := nwsClosed; - PostMessage(Handle, WM_CONCEALED, 0, 0); -end; - -procedure TNotificationWindow.TaskBtnClick(Sender: TObject); -begin - if Assigned(fNotificationData.TaskCallback) then - fNotificationData.TaskCallback(); -end; - -procedure TNotificationWindow.TimerTickHandler(Sender: TObject); -begin - fHideTimer.Enabled := False; - SlideOut; // does nothing if State <> nwsOpen -end; - -procedure TNotificationWindow.UpdateWindow; -const - MarginLR = 8; - MarginTB = 8; - CtrlVSpacing = 8; - GlyphSize = 24; - TextLeftOffset = MarginLR + GlyphSize + 8; -var - Lbl: TLabel; - NextTop: Integer; - ParaTop: Integer; - TextWidth: Integer; - TopRowHeight: Integer; -begin - // Set control content and state for current notification data - fTitleLbl.Caption := fNotificationData.Title; - CreateContentLabels(fNotificationData.Content); - if Assigned(fNotificationData.TaskCallback) then - begin - fTaskBtn.Caption := fNotificationData.TaskPrompt; - fTaskBtn.Visible := True; - end - else - begin - fTaskBtn.Caption := ''; - fTaskBtn.Visible := False; - end; - fHelpBtn.Visible := fNotificationData.HelpKeyword <> ''; - - // Find height of "top row" of controls - title and close button plus help - // button if visible: they are all centred in this row. - TCtrlArranger.SetLabelHeight(fTitleLbl); - TopRowHeight := Max(fTitleLbl.Height, fCloseBtn.Height); - if fHelpBtn.Visible then - TopRowHeight := Max(TopRowHeight, fHelpBtn.Height); - - // Locate left hand "light bulb" glyph - fGlyphBounds := TRectEx.CreateBounds( - MarginLR, MarginTB, GlyphSize, GlyphSize - ); - - // Set "close" and "help" button locations - if fHelpBtn.Visible then - begin - fHelpBtn.Left := Width - MarginLR - fHelpBtn.Width; - fHelpBtn.Top := MarginTB + (TopRowHeight - fHelpBtn.Height) div 2; - fCloseBtn.Left := fHelpBtn.Left - fCloseBtn.Width; - end - else - fCloseBtn.Left := Width - MarginLR - fCloseBtn.Width; - fCloseBtn.Top := MarginTB + (TopRowHeight - fCloseBtn.Height) div 2; - - // Set title size and location - fTitleLbl.Width := fCloseBtn.Left - 4 - TextLeftOffset; - fTitleLbl.Left := TextLeftOffset; - fTitleLbl.Top := MarginTB + (TopRowHeight - fTitleLbl.Height) div 2; - - // Get width available for text / check box in main body - TextWidth := Width - MarginLR - TextLeftOffset; - - // Create labels to display content paragraphs and locate them one below the - // other. - ParaTop := MarginTB + TopRowHeight + CtrlVSpacing; - for Lbl in fContentLblList do - begin - Lbl.Top := ParaTop; - Lbl.Left := TextLeftOffset; - Lbl.Width := TextWidth; - TCtrlArranger.SetLabelHeight(Lbl); - Inc(ParaTop, Lbl.Height + ParaSpacing); - end; - NextTop := ParaTop - ParaSpacing + CtrlVSpacing; - - // Set location and size of task button - if fTaskBtn.Visible then - begin - fTaskBtn.Left := TextLeftOffset; - fTaskBtn.Width := StringExtent(fTaskBtn.Caption, fTaskBtn.Font).cx - + 28; - fTaskBtn.Top := NextTop; - NextTop := TCtrlArranger.BottomOf(fTaskBtn, CtrlVSpacing); - end; - - // Set required window height - Height := NextTop - CtrlVSpacing + MarginTB; -end; - -procedure TNotificationWindow.WMConcealed(var Msg: TMessage); -begin - fDisplayLock.SetEvent; -end; - -end. - diff --git a/Src/UThreadGroup.pas b/Src/UThreadGroup.pas deleted file mode 100644 index 96dfd813d..000000000 --- a/Src/UThreadGroup.pas +++ /dev/null @@ -1,212 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a class that manages the lifetime of a group of thread objects. -} - - -unit UThreadGroup; - - -interface - - -uses - // Delphi - Classes, Generics.Collections; - - -type - /// Class that manages the lifetime of a group of thread objects. - /// - /// - /// There may be no more than $80 threads in a group. - /// Threads should be created suspended (not enforced). - /// Threads must not automatically free themselves on termination. Each - /// thread's FreeOnTerminate property will be set False when it is added to - /// the group. - /// - TThreadGroup = class(TObject) - public - const - /// Maximum number of threads in group. - MaxCount = $80; - strict private - var - /// List if threads. - fThreads: TList; - /// Read accessor for Threads[] property. - function GetThread(Idx: Integer): TThread; - public - /// Constructs a new empty thread group object. - constructor Create; - /// Destroys object instance. - destructor Destroy; override; - /// Adds the given thread to the group. - /// - /// Must not be called if the group is already full. - /// The thread's FreeOnTerminate property is set True. - /// - procedure Add(AThread: TThread); overload; - /// Adds each thread in the given array to the group. - /// - /// Must not be called if the number of threads in the array would - /// cause the group's capacity to be exceeded. - /// Each thread's FreeOnTerminate property is set True. - /// - procedure Add(const AThreads: array of TThread); overload; - /// Notifies all threads to terminate. - /// Simply sets each thread's Terminate property True. - procedure Terminate; - /// Starts all threads. - /// Threads are started in the order they were added. - procedure Start; - /// Sets priority of all threads in group to the given value. - /// - procedure SetPriorities(const Priority: TThreadPriority); - /// Waits for each thread to terminate, subject to a timeout. - /// - /// Cardinal [in] Timeout in ms. - /// Cardinal. Values are the same as for the Windows API - /// WaitForMultipleObjects function. In summary, values $00..$79 represent - /// success while values >= $80 are errors. - /// WaitFor must not be called when the group is empty. - function WaitFor(Timeout: Cardinal): Cardinal; - /// Signals each thread to terminate and then waits for them to - /// complete, subject to a timeout. - /// Cardinal [in] Timeout in ms. - /// Cardinal. Values are the same as for the Windows API - /// WaitForMultipleObjects function. In summary, values $00..$79 represent - /// success while values >= $80 are errors. - /// Kill must not be called when the group is empty. - function Kill(Timeout: Cardinal): Cardinal; - /// Checks if the group is empty, i.e. contains no threads. - /// - function IsEmpty: Boolean; - /// Checks if the group is full and cannot accept any more - /// threads. - function IsFull: Boolean; - /// Returns the number of threads in the group. - function Count: Integer; - /// Indexed array of threads in the group. - property Threads[Idx: Integer]: TThread read GetThread; default; - end; - - -implementation - - -uses - // Delphi - Windows; - - -{ TThreadGroup } - -procedure TThreadGroup.Add(AThread: TThread); -begin - Assert(not IsFull, ClassName + '.Add: Group is full'); - AThread.FreeOnTerminate := False; - fThreads.Add(AThread); -end; - -procedure TThreadGroup.Add(const AThreads: array of TThread); -var - Thread: TThread; -begin - Assert(Count + Length(AThreads) <= MaxCount, - ClassName + '.Add: Number of threads exceed group capacity.'); - for Thread in AThreads do - Thread.FreeOnTerminate := False; - fThreads.AddRange(AThreads); -end; - -function TThreadGroup.Count: Integer; -begin - Result := fThreads.Count; -end; - -constructor TThreadGroup.Create; -begin - inherited; - fThreads := TList.Create; -end; - -destructor TThreadGroup.Destroy; -var - Thread: TThread; -begin - for Thread in fThreads do - Thread.Free; // terminates thread cleanly - fThreads.Free; - inherited; -end; - -function TThreadGroup.GetThread(Idx: Integer): TThread; -begin - Result := fThreads[Idx]; -end; - -function TThreadGroup.IsEmpty: Boolean; -begin - Result := fThreads.Count = 0; -end; - -function TThreadGroup.IsFull: Boolean; -begin - Result := Count = MaxCount; -end; - -function TThreadGroup.Kill(Timeout: Cardinal): Cardinal; -begin - Assert(not IsEmpty, ClassName + '.Kill: Thread list empty'); - Terminate; - Result := WaitFor(Timeout); -end; - -procedure TThreadGroup.SetPriorities(const Priority: TThreadPriority); -var - Thread: TThread; -begin - for Thread in fThreads do - Thread.Priority := Priority; -end; - -procedure TThreadGroup.Start; -var - Thread: TThread; -begin - for Thread in fThreads do - Thread.Start; -end; - -procedure TThreadGroup.Terminate; -var - Thread: TThread; -begin - for Thread in fThreads do - Thread.Terminate; -end; - -function TThreadGroup.WaitFor(Timeout: Cardinal): Cardinal; -var - I: Integer; - Handles: TArray; -begin - Assert(not IsEmpty, ClassName + '.WaitFor: Thread list empty'); - SetLength(Handles, fThreads.Count); - for I := 0 to Pred(fThreads.Count) do - Handles[I] := fThreads[I].Handle; - Result := WaitForMultipleObjects( - Length(Handles), @Handles[0], True, Timeout - ); -end; - -end. diff --git a/Src/UUpdateCheckers.pas b/Src/UUpdateCheckers.pas deleted file mode 100644 index aea277fb7..000000000 --- a/Src/UUpdateCheckers.pas +++ /dev/null @@ -1,256 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2013-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements thread classes that check online to find if updates to the - * CodeSnip program or online database are available. Also implements a manager - * class for these threads. -} - - -unit UUpdateCheckers; - - -interface - - -uses - // Delphi - ExtActns, - // Project - Notifications.UData, Notifications.URecorderThread, UThreadGroup; - - -type - /// Abstract base class for threads that check for some update - /// and create a notification when an update is available that is added to - /// the notification queue. - TUpdateCheckerThread = class abstract(TNotificationRecorderThread) - strict private - /// Checks if it is OK to check for updates. - /// Result depends on user's setting and time since last update - /// check. - function CanUpdate: Boolean; - /// Records date and time of latest update check. - /// The recorded date/time is used by future calls to CanUpdate. - /// - procedure RecordUpdate; - strict protected - /// Returns the frequency of update checks, in days. - /// A return value of zero indicates that no checks should be - /// made. - function UpdateFrequency: Word; virtual; abstract; - /// Returns the name of the value in the 'UpdateChecks' settings - /// section that stores the date the last update check was made. - function LastUpdateSettingsName: string; virtual; abstract; - /// Checks to see if an update is available and, if so, creates a - /// notification record with details of how to obtain the update. - /// TNotificationData [out] The required notification - /// record if an update is available. Undefined otherwise. - /// Boolean. True if an update is available or False if not. - /// - function DoCheck(out N: TNotificationData): Boolean; virtual; abstract; - /// Finds if an update is available and creates a notification - /// containing information about it if so. - /// TNotificationData [out] If an update is available this - /// parameter contains information about the update to be added to the - /// notification queue. If no update is available this value is undefined. - /// - /// Boolean. True if an update is a available and a notification - /// record was created or False if no update is available. - /// False is also returned if an error was encountered, if - /// automatic update check is disabled or if unsufficient time has - /// ellapsed since the last check. - function GetNotification(out N: TNotificationData): Boolean; override; - end; - -type - /// Thread that checks online to find if a new version of the online - /// code snippets database is available. - /// - /// No check is made if the user has switched the automatic database - /// update checking facility off in preferences or if a check has been made - /// within the time period specified by the user. - /// - /// The thread fails silently as if no update is available if any - /// errors occur when accessing the internet or web service. - /// If an update is found a notification containing the details is - /// placed in the notification queue to await display. - /// - TDatabaseUpdateCheckerThread = class sealed(TUpdateCheckerThread) - strict protected - /// Returns the frequency of update checks, in days. - /// A return value of zero indicates that no checks should be - /// made. - function UpdateFrequency: Word; override; - /// Returns the name of the value in the 'UpdateChecks' settings - /// section that stores the date the last update check was made. - function LastUpdateSettingsName: string; override; - /// Checks to see if a database update is available and, if so, - /// creates a notification record with details of how to obtain the update. - /// - /// TNotificationData [out] The required notification - /// record if an update is available. Undefined otherwise. - /// Boolean. True if an update is available or False if not. - /// - function DoCheck(out N: TNotificationData): Boolean; override; - end; - -type - /// Manages creation and lifetime of the background threads that - /// check for and notify program and online code snippets database updates. - /// - TUpdateCheckerMgr = class(TObject) - strict private - var - /// Manages the lifetime of the update threads. - fThreads: TThreadGroup; - public - /// Creates new object instance and creates and initialises the - /// update checker threads. - /// The threads are created suspended. - constructor Create; - /// Destroys object instance and update checker threads. - /// Waits for any non-terminated threads to complete. - destructor Destroy; override; - /// Starts the update checker threads. - procedure StartThreads; - /// Signals the update checker threads to terminate. - /// Does not wait for the threads to complete. - procedure StopThreads; - end; - - -implementation - - -uses - // Delphi - SysUtils, Classes, DateUtils, - // Project - FmDBUpdateDlg, UAppInfo, UPreferences, USettings, - UDBUpdateMgr, UUtils; - - -{ TUpdateCheckerThread } - -function TUpdateCheckerThread.CanUpdate: Boolean; -var - Frequency: Word; - Storage: ISettingsSection; - LastUpdateCheck: TDateTime; -begin - Frequency := UpdateFrequency; - if Frequency = 0 then - Exit(False); - Storage := Settings.ReadSection(ssUpdateChecks); - LastUpdateCheck := Storage.GetDateTime(LastUpdateSettingsName); - Result := DaysBetween(NowGMT, LastUpdateCheck) >= Frequency; -end; - -function TUpdateCheckerThread.GetNotification(out N: TNotificationData): - Boolean; -begin - try - if not CanUpdate then - Exit(False); - Result := DoCheck(N); - RecordUpdate; - except - // Swallow any exception and return false to indicate "no update" - Result := False; - end; -end; - -procedure TUpdateCheckerThread.RecordUpdate; -var - Storage: ISettingsSection; -begin - Storage := Settings.ReadSection(ssUpdateChecks); - Storage.SetDateTime(LastUpdateSettingsName, NowGMT); - Storage.Save; -end; - -{ TDatabaseUpdateCheckerThread } - -function TDatabaseUpdateCheckerThread.DoCheck( - out N: TNotificationData): Boolean; -resourcestring - sTitle = 'Database Update Available'; - sContent1 = 'The online Code Snippets Database has been updated.'; - sContent2 = 'You can update your local copy of the database to reflect the ' - + 'changes.'; - sUpdatePrompt = 'Update Now'; -const - HelpKeyword = 'DatabaseUpdateNotification'; -var - UpdateMgr: TDBUpdateMgr; - Content: TArray; - TaskCallback: TProc; -begin - UpdateMgr := TDBUpdateMgr.Create(TAppInfo.AppDataDir, 'Auto'); - try - if UpdateMgr.CheckForUpdates in [uqUpToDate, uqError] then - Exit(False); - Content := TArray.Create(sContent1, sContent2); - TaskCallback := - procedure - begin - TDBUpdateDlg.Execute(nil); - end; - N := TNotificationData.Create( - sTitle, Content, HelpKeyword, TaskCallback, sUpdatePrompt - ); - Result := True; - finally - UpdateMgr.Free; - end -end; - -function TDatabaseUpdateCheckerThread.LastUpdateSettingsName: string; -begin - Result := 'LastDatabaseCheck'; -end; - -function TDatabaseUpdateCheckerThread.UpdateFrequency: Word; -begin - Result := Preferences.AutoCheckDatabaseFrequency; -end; - -{ TUpdateCheckerMgr } - -constructor TUpdateCheckerMgr.Create; -begin - inherited Create; - fThreads := TThreadGroup.Create; - fThreads.Add([ -// TProgramUpdateCheckerThread.Create(10000), // begins work after 10s delay - TDatabaseUpdateCheckerThread.Create(20000) // begins work after 20s delay - ]); - fThreads.SetPriorities(tpLowest); -end; - -destructor TUpdateCheckerMgr.Destroy; -begin - fThreads.Free; - inherited; -end; - -procedure TUpdateCheckerMgr.StartThreads; -begin - fThreads.Start; -end; - -procedure TUpdateCheckerMgr.StopThreads; -begin - fThreads.Terminate; -end; - -end. - From dd5a6c27df6aa4b04e1d1a1cf339fd5e9b25f44a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 11:01:46 +0000 Subject: [PATCH 082/714] Removed support for background update checking --- Src/UDBUpdateMgr.pas | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/Src/UDBUpdateMgr.pas b/Src/UDBUpdateMgr.pas index a8bdef02b..a00b33465 100644 --- a/Src/UDBUpdateMgr.pas +++ b/Src/UDBUpdateMgr.pas @@ -35,16 +35,6 @@ EDBUpdateValidationError = class(ECodeSnip); /// local directory containing required database files. TDBUpdateMgr = class(TObject) public - type - // TODO -cDBUpdate: Remove this type once dummy placeholder method removed - /// - /// Enumeration of possible result when querying if a database - /// updated is available. - /// - upUpToDate - local database is up to date. - /// - uqUpdateAvailable - a database update is available. - /// - uqError - an error occurred during the request. - /// - TUpdateQueryResult = (uqUpToDate, uqUpdateAvailable, uqError); type /// Type of event triggered to report progress when updating /// local database files. @@ -92,15 +82,6 @@ TDBUpdateMgr = class(TObject) /// unexpected error is raised. procedure Execute; - /// Queries whether updates to the local database are available. - /// - /// TDBUpdateMgr.TUpdateQueryResult value of uqUpToDate is always - /// returned. - /// This method is currently a stub left in place because it is - /// called by the redundant update checker thread that is slated for - /// removal. - function CheckForUpdates: TUpdateQueryResult; - /// Validates package of update files in given directory. /// /// EDBUpdateValidationError raised if any validation test @@ -130,13 +111,6 @@ implementation { TDBUpdateMgr } -function TDBUpdateMgr.CheckForUpdates: TUpdateQueryResult; -begin - // TODO -cDBUpdate: Remove this temporary fix once update checker thread removed - // TODO -cDBUpdate: Remove this method once above TODO is completed - Result := uqUpToDate; -end; - constructor TDBUpdateMgr.Create(const LocalDir, UpdateDir: string); begin inherited Create; From e2d8937b5e8985038e51d07c6686118dde1f7d11 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 11:11:07 +0000 Subject: [PATCH 083/714] Added new .del CSS class To be used for crossing through deleted parts of documentation prior to finalising documentation updates. --- Docs/Design/FileFormats/main.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Docs/Design/FileFormats/main.css b/Docs/Design/FileFormats/main.css index 946ec8b04..cc640cb04 100644 --- a/Docs/Design/FileFormats/main.css +++ b/Docs/Design/FileFormats/main.css @@ -165,3 +165,8 @@ acronym { font-style: italic; font-weight: bold; } + +.del { + text-decoration: line-through; + color: gray; +} From 33e66fba3f04c1bab0f01e702a7b2db8dec9bb4c Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 11:20:14 +0000 Subject: [PATCH 084/714] Removed section of welcome page dealing with automatic update checking. --- Src/Res/HTML/welcome-tplt.html | 18 ------------------ Src/UDetailPageHTML.pas | 8 -------- 2 files changed, 26 deletions(-) diff --git a/Src/Res/HTML/welcome-tplt.html b/Src/Res/HTML/welcome-tplt.html index cc8a36d04..2dce0f5bd 100644 --- a/Src/Res/HTML/welcome-tplt.html +++ b/Src/Res/HTML/welcome-tplt.html @@ -148,24 +148,6 @@

      -
      -
      - Update Checks -
      -
      - CodeSnip can check automatically for Code - Snippets database updates. Your current settings are that - Code Snippets database updates are <%DatabaseAutoCheckFrequency%>. -
      - -
      -
      Date: Sat, 22 Feb 2020 11:22:12 +0000 Subject: [PATCH 085/714] Removed Update preferences page from preferences dialogue box --- Src/CodeSnip.dpr | 1 - Src/CodeSnip.dproj | 4 - Src/FrUpdatePrefs.dfm | 38 -------- Src/FrUpdatePrefs.pas | 220 ------------------------------------------ 4 files changed, 263 deletions(-) delete mode 100644 Src/FrUpdatePrefs.dfm delete mode 100644 Src/FrUpdatePrefs.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index d6fff47a6..1691122e4 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -169,7 +169,6 @@ uses FrSourcePrefs in 'FrSourcePrefs.pas' {SourcePrefsFrame: TFrame}, FrTextPreview in 'FrTextPreview.pas' {TextPreviewFrame: TFrame}, FrTitled in 'FrTitled.pas' {TitledFrame: TFrame}, - FrUpdatePrefs in 'FrUpdatePrefs.pas' {UpdatePrefsFrame: TFrame}, Hiliter.UAttrs in 'Hiliter.UAttrs.pas', Hiliter.UCSS in 'Hiliter.UCSS.pas', Hiliter.UFileHiliter in 'Hiliter.UFileHiliter.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 33442f16e..d0558306c 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -367,10 +367,6 @@
      TitledFrame
      TFrame - -
      UpdatePrefsFrame
      - TFrame -
      diff --git a/Src/FrUpdatePrefs.dfm b/Src/FrUpdatePrefs.dfm deleted file mode 100644 index 59ec75a94..000000000 --- a/Src/FrUpdatePrefs.dfm +++ /dev/null @@ -1,38 +0,0 @@ -inherited UpdatePrefsFrame: TUpdatePrefsFrame - HelpType = htKeyword - HelpKeyword = 'UpdatePrefs' - object lblProgAutoCheckFreq: TLabel - Left = 3 - Top = 12 - Width = 135 - Height = 13 - Caption = 'Check for &program updates:' - FocusControl = cbProgAutoCheckFreq - end - object lblDBAutoCheckFreq: TLabel - Left = 3 - Top = 52 - Width = 140 - Height = 13 - Caption = 'Check for &database updates:' - FocusControl = cbDBAutoCheckFreq - end - object cbProgAutoCheckFreq: TComboBox - Left = 172 - Top = 9 - Width = 124 - Height = 21 - Style = csDropDownList - TabOrder = 0 - OnChange = CBAutoCheckFreqChanged - end - object cbDBAutoCheckFreq: TComboBox - Left = 172 - Top = 49 - Width = 124 - Height = 21 - Style = csDropDownList - TabOrder = 1 - OnChange = CBAutoCheckFreqChanged - end -end diff --git a/Src/FrUpdatePrefs.pas b/Src/FrUpdatePrefs.pas deleted file mode 100644 index d444ba2a9..000000000 --- a/Src/FrUpdatePrefs.pas +++ /dev/null @@ -1,220 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a frame to be hosted in the preferences diaogue box that permits - * the user to set their application and database update preferences. -} - -{ TODO -cWeb: Remove this frame and all associated prefs once database update - code revised not to use web service. } - -unit FrUpdatePrefs; - - -interface - - -uses - // Delphi - Classes, Controls, StdCtrls, - // Project - FrPrefsBase, UPreferences; - - -type - /// Frame that allows the user to set their application and database - /// update preferences. - /// Designed for use within the preferences dialog box. - TUpdatePrefsFrame = class(TPrefsBaseFrame) - lblProgAutoCheckFreq: TLabel; - lblDBAutoCheckFreq: TLabel; - cbProgAutoCheckFreq: TComboBox; - cbDBAutoCheckFreq: TComboBox; - /// Handles OnChange events on auto-update frequency check boxes. - /// Sets changed flag since display may need to be updated. - procedure CBAutoCheckFreqChanged(Sender: TObject); - strict private - var - /// Flag indicating if user has changed any update frequencies. - /// - fChanged: Boolean; - /// Populates the given combo box with values for each available - /// auto update check frequency. - procedure PopulateFrequencyCB(const CB: TComboBox); - /// Gets the currently selected auto-update frequency from the - /// given combo box. - function GetFrequencyFromCB(const CB: TComboBox): Word; - /// Selects the given combo box item that relates to the given - /// auto-update check frequency. - procedure SelectFrequencyInCB(const CB: TComboBox; const Freq: Word); - public - /// Constructs new frame instance and initialises controls. - /// - constructor Create(AOwner: TComponent); override; - /// Updates controls to reflect values recorded in given - /// preferences object. - /// Called when the page is activated. - procedure Activate(const Prefs: IPreferences); override; - /// Updates given preferences object from values entered in - /// controls. - /// Called when the page is deactivated. - procedure Deactivate(const Prefs: IPreferences); override; - /// Checks if preference changes require that main window UI is - /// updated. - /// Boolean. Always False. - /// Called when dialog box containing frame is closing. - function UIUpdated: Boolean; override; - /// Arranges the frame's controls. - /// Called after frame has been (re)sized. - procedure ArrangeControls; override; - /// Returns the caption that is to be displayed to identify this - /// to the user. - function DisplayName: string; override; - /// Returns a number that determines the position of this frame - /// relative to other frames in host control. - class function Index: Byte; override; - end; - - -implementation - - -uses - // Delphi - Math, - // Project - FmPreferencesDlg, UCtrlArranger, UGraphicUtils; - - -{$R *.dfm} - - -{ TUpdatePrefsFrame } - -procedure TUpdatePrefsFrame.Activate(const Prefs: IPreferences); -begin - SelectFrequencyInCB(cbProgAutoCheckFreq, Prefs.AutoCheckProgramFrequency); - SelectFrequencyInCB(cbDBAutoCheckFreq, Prefs.AutoCheckDatabaseFrequency); -end; - -procedure TUpdatePrefsFrame.ArrangeControls; -begin - TCtrlArranger.AlignLefts( - [lblProgAutoCheckFreq, lblDBAutoCheckFreq], 0 - ); - TCtrlArranger.AlignLefts( - [cbProgAutoCheckFreq, cbDBAutoCheckFreq], - Max( - StringExtent(lblProgAutoCheckFreq.Caption, lblProgAutoCheckFreq.Font).cx, - StringExtent(lblDBAutoCheckFreq.Caption, lblDBAutoCheckFreq.Font).cx - ) + 12 - ); - TCtrlArranger.AlignVCentres(0, [lblProgAutoCheckFreq, cbProgAutoCheckFreq]); - TCtrlArranger.AlignVCentres( - TCtrlArranger.BottomOf([lblProgAutoCheckFreq, cbProgAutoCheckFreq], 12), - [lblDBAutoCheckFreq, cbDBAutoCheckFreq] - ); -end; - -procedure TUpdatePrefsFrame.CBAutoCheckFreqChanged(Sender: TObject); -begin - fChanged := True; -end; - -constructor TUpdatePrefsFrame.Create(AOwner: TComponent); -begin - inherited; - PopulateFrequencyCB(cbProgAutoCheckFreq); - PopulateFrequencyCB(cbDBAutoCheckFreq); -end; - -procedure TUpdatePrefsFrame.Deactivate(const Prefs: IPreferences); -begin - if cbProgAutoCheckFreq.ItemIndex >= 0 then - Prefs.AutoCheckProgramFrequency := GetFrequencyFromCB(cbProgAutoCheckFreq); - if cbDBAutoCheckFreq.ItemIndex >= 0 then - Prefs.AutoCheckDatabaseFrequency := GetFrequencyFromCB(cbDBAutoCheckFreq); -end; - -function TUpdatePrefsFrame.DisplayName: string; -resourcestring - sDisplayName = 'Updates'; -begin - Result := sDisplayName; -end; - -function TUpdatePrefsFrame.GetFrequencyFromCB(const CB: TComboBox): Word; -begin - if CB.ItemIndex = -1 then - Exit(0); - Result := Word(CB.Items.Objects[CB.ItemIndex]); -end; - -class function TUpdatePrefsFrame.Index: Byte; -begin - Result := 60; -end; - -procedure TUpdatePrefsFrame.PopulateFrequencyCB(const CB: TComboBox); -resourcestring - s0 = 'Never'; - s1 = 'Daily'; - s3 = 'Every 3 days'; - s7 = 'Weekly'; - s14 = 'Fortnightly'; - s28 = 'Monthly'; -const - FreqMap: array[0..5] of record - Text: string; - Value: Word; - end = ( - (Text: s0; Value: 0), - (Text: s1; Value: 1), - (Text: s3; Value: 3), - (Text: s7; Value: 7), - (Text: s14; Value: 14), - (Text: s28; Value: 28) - ); -var - I: Integer; -begin - CB.Clear; - for I := Low(FreqMap) to High(FreqMap) do - CB.Items.AddObject(FreqMap[I].Text, TObject(FreqMap[I].Value)); -end; - -procedure TUpdatePrefsFrame.SelectFrequencyInCB(const CB: TComboBox; - const Freq: Word); -var - I: Integer; -begin - for I := 0 to Pred(CB.Items.Count) do - begin - if Word(CB.Items.Objects[I]) = Freq then - begin - CB.ItemIndex := I; - Exit; - end; - end; - CB.ItemIndex := -1; -end; - -function TUpdatePrefsFrame.UIUpdated: Boolean; -begin - Result := fChanged; -end; - -initialization - -// Register frame with preferences dialog box -TPreferencesDlg.RegisterPage(TUpdatePrefsFrame); - -end. - From e9793c4ed6ba90947470fb1bd3067531168334f6 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 11:22:41 +0000 Subject: [PATCH 086/714] Removed unused function. --- Src/UDetailPageHTML.pas | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/Src/UDetailPageHTML.pas b/Src/UDetailPageHTML.pas index 2d84cabd6..7fc46fb35 100644 --- a/Src/UDetailPageHTML.pas +++ b/Src/UDetailPageHTML.pas @@ -415,26 +415,6 @@ procedure TWelcomePageHTML.ResolvePlaceholders(const Tplt: THTMLTemplate); Compilers: ICompilers; Compiler: ICompiler; CompilerList: TStringBuilder; - - /// Returns the text of a statement that describes how often am - /// automatic update checked is performed. - /// Word [in] Days between checks or zero to - /// indicated that no checks are made. - /// string. Required text. - function UpdateFrequencyText(const Frequency: Word): string; - resourcestring - sNeverChecked = 'never checked'; - sCheckedEveryNDays = 'checked every %d days'; - sCheckedEveryDay = 'checked every day'; - begin - if Frequency = 0 then - Result := sNeverChecked - else if Frequency = 1 then - Result := sCheckedEveryDay - else - Result := Format(sCheckedEveryNDays, [Frequency]); - end; - begin inherited; Tplt.ResolvePlaceholderHTML( From 63a73189e0dc4542976ed8d0228be7c122dc0584 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 11:24:02 +0000 Subject: [PATCH 087/714] Removed support for auto-update preferences from config file Struck out section dealing with auto-update preferences in documentation --- Docs/Design/FileFormats/config.html | 4 ++ Src/UPreferences.pas | 94 ----------------------------- 2 files changed, 4 insertions(+), 94 deletions(-) diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index a0a9668ad..328841411 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -1301,6 +1301,8 @@

      +
      +

      [Prefs:Updating] section

      @@ -1333,6 +1335,8 @@

      +

      +

      [ProxyServer] section

      diff --git a/Src/UPreferences.pas b/Src/UPreferences.pas index 2061baad8..adb2713ed 100644 --- a/Src/UPreferences.pas +++ b/Src/UPreferences.pas @@ -251,31 +251,6 @@ interface property PageStructures: TSnippetPageStructures read GetPageStructures write SetPageStructures; - /// Gets frequency, in days, that the program should automatically - /// check for program updates. - function GetAutoCheckProgramFrequency: Word; - /// Sets frequency, in days, that the program should automatically - /// check for program updates. - procedure SetAutoCheckProgramFrequency(const Value: Word); - /// Frequency, in days, that the program should automatically - /// check for program updates. - /// A value of zero indicates that no update checking should - /// take place. - property AutoCheckProgramFrequency: Word - read GetAutoCheckProgramFrequency write SetAutoCheckProgramFrequency; - - /// Gets frequency, in days, that the program should automatically - /// check for database updates. - function GetAutoCheckDatabaseFrequency: Word; - /// Sets frequency, in days, that the program should automatically - /// check for database updates. - procedure SetAutoCheckDatabaseFrequency(const Value: Word); - /// Frequency, in days, that the program should automatically - /// check for database updates. - /// A value of zero indicates that no update checking should - /// take place. - property AutoCheckDatabaseFrequency: Word - read GetAutoCheckDatabaseFrequency write SetAutoCheckDatabaseFrequency; end; @@ -365,16 +340,6 @@ TPreferences = class(TInterfacedObject, /// Information describing snippet detail page customisations. /// fPageStructures: TSnippetPageStructures; - /// Frequency, in days, that the program should automatically - /// check for program updates. - /// A value of zero indicates that no update checking should - /// take place. - fAutoCheckProgramFrequency: Word; - /// Frequency, in days, that the program should automatically - /// check for database updates. - /// A value of zero indicates that no update checking should - /// take place. - fAutoCheckDatabaseFrequency: Word; public /// Constructs a new object instance. constructor Create; @@ -577,26 +542,6 @@ TPreferences = class(TInterfacedObject, /// Method of IPreferences. procedure SetPageStructures(PageStructures: TSnippetPageStructures); - /// Gets frequency, in days, that the program should automatically - /// check for program updates. - /// Method of IPreferences. - function GetAutoCheckProgramFrequency: Word; - - /// Sets frequency, in days, that the program should automatically - /// check for program updates. - /// Method of IPreferences. - procedure SetAutoCheckProgramFrequency(const Value: Word); - - /// Gets frequency, in days, that the program should automatically - /// check for database updates. - /// Method of IPreferences. - function GetAutoCheckDatabaseFrequency: Word; - - /// Sets frequency, in days, that the program should automatically - /// check for database updates. - /// Method of IPreferences. - procedure SetAutoCheckDatabaseFrequency(const Value: Word); - /// Assigns the properties of the given object to this object. /// /// Raises EBug if Src does not support IPreferences. @@ -625,7 +570,6 @@ TPreferencesPersist = class(TPreferences, cCodeGenerator = 'CodeGen'; cDisplay = 'Display'; cPageStructures = 'SnippetPageStructure'; - cUpdating = 'Updating'; class var /// Stores reference to singleton instance of this class. /// @@ -688,8 +632,6 @@ procedure TPreferences.Assign(const Src: IInterface); Self.SetCustomHiliteColours(SrcPref.CustomHiliteColours); Self.SetWarnings(SrcPref.Warnings); Self.SetPageStructures(SrcPref.PageStructures); - Self.fAutoCheckProgramFrequency := SrcPref.AutoCheckProgramFrequency; - Self.fAutoCheckDatabaseFrequency := SrcPref.AutoCheckDatabaseFrequency; end; constructor TPreferences.Create; @@ -711,16 +653,6 @@ destructor TPreferences.Destroy; inherited; end; -function TPreferences.GetAutoCheckDatabaseFrequency: Word; -begin - Result := fAutoCheckDatabaseFrequency; -end; - -function TPreferences.GetAutoCheckProgramFrequency: Word; -begin - Result := fAutoCheckProgramFrequency; -end; - function TPreferences.GetCustomHiliteColours: IStringList; begin Result := fHiliteCustomColours; @@ -817,16 +749,6 @@ function TPreferences.GetWarnings: IWarnings; Result := fWarnings; end; -procedure TPreferences.SetAutoCheckDatabaseFrequency(const Value: Word); -begin - fAutoCheckDatabaseFrequency := Value; -end; - -procedure TPreferences.SetAutoCheckProgramFrequency(const Value: Word); -begin - fAutoCheckProgramFrequency := Value; -end; - procedure TPreferences.SetCustomHiliteColours(const Colours: IStringList); begin fHiliteCustomColours := Colours; @@ -956,8 +878,6 @@ function TPreferencesPersist.Clone: IInterface; NewPref.CustomHiliteColours := Self.GetCustomHiliteColours; NewPref.Warnings := Self.GetWarnings; NewPref.PageStructures := Self.fPageStructures; - NewPref.AutoCheckProgramFrequency := Self.fAutoCheckProgramFrequency; - NewPref.AutoCheckDatabaseFrequency := Self.fAutoCheckDatabaseFrequency; end; constructor TPreferencesPersist.Create; @@ -1046,14 +966,6 @@ constructor TPreferencesPersist.Create; Storage := Settings.ReadSection(ssPreferences, cPageStructures); TSnippetPageStructuresPersist.Load(Storage, fPageStructures); - // Read updating section - Storage := Settings.ReadSection(ssPreferences, cUpdating); - fAutoCheckProgramFrequency := Storage.GetInteger( - 'AutoCheckProgramFrequency', 7 // checks for updates every week - ); - fAutoCheckDatabaseFrequency := Storage.GetInteger( - 'AutoCheckDatabaseFrequency', 7 // checks for updates every week - ); end; destructor TPreferencesPersist.Destroy; @@ -1127,12 +1039,6 @@ destructor TPreferencesPersist.Destroy; Storage := Settings.EmptySection(ssPreferences, cPageStructures); TSnippetPageStructuresPersist.Save(Storage, fPageStructures); - // Write updating section - Storage := Settings.EmptySection(ssPreferences, cUpdating); - Storage.SetInteger('AutoCheckProgramFrequency', fAutoCheckProgramFrequency); - Storage.SetInteger('AutoCheckDatabaseFrequency', fAutoCheckDatabaseFrequency); - Storage.Save; - inherited; end; From 1ffb14c6f5e518a25b0edfcc5e4ce7df60da333e Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 11:31:48 +0000 Subject: [PATCH 088/714] Removed unused ssUpdateChecks section. --- Src/USettings.pas | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Src/USettings.pas b/Src/USettings.pas index 46b9144d8..3805c4b07 100644 --- a/Src/USettings.pas +++ b/Src/USettings.pas @@ -173,6 +173,9 @@ interface TSettingsStorageId = (ssUser, ssCommon); type + + { TODO -cSettings: Investigate why ssApplication section no longer used. + Update below and in docs once found out. } /// /// Enumeration of recognised sections within persistent storage. /// @@ -196,7 +199,7 @@ interface TSettingsSectionId = ( ssFindText, ssFindCompiler, ssFindXRefs, ssCompilerInfo, ssApplication, ssPreferences, ssUserInfo, ssProxyServer, ssUnits, ssDuplicateSnippet, - ssFavourites, ssWindowState, ssDatabase, ssUpdateChecks + ssFavourites, ssWindowState, ssDatabase ); type @@ -561,8 +564,7 @@ function TSettingsBase.SectionStorage( ssUser, // ssDuplicateSnippet ssUser, // ssFavourites ssUser, // ssWindowState - ssUser, // ssDatabase - ssUser // ssUpdateChecks + ssUser // ssDatabase ); begin Result := cSectionStorageMap[Section]; @@ -644,8 +646,7 @@ function TIniSettings.SectionName(const Id: TSettingsSectionId; 'DuplicateSnippet', // ssDuplicateSnippet 'Favourites', // ssFavourites 'WindowState', // ssWindowState - 'Database', // ssDatabase - 'UpdateChecks' // ssUpdateChecks + 'Database' // ssDatabase ); begin Result := cSectionNames[Id]; From 3091360ae68563358d20acfc78e4f474ef1699f7 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 11:37:21 +0000 Subject: [PATCH 089/714] Struck out section dealing UpdateChecks setting in documentation --- Docs/Design/FileFormats/config.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index 328841411..eb3a52a71 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -1386,6 +1386,7 @@

      +

      [UpdateChecks] section

      @@ -1416,6 +1417,7 @@

      the Code Snippets Database had been updated. +

      [UserInfo] section From a82c9f611a25c94f9205b0808634b6f30f990867 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 22 Feb 2020 11:39:01 +0000 Subject: [PATCH 090/714] Added TODOs --- Src/CodeSnip.todo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index 407d2c514..7fa2209b4 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,3 +1,5 @@ +{TODO -cFirstRun : Delete UpdateChecks section from Config file on first run} +{TODO -cFirstRun : Delete Prefs:Updating section from Config file on first run} {TODO -cHelp : Add a Backup Database task help topis that describes how to backup and restore databases. Then add help link to Res/HTML/dlg-dbupdate-intro-tplt.html} From bcb1b5b16a3ee758e232dd406d25e59704aeae14 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 23 Feb 2020 02:15:46 +0000 Subject: [PATCH 091/714] Added TODO --- Src/UXMLDocHelper.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/UXMLDocHelper.pas b/Src/UXMLDocHelper.pas index 5235d8306..e4899bcf3 100644 --- a/Src/UXMLDocHelper.pas +++ b/Src/UXMLDocHelper.pas @@ -12,6 +12,8 @@ * documents. } +{ TODO -cRefactor: Separate out generic helper code from snippets XML file + specific code. Put generic code in super-class? } unit UXMLDocHelper; From 80aebb1dc74577bfe567b36ce418c2b66b2a5491 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 23 Feb 2020 02:16:28 +0000 Subject: [PATCH 092/714] Added new StrJoin overloaded function --- Src/UStrUtils.pas | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Src/UStrUtils.pas b/Src/UStrUtils.pas index f6f5a8151..5da7e6d36 100644 --- a/Src/UStrUtils.pas +++ b/Src/UStrUtils.pas @@ -201,7 +201,14 @@ function StrQuoteSpaced(const Str: UnicodeString; /// with each list element being separated by Delim. Empty string list elements /// are included in the output string only if AllowEmpty is True.

      function StrJoin(const SL: TStrings; const Delim: UnicodeString; - const AllowEmpty: Boolean = True): UnicodeString; + const AllowEmpty: Boolean = True): UnicodeString; overload; + +/// Joins all strings from an array of string together into a single +/// string with each array element being separated by Delim. Empty string list +/// elements are included in the output string only if AllowEmpty is True. +/// +function StrJoin(const Strs: array of string; const Delim: UnicodeString; + const AllowEmpty: Boolean = True): UnicodeString; overload; /// Splits string Str at delimiter Delim and records the components in /// List. If TrimStrs is True spaces are trimmed from each component. If @@ -504,6 +511,29 @@ function StrJoin(const SL: TStrings; const Delim: UnicodeString; end; end; +function StrJoin(const Strs: array of string; const Delim: UnicodeString; + const AllowEmpty: Boolean = True): UnicodeString; overload; +var + S: string; // each string in array + FirstItem: Boolean; // flag true until first item has been added to result +begin + Result := ''; + FirstItem := True; + for S in Strs do + begin + if (S <> '') or AllowEmpty then + begin + if FirstItem then + begin + Result := S; + FirstItem := False; + end + else + Result := Result + Delim + S; + end; + end; +end; + function StrLastDelimiterPos(const Delims, Str: UnicodeString): Integer; begin Result := SysUtils.LastDelimiter(Delims, Str); From 2b7159327b3bbc597aaab0bcf1f42246716667e3 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 23 Feb 2020 10:32:54 +0000 Subject: [PATCH 093/714] Added new StrIsEmpty routine --- Src/UStrUtils.pas | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Src/UStrUtils.pas b/Src/UStrUtils.pas index 5da7e6d36..ffaed681d 100644 --- a/Src/UStrUtils.pas +++ b/Src/UStrUtils.pas @@ -266,6 +266,12 @@ function StrBackslashEscape(const S, Escapable, Escapes: string): string; /// procedure StrArrayToStrList(const SA: array of string; const SL: TStrings); +/// Checks if the given string is the empty string. If the optional +/// IgnoreWhiteSpace parameter is True then the string is trimmed of leading +/// and trailing white space before checking +function StrIsEmpty(const S: string; const IgnoreWhiteSpace: Boolean = False): + Boolean; + implementation @@ -892,5 +898,14 @@ procedure StrArrayToStrList(const SA: array of string; const SL: TStrings); SL.Add(S); end; +function StrIsEmpty(const S: string; const IgnoreWhiteSpace: Boolean = False): + Boolean; +begin + if IgnoreWhiteSpace then + Result := StrTrim(S) = '' + else + Result := S = ''; +end; + end. From 9d391cbd0fa5002cc785a76d11384fbacc45ee3d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 23 Feb 2020 11:02:20 +0000 Subject: [PATCH 094/714] Added new TryParseSQLDateTime routine Rewrote ParseSQLDateTime in terms of TryParseSQLDateTime Tweaked some XMLDoc comments. --- Src/UUtils.pas | 73 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 20 deletions(-) diff --git a/Src/UUtils.pas b/Src/UUtils.pas index d03e337d4..a170ea649 100644 --- a/Src/UUtils.pas +++ b/Src/UUtils.pas @@ -89,11 +89,21 @@ function NowGMT: TDateTime; /// Converts a date-time value in SQL format into a TDateTime. /// -/// string [in] SQL format date-time value to be +/// string [in] SQL format date-time value to be /// converted. /// TDateTime. Converted value. /// SQLDate must be in YYYY-MM-DD hh:mm:ss format. -function ParseSQLDateTime(const SQLDate: string): TDateTime; +function ParseSQLDateTime(const SQLDateTime: string): TDateTime; + +/// Attempts to convert a date-time value in SQL format into a +/// TDateTime value. +/// string [in] SQL format date-time value to be +/// converted. +/// TDateTime [out] Set to converted date-time value if +/// conversion succeeded or undefined if coversion failed. +/// Boolean. True if conversion succeeded, False otherwise. +function TryParseSQLDateTime(const SQLDateTime: string; out Value: TDateTime): + Boolean; /// Get a desired interface pointer to an object instance. /// IInterface [in] Instance for which an interface is @@ -165,10 +175,11 @@ function IsEqualBytes(const BA1, BA2: TBytes; const Count: Cardinal): /// If both arrays are empty they are considered equal. function IsEqualBytes(const BA1, BA2: TBytes): Boolean; overload; -/// Attempts to convert a string to a Word value. -/// string [in] String to convert. -/// Word [out] Converted value. -/// Boolean. True if conversion succeeded, False otherwise. +/// Attempts to convert string S into a Word value. +/// string [in] String to be converted. +/// Cardinal [out] Value of converted string. Undefined if +/// conversion fails. +/// Boolean. True if conversion succeeds, False if not. /// String must represent a non-negative integer that is representable /// as a Word. function TryStrToWord(const S: string; out W: Word): Boolean; @@ -179,7 +190,7 @@ implementation uses // Delphi - Windows, ShlObj, ActiveX, Messages, Character, Math, + Windows, ShlObj, ActiveX, Messages, Character, Math, DateUtils, // Project UConsts, UStrUtils; @@ -318,20 +329,32 @@ function RFC1123DateStamp: string; Result := FormatDateTime(cRFC1123Pattern, NowGMT); end; -function ParseSQLDateTime(const SQLDate: string): TDateTime; +function ParseSQLDateTime(const SQLDateTime: string): TDateTime; +resourcestring + sBadDate = '"%s" is not a valid SQL DateTime'; +begin + if not TryParseSQLDateTime(SQLDateTime, Result) then + raise EConvertError.CreateFmt(sBadDate, [SQLDateTime]); +end; + +function TryParseSQLDateTime(const SQLDateStr: string; out Value: TDateTime): + Boolean; +var + Year, Month, Day, Hour, Min, Sec: Word; begin - Result := SysUtils.EncodeDate( - SysUtils.StrToInt(Copy(SQLDate, 1, 4)), - SysUtils.StrToInt(Copy(SQLDate, 6, 2)), - SysUtils.StrToInt(Copy(SQLDate, 9, 2)) - ) - + - SysUtils.EncodeTime( - SysUtils.StrToInt(Copy(SQLDate, 12, 2)), - SysUtils.StrToInt(Copy(SQLDate, 15, 2)), - SysUtils.StrToInt(Copy(SQLDate, 18, 2)), - 0 - ); + if not TryStrToWord(Copy(SQLDateTime, 1, 4), Year) then + Exit(False); + if not TryStrToWord(Copy(SQLDateTime, 6, 2), Month) then + Exit(False); + if not TryStrToWord(Copy(SQLDateTime, 9, 2), Day) then + Exit(False); + if not TryStrToWord(Copy(SQLDateTime, 12, 2), Hour) then + Exit(False); + if not TryStrToWord(Copy(SQLDateTime, 15, 2), Min) then + Exit(False); + if not TryStrToWord(Copy(SQLDateTime, 18, 2), Sec) then + Exit(False); + Result := TryEncodeDateTime(Year, Month, Day, Hour, Min, Sec, 0, Value); end; procedure GetIntf(const Instance: IInterface; const IID: TGUID; out Intf); @@ -415,6 +438,16 @@ function TryStrToCardinal(const S: string; out Value: Cardinal): Boolean; Value := Int64Rec(Value64).Lo; end; +function TryStrToWord(const S: string; out Value: Word): Boolean; +var + ValueInt: Integer; +begin + Result := TryStrToInt(S, ValueInt) + and (LongRec(ValueInt).Hi = 0); + if Result then + Value := LongRec(ValueInt).Lo; +end; + function IsEqualBytes(const BA1, BA2: TBytes; const Count: Cardinal): Boolean; var From 2f02d661f8cc22e96a53215a417496439175bace Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 23 Feb 2020 12:24:45 +0000 Subject: [PATCH 095/714] Fixed bugs introduced in previous commit --- Src/UUtils.pas | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Src/UUtils.pas b/Src/UUtils.pas index a170ea649..ed7a34077 100644 --- a/Src/UUtils.pas +++ b/Src/UUtils.pas @@ -337,7 +337,7 @@ function ParseSQLDateTime(const SQLDateTime: string): TDateTime; raise EConvertError.CreateFmt(sBadDate, [SQLDateTime]); end; -function TryParseSQLDateTime(const SQLDateStr: string; out Value: TDateTime): +function TryParseSQLDateTime(const SQLDateTime: string; out Value: TDateTime): Boolean; var Year, Month, Day, Hour, Min, Sec: Word; @@ -438,16 +438,6 @@ function TryStrToCardinal(const S: string; out Value: Cardinal): Boolean; Value := Int64Rec(Value64).Lo; end; -function TryStrToWord(const S: string; out Value: Word): Boolean; -var - ValueInt: Integer; -begin - Result := TryStrToInt(S, ValueInt) - and (LongRec(ValueInt).Hi = 0); - if Result then - Value := LongRec(ValueInt).Lo; -end; - function IsEqualBytes(const BA1, BA2: TBytes; const Count: Cardinal): Boolean; var From 62db8661f3679b8486a88c326fff9a72d8dbfe2f Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 23 Feb 2020 12:25:20 +0000 Subject: [PATCH 096/714] Added new SUB and EOF constant --- Src/UConsts.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/UConsts.pas b/Src/UConsts.pas index 49458bcd5..2cf5e7c3e 100644 --- a/Src/UConsts.pas +++ b/Src/UConsts.pas @@ -30,6 +30,7 @@ interface VTAB = #11; // vertical tab character FF = #12; // form feed character CR = #13; // carriage return character + SUB = #26; // ASCII SUB character ESC = #27; // escape character SINGLEQUOTE = ''''; // single quote character DOUBLEQUOTE = '"'; // double quote character @@ -37,6 +38,7 @@ interface CRLF = CR + LF; // carriage return followed by line feed EOL = CRLF; // end of line character sequence for Windows systems EOL2 = EOL + EOL; // 2 end of line sequences + EOF = SUB; // end of file character RT_HTML = MakeIntResource(23); // HTML resource identifier From 145f65d58f99905c863f5869346491a7545ddee4 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 24 Feb 2020 01:26:31 +0000 Subject: [PATCH 097/714] Fixed a comment --- Src/FmDBUpdateDlg.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/FmDBUpdateDlg.pas b/Src/FmDBUpdateDlg.pas index e7722f509..a67459656 100644 --- a/Src/FmDBUpdateDlg.pas +++ b/Src/FmDBUpdateDlg.pas @@ -217,7 +217,7 @@ procedure TDBUpdateDlg.ArrangeForm; frmIntro.Top := 0; frmIntro.Left := 0; - // tsFile + // tsFolder TCtrlArranger.AlignVCentres( TCtrlArranger.BottomOf(lblFolder, 6), [edPath, btnBrowse] ); From b3273e8f13db3d169bf1e11125b4ad16096bfa44 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 24 Feb 2020 17:55:06 +0000 Subject: [PATCH 098/714] Revised SWAG importing to use local data instead of web service. Local data is a folder containing a copy of the SWAG source from the delphidabbler/swag project on GitHub. It includes a main XML file and separate source files for each snippet. As few changes made as possible. A new SWAG.UXMLProcessor unit provides access to the XML file SWAG.UReader was modified to use SWAG.UXMLProcessor instead of Web.USWAGRESTMgr to get SWAG data, A new tab was added to TSWAGImportDlg where the user provides the path to the local folder containing SWAG data. The form was also modified to validate the data path and to use the modified data format. --- Src/CodeSnip.dpr | 1 + Src/CodeSnip.dproj | 1 + Src/FmSWAGImportDlg.dfm | 69 +++++- Src/FmSWAGImportDlg.pas | 199 ++++++++++++++--- Src/SWAG.UReader.pas | 320 +++++++++++++-------------- Src/SWAG.UXMLProcessor.pas | 428 +++++++++++++++++++++++++++++++++++++ 6 files changed, 821 insertions(+), 197 deletions(-) create mode 100644 Src/SWAG.UXMLProcessor.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 1691122e4..39e74a6cf 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -186,6 +186,7 @@ uses SWAG.UImporter in 'SWAG.UImporter.pas', SWAG.UReader in 'SWAG.UReader.pas', SWAG.USnippetCache in 'SWAG.USnippetCache.pas', + SWAG.UXMLProcessor in 'SWAG.UXMLProcessor.pas', UActionFactory in 'UActionFactory.pas', UAnchors in 'UAnchors.pas', UAppInfo in 'UAppInfo.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index d0558306c..c87e57b2c 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -384,6 +384,7 @@ + diff --git a/Src/FmSWAGImportDlg.dfm b/Src/FmSWAGImportDlg.dfm index 552a1be68..2a9131cdf 100644 --- a/Src/FmSWAGImportDlg.dfm +++ b/Src/FmSWAGImportDlg.dfm @@ -4,7 +4,7 @@ inherited SWAGImportDlg: TSWAGImportDlg ClientHeight = 505 ClientWidth = 687 ExplicitWidth = 693 - ExplicitHeight = 533 + ExplicitHeight = 534 PixelsPerInch = 96 TextHeight = 13 inherited pnlBody: TPanel @@ -25,6 +25,10 @@ inherited SWAGImportDlg: TSWAGImportDlg object tsIntro: TTabSheet Caption = 'tsIntro' TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 inline frmIntro: TFixedHTMLDlgFrame Left = 0 Top = 0 @@ -55,10 +59,61 @@ inherited SWAGImportDlg: TSWAGImportDlg end end end + object tsFolder: TTabSheet + Caption = 'tsFolder' + ImageIndex = 4 + TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 27 + ExplicitWidth = 0 + ExplicitHeight = 425 + object lblFolder: TLabel + Left = 0 + Top = 8 + Width = 393 + Height = 13 + Caption = + 'Enter the SWAG database download &folder: (click the button to b' + + 'rowse for folder)' + FocusControl = edPath + end + object lblFolderPageInfo: TLabel + Left = 0 + Top = 72 + Width = 270 + Height = 13 + Caption = 'Click the Next button to choose which snippets to import' + end + object edPath: TEdit + Left = 0 + Top = 28 + Width = 484 + Height = 21 + TabOrder = 0 + end + object btnBrowse: TButton + Left = 490 + Top = 28 + Width = 27 + Height = 21 + Action = actBrowse + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [fsBold] + ParentFont = False + TabOrder = 1 + end + end object tsCategories: TTabSheet Caption = 'tsCategories' ImageIndex = 1 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblCategories: TLabel Left = 0 Top = 45 @@ -131,6 +186,10 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsUpdate' ImageIndex = 2 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblUpdateDesc: TLabel Left = 0 Top = 3 @@ -173,6 +232,10 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsFinish' ImageIndex = 3 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 inline frmOutro: THTMLTpltDlgFrame Left = 0 Top = 0 @@ -218,5 +281,9 @@ inherited SWAGImportDlg: TSWAGImportDlg OnExecute = actDisplaySnippetExecute OnUpdate = actDisplaySnippetUpdate end + object actBrowse: TAction + Caption = '...' + OnExecute = actBrowseExecute + end end end diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index 92ff527c8..213b90753 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -13,6 +13,14 @@ } +{TODO -cSWAG: Add facility to elect to use swag categories } +{TODO -cSWAG: Consider removing callbacks } +{TODO -cSWAG: Consider using cutdown version on progress form for init swag and + loading multiple snippets. + Perhaps use a base class frame - TBusyBaseFrame that gets + subclassed by TBusyFrame. Can also rewrite TProgressFrame as a + subclass of TBusyBaseFrame.} + unit FmSWAGImportDlg; interface @@ -64,6 +72,12 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) actDisplayCategory: TAction; actDisplaySnippet: TAction; btnDisplaySnippet: TButton; + tsFolder: TTabSheet; + lblFolder: TLabel; + edPath: TEdit; + lblFolderPageInfo: TLabel; + btnBrowse: TButton; + actBrowse: TAction; /// Handles clicks on the check boxes next to snippets in the /// snippet selection list box by selecting and deselecting snippets for /// inclusion in the import. @@ -85,21 +99,33 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) /// list box when the user presses enter. procedure lbCategoriesKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - procedure actDisplayCategoryUpdate(Sender: TObject); + /// Executes action to display a Browse for Folders dialogue box + /// and store the chosen folder in an edit box. + procedure actBrowseExecute(Sender: TObject); + /// Executes action to display the snippets in the selected + /// category. procedure actDisplayCategoryExecute(Sender: TObject); + /// Updates enabled state of display category action. + procedure actDisplayCategoryUpdate(Sender: TObject); + /// Executes action to preview the selected snippet. procedure actDisplaySnippetExecute(Sender: TObject); + /// Updates enabled state of display snippet category. procedure actDisplaySnippetUpdate(Sender: TObject); strict private const /// Index of introductory page in wizard. cIntroPage = 0; + /// Index of SWAG database folder selection page in wizard. + /// + cChooseFolderPage = 1; /// Index of snippet selection page in wizard. - cSelectionPage = 1; + cSelectionPage = 2; /// Index of import page in wizard. - cUpdatePage = 2; + cUpdatePage = 3; /// Index of finish page in wizard. - cFinishPage = 3; + cFinishPage = 4; var + fPrevSWAGDir: string; /// Object that provides cached access to the SWAG database. /// fSWAGReader: TSWAGReader; @@ -118,33 +144,41 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) /// ID of currently selected category. /// Set to empty string if no category is selected. fCurrentCatID: string; + /// Retrieves import directory name from edit control where it is + /// entered. + function GetDirNameFromEditCtrl: string; /// Validates entries on the wizard page identified by the given /// page index. procedure ValidatePage(const PageIdx: Integer); /// Displays snippets selected for import in list view on Update /// page. procedure PopulateImportsLV; + /// Initialises SWAG database XML file for reading before + /// Selection page. + /// May display a wait dialogue box while initialising the + /// database. + procedure BeforeSelectionPage; /// Initialises Selection page by populating its list of SWAG /// categories, if necessary. - /// May display a wait dialogue box if the categories have to be - /// downloaded from the SWAG database. + /// May display a wait dialogue box while loading the categories. + /// procedure InitSelectionPage; /// Initialises Update page by retrieving all the selected /// snippets, preparing them for import and displaying them in the page's /// list view. - /// May display a wait dialogue box if any of the snippets to be - /// imported have to be downloaded from the SWAG database. + /// May display a wait dialogue box while loading the snippets. + /// procedure InitUpdatePage; - /// Gets the snippets contained is any selected category and + /// Gets the snippets contained in any selected category and /// displays them in the snippet selection list box on the Selection page. /// - /// May display a wait dialogue box if the snippets have to be - /// downloaded from the SWAG database. + /// May display a wait dialogue box while the snippets are being + /// retrieved. procedure DisplaySnippetsForCategory; /// Creates and displays a preview of the currently selected /// snippet in the Selection page's snippet selection list box. - /// May display a wait dialogue box if the selected snippet has to - /// be downloaded from the SWAG database. + /// May display a wait dialogue box while the selected snippet is + /// retrieved. procedure PreviewSelectedSnippet; /// Gets the complete information for each snippet selected for /// import and stores in the given list. @@ -207,9 +241,11 @@ implementation // Delphi Generics.Defaults, Windows, + IOUtils, // Project FmPreviewDlg, FmWaitDlg, + UBrowseForFolderDlg, UConsts, UCtrlArranger, UEncodings, @@ -224,6 +260,25 @@ implementation { TSWAGImportDlg } +procedure TSWAGImportDlg.actBrowseExecute(Sender: TObject); +var + Dlg: TBrowseForFolderDlg; // browse for folder standard dialogue box +resourcestring + sDlgTitle = 'Choose SWAG database download directory'; + sDlgHeading = 'Choose an empty directory or create a new one'; +begin + Dlg := TBrowseForFolderDlg.Create(nil); + try + Dlg.Title := sDlgTitle; + Dlg.Headline := sDlgHeading; + Dlg.MakeFolderBtnVisible := True; + if Dlg.Execute then + edPath.Text := Dlg.FolderName; + finally + Dlg.Free; + end; +end; + procedure TSWAGImportDlg.actDisplayCategoryExecute(Sender: TObject); begin DisplaySnippetsForCategory; @@ -252,6 +307,13 @@ procedure TSWAGImportDlg.ArrangeForm; // tsIntro frmIntro.Height := frmIntro.DocHeight; + // tsFolder + TCtrlArranger.AlignVCentres( + TCtrlArranger.BottomOf(lblFolder, 6), [edPath, btnBrowse] + ); + TCtrlArranger.MoveToRightOf(edPath, btnBrowse, 8); + lblFolderPageInfo.Top := TCtrlArranger.BottomOf([edPath, btnBrowse], 12); + // tsCategories lblCategoriesDesc.Width := tsCategories.ClientWidth; lblCategoriesDesc.Top := 3; @@ -285,8 +347,11 @@ procedure TSWAGImportDlg.ArrangeForm; // set required height pnlBody.ClientHeight := TCtrlArranger.MaxContainerHeight( - [tsIntro, tsCategories, tsUpdate, tsFinish] + [tsIntro, tsFolder, tsCategories, tsUpdate, tsFinish] ) + pnlBody.ClientHeight - tsFinish.Height; + pnlBody.ClientWidth := TCtrlArranger.MaxContainerWidth( + [tsIntro, tsFolder, tsCategories, tsUpdate, tsFinish] + ) + pnlBody.ClientWidth - tsIntro.Width; // re-size controls to fit height lvImports.Height := tsUpdate.ClientHeight - lvImports.Top; @@ -294,6 +359,42 @@ procedure TSWAGImportDlg.ArrangeForm; inherited; end; +procedure TSWAGImportDlg.BeforeSelectionPage; +resourcestring + sDefaultWaitMsg = 'Accessing database...'; + sWaitMsg = 'Initialising SWAG database...'; +var + WaitProc: TProc; +begin + if StrSameText(fPrevSWAGDir, GetDirNameFromEditCtrl) then + Exit; + + lbCategories.Clear; + clbSelectSnippets.Clear; + + WaitProc := procedure + begin + Application.ProcessMessages; + fPrevSWAGDir := GetDirNameFromEditCtrl; + FreeAndNil(fSWAGReader); + fSWAGReader := TSWAGReader.Create( + GetDirNameFromEditCtrl, + procedure (CallProc: TProc) + begin + WaitWrapper(Self, CallProc, sDefaultWaitMsg); + end + ); + end; + + TWaitForThreadUI.Run( // this blocks until thread completes + WaitProc, + False, + TWaitDlg.CreateAutoFree(Self, sWaitMsg), + 0, + 500 + ); +end; + procedure TSWAGImportDlg.BeginPage(const PageIdx: Integer); begin case PageIdx of @@ -423,12 +524,17 @@ class function TSWAGImportDlg.Execute(const AOwner: TComponent): Boolean; end; end; +function TSWAGImportDlg.GetDirNameFromEditCtrl: string; +begin + Result := StrTrim(edPath.Text); +end; + procedure TSWAGImportDlg.GetImportSnippets(const SnipList: TList); var SnipIDs: TList; PartialSnippet: TSWAGSnippet; resourcestring - sWaitMsg = 'Downloading Snippets From SWAG...'; + sWaitMsg = 'Retrieving snippets...'; begin SnipIDs := TList.Create; try @@ -437,6 +543,10 @@ procedure TSWAGImportDlg.GetImportSnippets(const SnipList: TList); fSWAGReader.GetCompleteSnippets( SnipIDs, SnipList, + procedure + begin + Application.ProcessMessages; + end, procedure (CallProc: TProc) begin WaitWrapper(Self, CallProc, sWaitMsg); @@ -450,12 +560,14 @@ procedure TSWAGImportDlg.GetImportSnippets(const SnipList: TList); function TSWAGImportDlg.HeadingText(const PageIdx: Integer): string; resourcestring sIntroPageHeading = 'Import snippets from SWAG'; + sFolderPage = 'Select SWAG database download folder'; sSelectionPageHeading = 'Select required snippets'; sUpdatePage = 'Ready to import'; sFinishPage = 'Import complete'; begin case PageIdx of cIntroPage: Result := sIntroPageHeading; + cChooseFolderPage: Result := sFolderPage; cSelectionPage: Result := sSelectionPageHeading; cUpdatePage: Result := sUpdatePage; cFinishPage: Result := sFinishPage; @@ -463,14 +575,28 @@ function TSWAGImportDlg.HeadingText(const PageIdx: Integer): string; end; procedure TSWAGImportDlg.InitSelectionPage; +//resourcestring +// sDefaultWaitMsg = 'Accessing SWAG database...'; var Cats: TList; Idx: Integer; begin Application.ProcessMessages; - if lbCategories.Count > 0 then + + if (lbCategories.Count > 0) then Exit; +// fPrevSWAGDir := GetDirNameFromEditCtrl; +// +// FreeAndNil(fSWAGReader); +// fSWAGReader := TSWAGReader.Create( +// GetDirNameFromEditCtrl, +// procedure (CallProc: TProc) +// begin +// WaitWrapper(Self, CallProc, sDefaultWaitMsg); +// end +// ); +// Cats := TList.Create; try fSWAGReader.GetCategories(Cats); @@ -497,7 +623,7 @@ procedure TSWAGImportDlg.InitUpdatePage; FullSnippets: TList; Snippet: TSWAGSnippet; resourcestring - sWaitMsg = 'Downloading Snippets From SWAG...'; + sWaitMsg = 'Retrieving snippets...'; begin Application.ProcessMessages; FullSnippets := TList.Create; @@ -549,12 +675,6 @@ constructor TSWAGImportDlg.InternalCreate(AOwner: TComponent); fImporter := TSWAGImporter.Create; - fSWAGReader := TSWAGReader.Create( - procedure (CallProc: TProc) - begin - WaitWrapper(Self, CallProc, sDefaultWaitMsg); - end - ); end; procedure TSWAGImportDlg.lbCategoriesDblClick(Sender: TObject); @@ -576,6 +696,7 @@ procedure TSWAGImportDlg.MoveForward(const PageIdx: Integer; try ValidatePage(PageIdx); case PageIdx of + cChooseFolderPage: BeforeSelectionPage; cUpdatePage: UpdateDatabase; end; CanMove := True; @@ -615,7 +736,7 @@ procedure TSWAGImportDlg.PreviewSelectedSnippet; SelIdx: Integer; Content: string; resourcestring - sWaitMsg = 'Downloading Snippet From SWAG...'; + sWaitMsg = 'Retrieving snippet...'; sContentTplt = 'ID: %0:d' + EOL + 'Category: "%1:s"' + EOL + 'File Name: "%2:s"' + EOL + @@ -698,15 +819,33 @@ procedure TSWAGImportDlg.UpdateDatabase; end; procedure TSWAGImportDlg.ValidatePage(const PageIdx: Integer); -resourcestring - sEmptySelection = 'You must select one or more snippets to import.'; + + procedure ValidateChooseFolderPage; + resourcestring + sNoFolder = 'Please enter the directory where you downloaded the SWAG ' + + 'database.'; + sBadFolder = 'Directory "%s" does not exist. Please specify a valid one.'; + begin + if GetDirNameFromEditCtrl = '' then + raise EDataEntry.Create(sNoFolder); + if not TDirectory.Exists(GetDirNameFromEditCtrl, False) then + raise EDataEntry.CreateFmt(sBadFolder, [GetDirNameFromEditCtrl]); + end; + + procedure ValidateSelectionPage; + resourcestring + sEmptySelection = 'You must select one or more snippets to import.'; + begin + if fSelectedSnippets.Count = 0 then + raise EDataEntry.Create(sEmptySelection); + end; + begin case PageIdx of + cChooseFolderPage: + ValidateChooseFolderPage; cSelectionPage: - begin - if fSelectedSnippets.Count = 0 then - raise EDataEntry.Create(sEmptySelection); - end; + ValidateSelectionPage; end; end; diff --git a/Src/SWAG.UReader.pas b/Src/SWAG.UReader.pas index 7621687d4..530cea462 100644 --- a/Src/SWAG.UReader.pas +++ b/Src/SWAG.UReader.pas @@ -25,13 +25,13 @@ interface // Project SWAG.UCommon, SWAG.USnippetCache, - UExceptions, - Web.USWAGRESTMgr; + SWAG.UXMLProcessor, + UExceptions; type - /// Class that provides cached access to the online SWAG database. - /// + /// Class that provides cached access to a local copy of the SWAG + /// database. /// Whenever this class needs to get data from the SWAG database it /// passes a closure back to the caller that it uses to get the required /// data. This enables the calling code to display a suitable UI while @@ -40,15 +40,15 @@ interface TSWAGReader = class(TObject) public type - /// Type of closure passed back to calling code whenever the - /// SWAG database is to be accessed. + /// Type of closure passed back to calling code whenever SWAG + /// data is begin read. /// TProc [in] Closure that calling code must call /// to perform the required database access. - TRESTCallWrapper = reference to procedure (CallProc: TProc); + TSWAGCallbackWrapper = reference to procedure (CallProc: TProc); strict private const - /// Maximum size of cache of complete snippets downloaded from - /// the SWAG database. + /// Maximum size of cache of complete snippets read from the + /// SWAG database. MaxSnippetCacheSize = 50; var /// List of all categories in the SWAG database. @@ -56,125 +56,152 @@ TSWAGReader = class(TObject) /// Map of category IDs onto the snippets that belong to the /// category. /// - /// This object is used to cache the snippets for each category to - /// avoid having to download them more than once. + /// This object is used to cache the snippets for each category, to + /// avoid having to read from the database more than once. /// Only partial information that summarises each snippet is /// stored. /// fSnippetsByCategory: TDictionary>; - /// Object that interfaces with the SWAG database REST API. - /// - fSWAGRESTMgr: TSWAGRESTMgr; - /// Default wrapper for calls to the online SWAG database. + /// Object used to interogate SWAG XML file. + fXMLProcessor: TSWAGXMLProcessor; + /// Default wrapper for calls to the local SWAG database. /// /// This wrapper is supplied in the constructor and is used /// unless a different wrapper is specified by the caller in certain /// method calls. - fDefaultCallWrapper: TRESTCallWrapper; - /// Cache of complete snippets downloaded from the SWAG - /// database. + fDefaultCallWrapper: TSWAGCallbackWrapper; + /// Cache of complete snippets read from the SWAG database. + /// fSnippetCache: TSWAGSnippetCache; - /// Handles the given exception by converting HTTP and web service - /// related exceptions into for informative ESWAGReader exceptions. - /// - /// Always raises an exception. ESWAGReader is raised if E is an - /// HTTP or web service exception. Otherwise E is re-raised. + /// Handles the given exception by converting expected exceptions + /// into ESWAGReader exceptions. + /// Always raises an exception. ESWAGReader is raised if E is + /// expected. Otherwise E is re-raised. procedure HandleException(E: Exception); - /// Downloads all categories in the SWAG database and stores their - /// data in the list Cats. - procedure DownloadCategories(const Cats: TList); - /// Downloads partial (i.e. summary) snippet information for all - /// snippets in the category with ID CatID and stores them in the list - /// SnipList. - procedure DownloadPartialSnippets(const CatID: string; - const SnipList: TList); - /// Downloads and returns all the data for the snippet with the - /// given ID. - function DownloadCompleteSnippet(const SnipID: Cardinal): TSWAGSnippet; - /// Passes a closure back to the caller that it must call when a - /// list of all categories must be downloaded from the SWAG database. + /// Gets a list of all categories from the SWAG database. /// - /// TRESTCallWrapper [in] Callback function - /// provided by caller to which the category download closure is passed. If - /// nil then the default callback function is used. + /// TSWAGCallbackWrapper [in] Callback that is + /// called and passed a closure which can retrive the required category + /// information from the database. If nil then the default callback passed + /// to the constructor is used. /// The fetched categories are cached in fCategories. - procedure FetchCategories(CallWrapper: TRESTCallWrapper); - /// Passes a closure back to the caller that it must call when a - /// the summaries of all snippets in a category is to be downloaded from - /// the SWAG database. + procedure FetchCategories(CallWrapper: TSWAGCallbackWrapper); + /// Fetches summaries of all the snippets contained in a given + /// SWAG category from the SWAG database. /// string [in] ID of category for which snippet /// summaries are required. - /// TRESTCallWrapper [in] Callback function - /// provided by caller to which the snippets download closure is passed. If - /// nil then the default callback function is used. + /// TSWAGCallbackWrapper [in] Callback that is + /// called and passed a closure which can retrive the required category + /// information from the database. If nil then the default callback passed + /// to the constructor is used. /// The fetched snippet summaries are cached in /// fSnippetsByCategory. procedure FetchPartialSnippets(const CatID: string; - CallWrapper: TRESTCallWrapper); - /// Passes a closure back to the caller that it must call when a - /// complete snippet must be downloaded from the SWAG database. + CallWrapper: TSWAGCallbackWrapper); + /// Fetches full details a snippet from the SWAG database. + /// /// Cardinal [in] ID of required snippet. - /// TRESTCallWrapper [in] Callback function - /// provided by caller to which the snippet download closure is passed. If - /// nil then the default callback function is used. - /// TSWAGSnippet. The downloaded snippet. + /// TSWAGCallbackWrapper [in] Callback that is + /// called and passed a closure which can retrive the required snippet + /// from the database. If nil then the default callback passed to the + /// constructor is used. + /// TSWAGSnippet. The retrieved snippet. function FetchCompleteSnippet(const SnippetID: Cardinal; - CallWrapper: TRESTCallWrapper): TSWAGSnippet; - /// Passes a closure back to the caller that it must call when a - /// list of all complete snippets must be downloaded from the SWAG - /// database. + CallWrapper: TSWAGCallbackWrapper): TSWAGSnippet; + /// Fetches multiple complete snippets from the SWAG database. + /// /// TList<Cardinal> [in] List of IDs of the /// required snippets. /// TList<TSWAGSnippet> [in] Receives the list - /// of downloaded snippets. - /// TRESTCallWrapper [in] Callback function - /// provided by caller to which the snippets download closure is passed. If - /// nil then the default callback function is used. + /// of retrieved snippets. + /// TSWAGCallbackWrapper [in] Callback that is + /// called and passed a closure which can retrive the required snippets + /// from the database. If nil then the default callback passed to the + /// constructor is used. + /// TProc [in] Callback procedure called between + /// reading each snippet. procedure FetchCompleteSnippets(const SnipIDs: TList; - Snippets: TList; CallWrapper: TRESTCallWrapper); + Snippets: TList; BreatherProc: TProc; + CallWrapper: TSWAGCallbackWrapper); public /// Creates a new object instance. - /// TRESTCallWrapper [in] Callback to - /// be passed a database access closure in all database operations where no - /// specific callback is provided. - constructor Create(const DefaultRESTCallWrapper: TRESTCallWrapper); + /// string [in] Directory where SWAG database is + /// located on the local system. + /// TSWAGCallbackWrapper [in] + /// Callback to be passed a database access closure in all database + /// operations where no specific callback is provided. + constructor Create(const SWAGDBDir: string; + const DefaultSWAGCallbackWrapper: TSWAGCallbackWrapper); /// Destroys object instance. destructor Destroy; override; - /// Gets all the categories in the SWAG database. + /// Gets a list of all the categories in the SWAG database. + /// /// TList<TSWAGCategory> [in] Receives the /// required list of categories. - /// TRESTCallWrapper [in] Callback that is called - /// and passed a closure which can download categories from the database. - /// If nil then the default callback passed to the constructor is used. - /// + /// TSWAGCallbackWrapper [in] Callback that is + /// called and passed a closure which can retrive the required category + /// information from the database. If nil then the default callback passed + /// to the constructor is used. /// The first time this method is called CallWrapper is called to - /// download the categories from the SWAG database. On subsequent calls + /// retrieve the categories from the SWAG database. On subsequent calls /// the categories are read from a cache and CallWrapper is not called. /// procedure GetCategories(const Cats: TList; - CallWrapper: TRESTCallWrapper = nil); - /// Gets summaries of all the snippets containing in a given - /// SWAG database category. + CallWrapper: TSWAGCallbackWrapper = nil); + /// Gets summaries of all the snippets contained in a given SWAG + /// category. /// string [in] ID of the required category. /// TList<TSWAGSnippet> [in] Receives the /// required list of snippet summaries. - /// TRESTCallWrapper [in] Callback that is called - /// and passed a closure which can download the required snippet summaries - /// from the database. If nil then the default callback passed to the - /// constructor is used. + /// TSWAGCallbackWrapper [in] Callback that is + /// called and passed a closure which can retrive the required snippet + /// summaries from the database. If nil then the default callback passed to + /// the constructor is used. /// The first time this method is called for any category - /// CallWrapper is be called to download the required snippets. On - /// subsequent calls for that category the snippets summaries are read from - /// a cache and CallWrapper is not called. + /// CallWrapper is called to retrieve the required snippets. On subsequent + /// calls for that category the snippets summaries are read from a cache + /// and CallWrapper is not called. procedure GetPartialSnippets(const CatID: string; - const Snippets: TList; CallWrapper: TRESTCallWrapper = nil); + const Snippets: TList; + CallWrapper: TSWAGCallbackWrapper = nil); + /// Gets full details a snippet from the SWAG database. + /// Cardinal [in] Unique ID of the required snippet. + /// + /// TSWAGCallbackWrapper [in] Callback that is + /// called and passed a closure which can retrive the required snippet + /// from the database. If nil then the default callback passed to the + /// constructor is used. + /// TSWAGSnippet. The required snippet. + /// The first time this method is called for any snippet + /// CallWrapper is called to retrieve the snippet. On subsequent calls for + /// calls for that snippet the snippet is read from a cache and CallWrapper + /// is not called. function GetCompleteSnippet(const ID: Cardinal; - CallWrapper: TRESTCallWrapper = nil): TSWAGSnippet; + CallWrapper: TSWAGCallbackWrapper = nil): TSWAGSnippet; + /// Gets full details of multiple snippets from the SWAG database. + /// + /// TList<Cardinal> [in] List of IDs of the + /// required snippets. + /// TList<TSWAGSnippet> [in] Receives the + /// required list of snippets. + /// TSWAGCallbackWrapper [in] Callback that is + /// called and passed a closure which can retrive the required snippets + /// from the database. If nil then the default callback passed to the + /// constructor is used. + /// TProc [in] Callback procedure called between + /// reading each snippet. + /// The first time this method is called for any category + /// CallWrapper is called to retrieve the required snippets. On subsequent + /// calls for that category the snippets are read from a cache and + /// CallWrapper is not called. procedure GetCompleteSnippets(SnipIDs: TList; - Snippets: TList; CallWrapper: TRESTCallWrapper = nil); + Snippets: TList; BreatherProc: TProc = nil; + CallWrapper: TSWAGCallbackWrapper = nil); end; + type + /// Class of exception raised by TSWAGReader. ESWAGReader = class(ECodeSnip); @@ -182,6 +209,9 @@ implementation uses + // VCL + XMLDom, + XMLIntf, // Project UComparers, UConsts, @@ -190,66 +220,31 @@ implementation { TSWAGReader } -constructor TSWAGReader.Create( - const DefaultRESTCallWrapper: TRESTCallWrapper); +constructor TSWAGReader.Create(const SWAGDBDir: string; + const DefaultSWAGCallbackWrapper: TSWAGCallbackWrapper); begin inherited Create; - fDefaultCallWrapper := DefaultRESTCallWrapper; + fDefaultCallWrapper := DefaultSWAGCallbackWrapper; fCategories := TList.Create; fSnippetsByCategory := TObjectDictionary>.Create( [doOwnsValues], TStringEqualityComparer.Create ); fSnippetCache := TSWAGSnippetCache.Create(MaxSnippetCacheSize); - fSWAGRESTMgr := TSWAGRESTMgr.Create; + fXMLProcessor := TSWAGXMLProcessor.Create; + fXMLProcessor.Initialise(SWAGDBDir); end; destructor TSWAGReader.Destroy; begin - fSWAGRESTMgr.Free; + fXMLProcessor.Free; fSnippetCache.Free; fSnippetsByCategory.Free; fCategories.Free; inherited; end; -procedure TSWAGReader.DownloadCategories(const Cats: TList); -begin - try - fSWAGRESTMgr.GetCategories(Cats); - except - HandleException(ExceptObject as Exception); - end; -end; - -function TSWAGReader.DownloadCompleteSnippet(const SnipID: Cardinal): - TSWAGSnippet; -begin - try - fSWAGRESTMgr.GetSnippet( - SnipID, - [ - 'id', 'category', 'file_name', 'datestamp', 'title', 'author', - 'source_code', 'is_document' - ], - Result - ); - except - HandleException(ExceptObject as Exception); - end; -end; - -procedure TSWAGReader.DownloadPartialSnippets(const CatID: string; - const SnipList: TList); -begin - try - fSWAGRESTMgr.GetSnippets(CatID, ['id', 'title'], SnipList); - except - HandleException(ExceptObject as Exception); - end; -end; - -procedure TSWAGReader.FetchCategories(CallWrapper: TRESTCallWrapper); +procedure TSWAGReader.FetchCategories(CallWrapper: TSWAGCallbackWrapper); begin fCategories.Clear; if not Assigned(CallWrapper) then @@ -261,7 +256,7 @@ procedure TSWAGReader.FetchCategories(CallWrapper: TRESTCallWrapper); begin CatList := TList.Create; try - DownloadCategories(CatList); + fXMLProcessor.GetCategories(CatList); fCategories.AddRange(CatList); finally CatList.Free; @@ -271,7 +266,7 @@ procedure TSWAGReader.FetchCategories(CallWrapper: TRESTCallWrapper); end; function TSWAGReader.FetchCompleteSnippet(const SnippetID: Cardinal; - CallWrapper: TRESTCallWrapper): TSWAGSnippet; + CallWrapper: TSWAGCallbackWrapper): TSWAGSnippet; var Snippet: TSWAGSnippet; begin @@ -280,14 +275,16 @@ function TSWAGReader.FetchCompleteSnippet(const SnippetID: Cardinal; CallWrapper( procedure begin - Snippet := DownloadCompleteSnippet(SnippetID); + Snippet := fXMLProcessor.GetSnippet(SnippetID); end ); Result := Snippet; end; procedure TSWAGReader.FetchCompleteSnippets(const SnipIDs: TList; - Snippets: TList; CallWrapper: TRESTCallWrapper); + Snippets: TList; + BreatherProc: TProc; + CallWrapper: TSWAGCallbackWrapper); begin if not Assigned(CallWrapper) then CallWrapper := fDefaultCallWrapper; @@ -297,17 +294,19 @@ procedure TSWAGReader.FetchCompleteSnippets(const SnipIDs: TList; SnipID: Cardinal; Snippet: TSWAGSnippet; begin + BreatherProc; for SnipID in SnipIDs do begin - Snippet := DownloadCompleteSnippet(SnipID); + Snippet := fXMLProcessor.GetSnippet(SnipID); Snippets.Add(Snippet); + BreatherProc; end; end ); end; procedure TSWAGReader.FetchPartialSnippets(const CatID: string; - CallWrapper: TRESTCallWrapper); + CallWrapper: TSWAGCallbackWrapper); begin if not Assigned(CallWrapper) then CallWrapper := fDefaultCallWrapper; @@ -317,22 +316,27 @@ procedure TSWAGReader.FetchPartialSnippets(const CatID: string; SnipList: TList; begin SnipList := TList.Create; - DownloadPartialSnippets(CatID, SnipList); + fXMLProcessor.GetPartialSnippets(CatID, SnipList); fSnippetsByCategory.Add(CatID, SnipList); end ); end; procedure TSWAGReader.GetCategories(const Cats: TList; - CallWrapper: TRESTCallWrapper); + CallWrapper: TSWAGCallbackWrapper); begin if fCategories.Count = 0 then - FetchCategories(CallWrapper); + try + FetchCategories(CallWrapper); + except + on E: Exception do + HandleException(E); + end; Cats.AddRange(fCategories); end; function TSWAGReader.GetCompleteSnippet(const ID: Cardinal; - CallWrapper: TRESTCallWrapper): TSWAGSnippet; + CallWrapper: TSWAGCallbackWrapper): TSWAGSnippet; begin if not fSnippetCache.Retrieve(ID, Result) then begin @@ -342,10 +346,11 @@ function TSWAGReader.GetCompleteSnippet(const ID: Cardinal; end; procedure TSWAGReader.GetCompleteSnippets(SnipIDs: TList; - Snippets: TList; CallWrapper: TRESTCallWrapper); + Snippets: TList; BreatherProc: TProc; + CallWrapper: TSWAGCallbackWrapper); var RemoteSnippetIDs: TList; - DownloadedSnippets: TList; + FetchedSnippets: TList; Snippet: TSWAGSnippet; SnipID: Cardinal; begin @@ -360,18 +365,20 @@ procedure TSWAGReader.GetCompleteSnippets(SnipIDs: TList; end; if RemoteSnippetIDs.Count > 0 then begin - DownloadedSnippets := TList.Create; + FetchedSnippets := TList.Create; try + if not Assigned(BreatherProc) then + BreatherProc := procedure begin end; FetchCompleteSnippets( - RemoteSnippetIDs, DownloadedSnippets, CallWrapper + RemoteSnippetIDs, FetchedSnippets, BreatherProc, CallWrapper ); - for Snippet in DownloadedSnippets do + for Snippet in FetchedSnippets do begin fSnippetCache.Add(Snippet); Snippets.Add(Snippet); end; finally - DownloadedSnippets.Free; + FetchedSnippets.Free; end; end; finally @@ -380,7 +387,7 @@ procedure TSWAGReader.GetCompleteSnippets(SnipIDs: TList; end; procedure TSWAGReader.GetPartialSnippets(const CatID: string; - const Snippets: TList; CallWrapper: TRESTCallWrapper); + const Snippets: TList; CallWrapper: TSWAGCallbackWrapper); begin if not fSnippetsByCategory.ContainsKey(CatID) then FetchPartialSnippets(CatID, CallWrapper); @@ -388,30 +395,11 @@ procedure TSWAGReader.GetPartialSnippets(const CatID: string; end; procedure TSWAGReader.HandleException(E: Exception); -resourcestring - sHTTPError = 'The SWAG web server returned the following error:' - + EOL2 - + '%s'; - sWebTransmissionError = 'The data received from the SWAG web service was ' - + 'corrupt'; - sWebServiceFailure = 'The following error was detected in the response ' - + 'received from the SWAG web service:' - + EOL2 - + '%s'; - sWebServiceError = 'The SWAG web service reported the following error:' - + EOL2 - + '%s'; begin - if E is EHTTPError then - raise ESWAGReader.CreateFmt(sHTTPError, [E.Message]); - if E is EWebConnectionError then + if E is EXMLDocError then + raise ESWAGReader.Create(E); + if E is EDOMParseError then raise ESWAGReader.Create(E); - if E is EWebTransmissionError then - raise ESWAGReader.Create(sWebTransmissionError); - if E is EWebServiceFailure then - raise ESWAGReader.CreateFmt(sWebServiceFailure, [E.Message]); - if E is EWebServiceError then - raise ESWAGReader.CreateFmt(sWebServiceError, [E.Message]); raise E; end; diff --git a/Src/SWAG.UXMLProcessor.pas b/Src/SWAG.UXMLProcessor.pas new file mode 100644 index 000000000..12a2520bc --- /dev/null +++ b/Src/SWAG.UXMLProcessor.pas @@ -0,0 +1,428 @@ +{ + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/ + * + * Copyright (C) 2020, Peter Johnson (www.delphidabbler.com). + * + * Implements a class that interfaces with a local copy of the DelphiDabbler + * version of the SWAG databases to get snippet and category information. +} + + +unit SWAG.UXMLProcessor; + + +interface + + +uses + // VCL + Generics.Collections, + // Project + SWAG.UCommon, + UXMLDocHelper, + UXMLDocumentEx; + + +type + + /// Class that interfaces with a local copy of the DelphiDabbler + /// version of the SWAG databases to get snippet and category information. + /// + /// The database meta data is stored in an XML file and source code + /// is stored in text files. + TSWAGXMLProcessor = class(TObject) + strict private + const + // Name of SWAG XML file + cSWAGXMLFile = 'swag.xml'; + // Supported DelphiDabbler SWAG versions on GitHub + cSupportedSWAGVersion = 1; + // XML nodes and attributes used in DelphiDabbler master SWAG file on + // GitHub + cSWAGRootNode = 'swag'; + cRootVersionAttr = 'version'; + cCategoriesNode = 'categories'; + cCategoryNode = 'category'; + cCategoryIDAttr = 'id'; + cCategoryTitleNode = 'title'; + cSnippetsNode = 'snippets'; + cSnippetNode = 'snippet'; + cSnippetIDAttr = 'id'; + cSnippetCatIdNode = 'category-id'; + cSnippetFileNameNode = 'file-name'; + cSnippetDateNode = 'date'; + cSnippetAuthorNode = 'author'; + cSnippetIsDocumentNode = 'is-document'; + cSnippetTitleNode = 'title'; + var + /// Object used to access and search SWAG XML meta data file. + /// + fXMLDoc: IXMLDocumentEx; + /// Directory storing downloaded SWAG files. + fSWAGRootDir: string; + /// Converts an array of tags into a path suitable for use with + /// IXMLDocumentEx.FindNode. + class function NodePath(const Tags: array of string): string; + /// Validates XML document as a valid DelphiDabbler SWAG XML + /// document. + /// ESWAGXMLProcessor raised if document fails validation. + /// + procedure ValidateXMLDoc; + /// Validates fields of given snippet record as read from XML and + /// source code files. + /// TSWAGSnippet [in] Snippet record to be validated. + /// + /// ESWAGXMLProcessor raised if snippet fails validation. + /// + procedure ValidateSnippet(const Snippet: TSWAGSnippet); + /// Validates fields of given partial snippet record as read from + /// XML. + /// TSWAGSnippet [in] Snippet record to be validated. + /// + /// ESWAGXMLProcessor raised if snippet fails validation. + /// + procedure ValidatePartialSnippet(const Snippet: TSWAGSnippet); + /// Gets source code for a snippet from file and stores it in the + /// snippet record. + /// TSWAGSnippet [in/out] Snippet for which source + /// code is required. Snippet is updated with required source code. + /// ESWAGXMLProcessor raised if snippet source code can't be + /// loaded. + procedure GetSnippetSourceCode(var Snippet: TSWAGSnippet); + public + /// Constructor that sets up object ready to to process XML. + /// + constructor Create; + /// Tears down object. + destructor Destroy; override; + /// Initialises processor to read database data from the given + /// directory. + /// Must be called before any other methods. + procedure Initialise(const SWAGDirName: string); + /// Gets a list of all categories from the SWAG XML file. + /// + /// TList<TSWAGCategory> [in] Receives required + /// list of categories. + /// ESWAGXMLProcessor raised if categories can't be read or are + /// invalid. + procedure GetCategories(CatList: TList); + /// Gets partial information about all snippets belonging to a + /// category from the SWAG XML file. + /// string [in] ID of category for which snippets are + /// required. + /// TList<TSWAGSnippet> [in] Receives list + /// of snippets read. + /// ESWAGXMLProcessor raised if partial snippets can't be read + /// or are invalid. + procedure GetPartialSnippets(const CatID: string; + SnippetList: TList); + /// Gets a single snippet from the SWAG XML file. + /// Cardinal [in] Unique ID of the required + /// snippet. + /// TSWAGSnippet. Details of the required snippet. + /// ESWAGXMLProcessor raised if snippet can't be read or is + /// invalid. + function GetSnippet(const SnippetID: Cardinal): TSWAGSnippet; + + end; + + /// Class of exception raised when expected errors are found in + /// methods of TSWAGXMLProcessor. + ESWAGXMLProcessor = class(ECodeSnipXML); + + +implementation + + +uses + // VCL + SysUtils, + Classes, + IOUtils, + ActiveX, + XMLIntf, + Math, + DateUtils, + // Project + UConsts, + UIOUtils, + UStrUtils, + UUtils; + + +{ TSWAGXMLProcessor } + +constructor TSWAGXMLProcessor.Create; +begin + inherited Create; + OleInitialize(nil); +end; + +destructor TSWAGXMLProcessor.Destroy; +begin + if Assigned(fXMLDoc) then + fXMLDoc.Active := False; + fXMLDoc := nil; + OleUninitialize; + inherited; +end; + +procedure TSWAGXMLProcessor.GetCategories(CatList: TList); +var + CategoriesNode: IXMLNode; + CategoryNodes: IXMLSimpleNodeList; + CategoryNode: IXMLNode; + Category: TSWAGCategory; +resourcestring + sMissingNode = 'Invalid SWAG XML file: no categories information found'; + sMissingID = 'Invalid SWAG XML file: missing category ID'; + sMissingTitle = 'Invalid SWAG XML file: missing title for category "%s"'; +begin + CategoriesNode := fXMLDoc.FindNode( + NodePath([cSWAGRootNode, cCategoriesNode]) + ); + if not Assigned(CategoriesNode) then + raise ESWAGXMLProcessor.CreateFmt(sMissingNode, [cCategoriesNode]); + CategoryNodes := fXMLDoc.FindChildNodes(CategoriesNode, cCategoryNode); + for CategoryNode in CategoryNodes do + begin + Category.ID := CategoryNode.Attributes[cCategoryIDAttr]; + if StrIsEmpty(Category.ID, True) then + raise ESWAGXMLProcessor.Create(sMissingID); + Category.Title := TXMLDocHelper.GetSubTagText( + fXMLDoc, CategoryNode, cCategoryTitleNode + ); + if StrIsEmpty(Category.Title, True) then + raise ESWAGXMLProcessor.CreateFmt(sMissingTitle, [Category.ID]); + CatList.Add(Category); + end; +end; + +procedure TSWAGXMLProcessor.GetPartialSnippets(const CatID: string; + SnippetList: TList); +var + AllSnippetsNode: IXMLNode; + SnippetNodes: IXMLSimpleNodeList; + SnippetNode: IXMLNode; + Snippet: TSWAGSnippet; + SnippetID: Integer; +resourcestring + sSnippetsNodeMissing = 'Invalid SWAG XML file: no snippet information found'; + sBadSourceID = 'Invalid SWAG XML file: invalid snippet ID encountered'; +begin + AllSnippetsNode := fXMLDoc.FindNode(NodePath([cSWAGRootNode, cSnippetsNode])); + if not Assigned(AllSnippetsNode) then + raise ESWAGXMLProcessor.Create(sSnippetsNodeMissing); + SnippetNodes := fXMLDoc.FindChildNodes(AllSnippetsNode, cSnippetNode); + if not Assigned(SnippetNodes) then + Exit; + for SnippetNode in SnippetNodes do + begin + if StrSameText( + TXMLDocHelper.GetSubTagText(fXMLDoc, SnippetNode, cSnippetCatIdNode), + CatID + ) then + begin + if not TryStrToInt(SnippetNode.Attributes[cSnippetIDAttr], SnippetID) then + raise ESWAGXMLProcessor.Create(sBadSourceID); + Snippet.ID := SnippetID; + Snippet.Title := TXMLDocHelper.GetSubTagText( + fXMLDoc, SnippetNode, cSnippetTitleNode + ); + ValidatePartialSnippet(Snippet); + SnippetList.Add(Snippet); + end; + end; +end; + +function TSWAGXMLProcessor.GetSnippet(const SnippetID: Cardinal): TSWAGSnippet; +var + AllSnippetsNode: IXMLNode; + SnippetNode: IXMLNode; + DateStr: string; +resourcestring + sSnippetsNodeMissing = 'Invalid SWAG XML file: no snippet information found'; + sSnippetNotFound = 'Invalid SWAG XML file: snippet with ID %d not found'; +begin + // Find required snippet node + AllSnippetsNode := fXMLDoc.FindNode(NodePath([cSWAGRootNode, cSnippetsNode])); + if not Assigned(AllSnippetsNode) then + raise ESWAGXMLProcessor.Create(sSnippetsNodeMissing); + SnippetNode := fXMLDoc.FindFirstChildNode( + AllSnippetsNode, cSnippetNode, cSnippetIDAttr, SnippetID + ); + if not Assigned(SnippetNode) then + raise ESWAGXMLProcessor.CreateFmt(sSnippetNotFound, [SnippetID]); + // Get snippet info from snippet node + Result.ID := SnippetID; + Result.Category := TXMLDocHelper.GetSubTagText( + fXMLDoc, SnippetNode, cSnippetCatIdNode + ); + Result.FileName := TXMLDocHelper.GetSubTagText( + fXMLDoc, SnippetNode, cSnippetFileNameNode + ); + DateStr := TXMLDocHelper.GetSubTagText( + fXMLDoc, SnippetNode, cSnippetDateNode + ); + if not TryParseSQLDateTime(DateStr, Result.DateStamp) then + Result.DateStamp := 0.0; + Result.Title := TXMLDocHelper.GetSubTagText( + fXMLDoc, SnippetNode, cSnippetTitleNode + ); + Result.Author := TXMLDocHelper.GetSubTagText( + fXMLDoc, SnippetNode, cSnippetAuthorNode + ); + Result.IsDocument := StrSameText( + TXMLDocHelper.GetSubTagText(fXMLDoc, SnippetNode, cSnippetIsDocumentNode), + '1' + ); + GetSnippetSourceCode(Result); + ValidateSnippet(Result); +end; + +procedure TSWAGXMLProcessor.GetSnippetSourceCode(var Snippet: TSWAGSnippet); +var + FilePath: string; + Code: string; +resourcestring + sSourceCodeNotFound = 'Invalid SWAG database: ' + + 'source code file for snippet %d not found'; +begin + Assert(Snippet.ID > 0, ClassName + '.GetSnippetSourceCode: ' + + 'Snippet.ID not set'); + Assert(not StrIsEmpty(Snippet.Category), + ClassName + '.GetSnippetSourceCode: Snippet.Category not set'); + Assert(not StrIsEmpty(Snippet.FileName), + ClassName + '.GetSnippetSourceCode: Snippet.FileName not set'); + FilePath := StrJoin( + [fSWAGRootDir, Snippet.Category, Snippet.FileName], PathDelim + ); + if not TFile.Exists(FilePath, False) then + raise ESWAGXMLProcessor.CreateFmt(sSourceCodeNotFound, [Snippet.ID]); + Code := TFileIO.ReadAllText(FilePath, TEncoding.Default); + // Some if not all the source code files end in the EOF (SUB) character + if (Length(Code) > 0) and (Code[Length(Code)] = EOF) then + Code := StrSliceLeft(Code, Length(Code) - 1); + Snippet.SourceCode := Code; +end; + +procedure TSWAGXMLProcessor.Initialise(const SWAGDirName: string); +resourcestring + sFileReadError = 'Can''t read SWAG database file "%0:s"' + EOL2 + + 'Reported error is: "%1:s"'; + sXMLReadError = 'Error parsing XML in "%0:s"' + EOL2 + + 'Reported error is: "%1:s"'; +var + Content: TBytes; + XMLFilePath: string; +begin + fSWAGRootDir := ExcludeTrailingPathDelimiter(SWAGDirName); + XMLFilePath := fSWAGRootDir + PathDelim + cSWAGXMLFile; + try + Content := TFileIO.ReadAllBytes(XMLFilePath); + except + on E: EStreamError do + raise ESWAGXMLProcessor.CreateFmt( + sFileReadError, [XMLFilePath, E.Message] + ); + else + raise; + end; + if Assigned(fXMLDoc) then + fXMLDoc.Active := False; + fXMLDoc := TXMLDocHelper.CreateXMLDoc; + try + fXMLDoc.LoadFromBytes(Content); + fXMLDoc.Active := True; + except + on E: Exception do + raise ESWAGXMLProcessor.CreateFmt( + sXMLReadError, [XMLFilePath, E.Message] + ); + end; + ValidateXMLDoc; +end; + +class function TSWAGXMLProcessor.NodePath(const Tags: array of string): string; +begin + Result := StrJoin(Tags, '\', False); +end; + +procedure TSWAGXMLProcessor.ValidatePartialSnippet(const Snippet: TSWAGSnippet); +resourcestring + sBadID = 'Invalid SWAG XML file: snippet ID not set'; + sBadTitle = 'Invalid SWAG XML file: snippet %d has no title'; +begin + if Snippet.ID < 1 then + raise ESWAGXMLProcessor.Create(sBadID); + if StrIsEmpty(Snippet.Title, True) then + raise ESWAGXMLProcessor.CreateFmt(sBadTitle, [Snippet.ID]); +end; + +procedure TSWAGXMLProcessor.ValidateSnippet(const Snippet: TSWAGSnippet); +resourcestring + sBadCatID = 'Invalid SWAG XML file: snippet %d has no category'; + sBadFileName = 'Invalid SWAG XML file: snippet %d has no file name'; + sBadDateStamp = 'Invalid SWAG XML file: snippet %d has no date stamp'; + sBadAuthor = 'Invalid SWAG XML file: snippet %d has no author'; + sBadSourceCode = 'Invalid SWAG XML file: snippet %d has no source code'; +begin + ValidatePartialSnippet(Snippet); + if StrIsEmpty(Snippet.Category, True) then + raise ESWAGXMLProcessor.CreateFmt(sBadCatID, [Snippet.ID]); + if StrIsEmpty(Snippet.FileName, True) then + raise ESWAGXMLProcessor.CreateFmt(sBadFileName, [Snippet.ID]); + if DateUtils.SameDateTime(Snippet.DateStamp, 0.0) then + raise ESWAGXMLProcessor.CreateFmt(sBadDateStamp, [Snippet.ID]); + if StrIsEmpty(Snippet.Author, True) then + raise ESWAGXMLProcessor.CreateFmt(sBadAuthor, [Snippet.ID]); + if StrIsEmpty(Snippet.SourceCode, True) then + raise ESWAGXMLProcessor.CreateFmt(sBadSourceCode, [Snippet.ID]); +end; + +procedure TSWAGXMLProcessor.ValidateXMLDoc; +var + RootNode, CategoriesNode, SourcesNode: IXMLNode; + VersionStr: string; + Version: Integer; +resourcestring + // Error messages + sNoRootNode = 'Invalid SWAG XML file: no root element present'; + sBadRootName = 'Invalid SWAG XML file: root element must be named <%s>'; + sBadVersion = 'Invalid SWAG XML file: invalid version attribute of <%s>'; + sUnknownVersion = 'Invalid SWAG XML file: unsupported document version %d'; + sMissingNode = 'Invalid SWAG XML file: no <%s> node present'; +begin + // Check for valid processing instruction + TXMLDocHelper.ValidateProcessingInstr(fXMLDoc); + + // Check for valid root node + RootNode := fXMLDoc.DocumentElement; + if not Assigned(RootNode) then + raise ESWAGXMLProcessor.Create(sNoRootNode); + if RootNode.NodeName <> cSWAGRootNode then + raise ESWAGXMLProcessor.CreateFmt(sBadRootName, [cSWAGRootNode]); + VersionStr := RootNode.Attributes[cRootVersionAttr]; + if not TryStrToInt(VersionStr, Version) then + raise ESWAGXMLProcessor.CreateFmt(sBadVersion, [cSWAGRootNode]); + if Version <> cSupportedSWAGVersion then + raise ESWAGXMLProcessor.CreateFmt(sUnknownVersion, [Version]); + + // Check for compulsory node + CategoriesNode := fXMLDoc.FindNode( + NodePath([cSWAGRootNode, cCategoriesNode]) + ); + if not Assigned(CategoriesNode) then + raise ESWAGXMLProcessor.CreateFmt(sMissingNode, [cCategoriesNode]); + + // Check for compulsory node + SourcesNode := fXMLDoc.FindNode( + NodePath([cSWAGRootNode, cSnippetsNode]) + ); + if not Assigned(SourcesNode) then + raise ESWAGXMLProcessor.CreateFmt(sMissingNode, [cSnippetsNode]); +end; + +end. From 6c11f291b89806c19a051925aeaedf1d322dd84a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 24 Feb 2020 19:55:41 +0000 Subject: [PATCH 099/714] Removed reference to unused unit --- Src/SWAG.UReader.pas | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Src/SWAG.UReader.pas b/Src/SWAG.UReader.pas index 530cea462..5936a8d57 100644 --- a/Src/SWAG.UReader.pas +++ b/Src/SWAG.UReader.pas @@ -214,8 +214,7 @@ implementation XMLIntf, // Project UComparers, - UConsts, - Web.UExceptions; + UConsts; { TSWAGReader } From bcd72b47cd368174cdb8c44f9a210658182d5071 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 24 Feb 2020 19:57:04 +0000 Subject: [PATCH 100/714] Removed unused unit Unit made redundant by recent changes to how SWAG database is accessed. --- Src/CodeSnip.dpr | 3 +- Src/CodeSnip.dproj | 1 - Src/Web.USWAGRESTMgr.pas | 668 --------------------------------------- 3 files changed, 1 insertion(+), 671 deletions(-) delete mode 100644 Src/Web.USWAGRESTMgr.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 39e74a6cf..9c08f44ec 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -385,8 +385,7 @@ uses Web.UDownloadMonitor in 'Web.UDownloadMonitor.pas', Web.UExceptions in 'Web.UExceptions.pas', Web.UHTTPEx in 'Web.UHTTPEx.pas', - Web.UInfo in 'Web.UInfo.pas', - Web.USWAGRESTMgr in 'Web.USWAGRESTMgr.pas'; + Web.UInfo in 'Web.UInfo.pas'; // Include resources {$Resource ExternalObj.tlb} // Type library file diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index c87e57b2c..741faaaf1 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -584,7 +584,6 @@ - Base diff --git a/Src/Web.USWAGRESTMgr.pas b/Src/Web.USWAGRESTMgr.pas deleted file mode 100644 index 1fe4ca586..000000000 --- a/Src/Web.USWAGRESTMgr.pas +++ /dev/null @@ -1,668 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Implements a class that interfaces with the DelphiDabbler SWAG web service. - * For details of the web service see http://swag.delphidabbler.com/docs/api/ -} - - -unit Web.USWAGRESTMgr; - - -interface - - -uses - // Delphi - XMLIntf, - Generics.Collections, - // Project - Web.UBaseWebService, - UXMLDocumentEx, - UURIParams, - SWAG.UCommon; - - -type - /// Record that encapsulates a range of records to be retrieved from - /// the SWAG database via the SWAG REST API. - TSWAGRESTRange = record - /// Starting index of first record in range. - Start: Cardinal; - /// Maximum number of records to be retrieved. - Length: Cardinal; - /// Constructs a new range with given start index and length. - /// - constructor Create(AStart: Cardinal; ALength: Cardinal); - /// Constructs a new null range of zero length. - class function CreateNull: TSWAGRESTRange; static; - /// Checks if a range is null (i.e. it's length is zero). - /// - function IsNull: Boolean; - /// Converts range into a string with format suitable for passing - /// as a parameter value to the REST API. - function ToString: string; - end; - -type - /// Class that interfaces with the DelphiDabbler SWAG web service - /// to get data from and information about the SWAG database. - /// - /// This class interfaces with the database via its RESTful API which - /// is documented ar http://swag.delphidabbler.com/docs/api/ - /// Data is retrieved XML format. - /// - TSWAGRESTMgr = class sealed(TBaseWebService) - strict private - const - /// Web service's base URL template. - ScriptURLTplt = 'http://swag.%s/api/v1'; - /// User agent sent to web service. - UserAgent = 'CodeSnip'; - - strict private - - /// Adds a "limit" parameter to the given parameters object where - /// the parameter value is determined by the given range. - procedure AddLimitParam(Params: TURIParams; const Range: TSWAGRESTRange); - - /// Adds a "fields" parameter to the given parameters object where - /// the parameter value is determined by the given array of field names. - /// - procedure AddFieldsParam(Params: TURIParams; const Fields: array of string); - - /// Creates and returns a new parameters object, populated with - /// parameters common to every REST API call. - function CreateParams: TURIParams; - - /// Parses an XML node that describes a SWAG snippet. - /// IXMLDocumentEx [in] Reference to an XML DOM - /// document containing the response from a suitable call to the web - /// service. - /// IXMLNode [in] XML node containing snippet data. - /// - /// TSWAGSnippet [out] Receives snippet data. Only - /// those fields of Snippet that correspond to the fields requested from - /// the web service are set. - /// Raises EWebServiceFailure if any of the content within Node - /// is not valid. - procedure ParseSnippetNode(XMLDoc: IXMLDocumentEx; Node: IXMLNode; - out Snippet: TSWAGSNippet); - - /// Validates an XML DOM document containing a response from the - /// web service to check if conforms to the expected format. - /// IXMLDocumentEx [in] Reference to XML DOM document. - /// - /// Raises EWebServiceFailure if the format of the response is - /// invalid. - /// Raises EWebServiceError if the response format is valid but - /// represents an error condition. - procedure ValidateResponse(XMLDoc: IXMLDocumentEx); - - /// Creates an XML DOM document from XML source code and validates - /// it. - /// string [in] XML source code. - /// IXMLDocumentEx. Required XML DOM document. - /// Raises EWebServiceFailure if the format of the XML is - /// invalid. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition. - function CreateValidXMLDoc(const XML: string): IXMLDocumentEx; - - /// Parses the given XML response that results from a web service - /// request for details of all categories in the SWAG database. - /// XML code containing response. - /// TList<TSWAGCategory> [in] List that - /// receives details of all categories described by XML. - /// Raises EWebServiceFailure if the format of the XML is - /// not a valid response for this request. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition. - procedure ParseCategoriesResponse(const XML: string; - CatList: TList); - - /// Parses the given XML response that results from a web service - /// request for a set of zero of more snippets from the SWAG database. - /// - /// XML code containing response. - /// TList<TSWAGSnippet> [in] List that - /// receives details of all snippets described by XML. - /// Raises EWebServiceFailure if the format of the XML is - /// not a valid response for this request. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition. - procedure ParseSnippetsResponse(const XML: string; - SnippetList: TList); - - /// Parses the given XML response that results from a web service - /// request for a single snippet from the SWAG database. - /// XML code containing response. - /// TSWAGSnippet [out] Recieves information about - /// the snippet described by XML. - /// Raises EWebServiceFailure if the format of the XML is - /// not a valid response for this request. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition. - procedure ParseSnippetResponse(const XML: string; - out Snippet: TSWAGSnippet); - - /// Parses the given XML response that results from a web service - /// request for a count of a (sub)set of snippets in SWAG database. - /// - /// XML code containing response. - /// Cardinal [in] The required snippet count. - /// Raises EWebServiceFailure if the format of the XML is - /// not a valid response for this request. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition. - function ParseSnippetCount(const XML: string): Cardinal; - - public - - /// Creates a new instance of the web service object. - constructor Create; - - /// Gets a list of all categories in the SWAG database. - /// TList<TSWAGCategory> [in] Receives required - /// list of categories. - /// Raises EWebServiceFailure if the response from the web - /// service not a valid response for this request. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition. - /// Raises EHTTPError, EWebConnectionError or - /// EWebTransmissionError if there is a problem connecting to or receiving - /// data from the web service. - procedure GetCategories(CatList: TList); - - /// Gets a range of snippets from a given category of the SWAG - /// database. - /// string [in] ID of category for which snippets are - /// required. - /// array of string [in] Names of snippet fields - /// required. See the REST API documentation for valid field names. - /// TSWAGRESTRange [in] Range of records required. - /// - /// TList<TSWAGSnippet> [in] Receives list - /// of snippets read, if any. - /// Raises EWebServiceFailure if the response from the web - /// service not a valid response for this request. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition (see remarks). - /// Raises EHTTPError, EWebConnectionError or - /// EWebTransmissionError if there is a problem connecting to or receiving - /// data from the web service. - /// - /// The range provided in Limit limits the number of snippets - /// returned to a managable amount. The snippets returned are those with - /// starting index of Limit.Start and the number returned will be between - /// zero and Limit.Length. - /// The fields set in each TSWAGSnippet record contained in - /// SnippetList depend on the fields requested in the Fields parameter. - /// - /// The web service will signal an error condition if CatID is - /// not valid or if Fields is empty or contains an invalid field name. - /// - /// - procedure GetSnippets(const CatID: string; const Fields: array of string; - const Limit: TSWAGRESTRange; SnippetList: TList); - overload; - - /// Gets all snippets in a given category of the SWAG database. - /// - /// string [in] ID of category for which snippets are - /// required. - /// array of string [in] Names of snippet fields - /// required. See the REST API documentation for valid field names. - /// TList<TSWAGSnippet> [in] Receives list - /// of snippets read. - /// Raises EWebServiceFailure if the response from the web - /// service not a valid response for this request. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition (see remarks). - /// Raises EHTTPError, EWebConnectionError or - /// EWebTransmissionError if there is a problem connecting to or receiving - /// data from the web service. - /// - /// The fields set in each TSWAGSnippet record contained in - /// SnippetList depend on the fields requested in the Fields parameter. - /// - /// The web service will signal an error condition if CatID is - /// not valid or if Fields is empty or contains an invalid field name. - /// - /// - procedure GetSnippets(const CatID: string; const Fields: array of string; - SnippetList: TList); overload; - - /// Gets a range of snippets from the entire SWAG database. - /// - /// array of string [in] Names of snippet fields - /// required. See the REST API documentation for valid field names. - /// TSWAGRESTRange [in] Range of records required. - /// - /// TList<TSWAGSnippet> [in] Receives list - /// of snippets read, if any. - /// Raises EWebServiceFailure if the response from the web - /// service not a valid response for this request. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition (see remarks). - /// Raises EHTTPError, EWebConnectionError or - /// EWebTransmissionError if there is a problem connecting to or receiving - /// data from the web service. - /// - /// The range provided in Limit limits the number of snippets - /// returned to a managable amount. The snippets returned are those with - /// starting index of Limit.Start and the number returned will be between - /// zero and Limit.Length. - /// The fields set in each TSWAGSnippet record contained in - /// SnippetList depend on the fields requested in the Fields parameter. - /// - /// The web service will signal an error condition if Fields is empty - /// or contains an invalid field name. - /// - procedure GetSnippets(const Fields: array of string; - const Limit: TSWAGRESTRange; SnippetList: TList); overload; - - /// Gets all snippets in the SWAG database. - /// array of string [in] Names of snippet fields - /// required. See the REST API documentation for valid field names. - /// TList<TSWAGSnippet> [in] Receives list - /// of snippets read, if any. - /// Raises EWebServiceFailure if the response from the web - /// service not a valid response for this request. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition (see remarks). - /// Raises EHTTPError, EWebConnectionError or - /// EWebTransmissionError if there is a problem connecting to or receiving - /// data from the web service. - /// - /// The fields set in each TSWAGSnippet record contained in - /// SnippetList depend on the fields requested in the Fields parameter. - /// - /// The web service will signal an error condition if Fields is empty - /// or contains an invalid field name. - /// - procedure GetSnippets(const Fields: array of string; - SnippetList: TList); overload; - - /// Gets a single snippet from the SWAG database. - /// Cardinal [in] Unique ID of the required - /// snippet. - /// array of string [in] Names of snippet fields - /// required. See the REST API documentation for valid field names. - /// TSWAGSnippet [out] Receives the details of the - /// required snippet. - /// Raises EWebServiceFailure if the response from the web - /// service is not a valid response for this request. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition (see remarks). - /// Raises EHTTPError, EWebConnectionError or - /// EWebTransmissionError if there is a problem connecting to or receiving - /// data from the web service. - /// - /// The fields set in the returned Snippet record depend on the - /// fields requested in the Fields parameter. - /// The web service will signal an error condition if SnippetID is - /// not valid or if Fields is empty or contains an invalid field name. - /// - /// - procedure GetSnippet(const SnippetID: Cardinal; - const Fields: array of string; out Snippet: TSWAGSnippet); - - /// Gets the number of snippets in a category or in the whole - /// SWAG database. - /// string [in] Name of category for which the snippet - /// count is required. Omitting this parameter, or passing '*' to it cause - /// the count of all snippets in the database to be returned. - /// Cardinal. The required snippet count. - /// Raises EWebServiceFailure if the response from the web - /// service not a valid response for this request. - /// Raises EWebServiceError if the XML format is valid but - /// represents an error condition (see remarks). - /// Raises EHTTPError, EWebConnectionError or - /// EWebTransmissionError if there is a problem connecting to or receiving - /// data from the web service. - /// The web service will signal an error condition if CatID, where - /// provided, is not a valid category ID or '*'. - function GetSnippetCount(const CatID: string = '*'): Cardinal; - end; - - -implementation - - -uses - // Delphi - SysUtils, - // Project - UIStringList, - UStrUtils, - UURIEncode, - UUtils, - UXMLDocHelper, - Web.UInfo, - Web.UExceptions; - - -{ TSWAGRESTMgr } - -procedure TSWAGRESTMgr.AddFieldsParam(Params: TURIParams; - const Fields: array of string); -var - FieldList: IStringList; -begin - FieldList := TIStringList.Create(Fields); - Params.Add('fields', FieldList.GetText(',', False)); -end; - -procedure TSWAGRESTMgr.AddLimitParam(Params: TURIParams; - const Range: TSWAGRESTRange); -begin - Params.Add('limit', Range.ToString); -end; - -constructor TSWAGRESTMgr.Create; -begin - inherited Create(TWebServiceInfo.Create(ScriptURLTplt, UserAgent)); -end; - -function TSWAGRESTMgr.CreateParams: TURIParams; -begin - Result := TURIParams.Create; - Result.Add('format', 'xml'); - Result.Add('suppressResponseCodes', 'true'); -end; - -function TSWAGRESTMgr.CreateValidXMLDoc(const XML: string): IXMLDocumentEx; -begin - Result := TXMLDocumentEx.Create(nil); - Result.LoadFromXML(XML); - ValidateResponse(Result); -end; - -procedure TSWAGRESTMgr.GetCategories(CatList: TList); -const - ResourcePath = 'categories'; -var - Params: TURIParams; - Response: string; -begin - Params := CreateParams; - try - Response := GetText(ResourcePath, Params); - ParseCategoriesResponse(Response, CatList); - finally - Params.Free; - end; -end; - -procedure TSWAGRESTMgr.GetSnippet(const SnippetID: Cardinal; - const Fields: array of string; out Snippet: TSWAGSnippet); -const - ResourcePathTplt = 'snippet/%d'; -var - Params: TURIParams; - Response: string; -begin - Params := CreateParams; - try - AddFieldsParam(Params, Fields); - Response := GetText(Format(ResourcePathTplt, [SnippetID]), Params); - ParseSnippetResponse(Response, Snippet); - finally - Params.Free; - end; -end; - -function TSWAGRESTMgr.GetSnippetCount(const CatID: string): Cardinal; -const - ResourcePathTplt = 'snippet-count/%s'; -var - Params: TURIParams; - Response: string; -begin - Params := CreateParams; - try - Response := GetText(Format(ResourcePathTplt, [URIEncode(CatID)]), Params); - Result := ParseSnippetCount(Response); - finally - Params.Free; - end; -end; - -procedure TSWAGRESTMgr.GetSnippets(const CatID: string; - const Fields: array of string; const Limit: TSWAGRESTRange; - SnippetList: TList); -const - ResourcePathTplt = 'snippets/%s'; -var - Params: TURIParams; - Response: string; -begin - Params := CreateParams; - try - AddFieldsParam(Params, Fields); - if not Limit.IsNull then - AddLimitParam(Params, Limit); - Response := GetText(Format(ResourcePathTplt, [URIEncode(CatID)]), Params); - ParseSnippetsResponse(Response, SnippetList); - finally - Params.Free; - end; -end; - -procedure TSWAGRESTMgr.GetSnippets(const CatID: string; - const Fields: array of string; SnippetList: TList); -begin - GetSnippets(CatID, Fields, TSWAGRESTRange.CreateNull, SnippetList); -end; - -procedure TSWAGRESTMgr.GetSnippets(const Fields: array of string; - SnippetList: TList); -begin - GetSnippets('*', Fields, SnippetList); -end; - -procedure TSWAGRESTMgr.GetSnippets(const Fields: array of string; - const Limit: TSWAGRESTRange; SnippetList: TList); -begin - GetSnippets('*', Fields, Limit, SnippetList); -end; - -procedure TSWAGRESTMgr.ParseCategoriesResponse(const XML: string; - CatList: TList); -var - XMLDOc: IXMLDocumentEx; - CategoriesNode: IXMLNode; - CategoryNodes: IXMLSimpleNodeList; - CategoryNode: IXMLNode; - Category: TSWAGCategory; -resourcestring - sCategoriesNodeMissing = 'Response has no category information'; -begin - XMLDoc := CreateValidXMLDoc(XML); - CategoriesNode := XMLDoc.FindNode('response\categories'); - if not Assigned(CategoriesNode) then - raise EWebServiceFailure.Create(sCategoriesNodeMissing); - CategoryNodes := XMLDoc.FindChildNodes(CategoriesNode, 'category'); - for CategoryNode in CategoryNodes do - begin - Category.ID := TXMLDocHelper.GetSubTagText(XMLDoc, CategoryNode, 'id'); - Category.Title := TXMLDocHelper.GetSubTagText( - XMLDoc, CategoryNode, 'title' - ); - CatList.Add(Category); - end; -end; - -function TSWAGRESTMgr.ParseSnippetCount(const XML: string): Cardinal; -var - XMLDOc: IXMLDocumentEx; - CountNode: IXMLNode; -resourcestring - sBadCountNode = 'Response has missing or invalid count information'; -begin - XMLDoc := CreateValidXMLDoc(XML); - CountNode := XMLDoc.FindNode('response\snippetCount'); - if not Assigned(CountNode) - or not CountNode.IsTextElement - or not TryStrToCardinal(CountNode.Text, Result) then - raise EWebServiceFailure.Create(sBadCountNode); -end; - -procedure TSWAGRESTMgr.ParseSnippetNode(XMLDoc: IXMLDocumentEx; Node: IXMLNode; - out Snippet: TSWAGSNippet); -var - NumStr: string; - DateStr: string; -resourcestring - sBadID = 'Invalid value for snippet id'; - sBadFileNumber = 'Invalid value for snippet file number'; -begin - NumStr := TXMLDocHelper.GetSubTagText(XMLDoc, Node, 'id'); - if NumStr <> '' then - begin - if not TryStrToCardinal(NumStr, Snippet.ID) then - raise EWebServiceFailure.Create(sBadID); - end - else - Snippet.ID := 0; - - Snippet.Category := TXMLDocHelper.GetSubTagText(XMLDoc, Node, 'category'); - - Snippet.FileName := TXMLDocHelper.GetSubTagText(XMLDoc, Node, 'file_name'); - - DateStr := TXMLDocHelper.GetSubTagText(XMLDoc, Node, 'datestamp'); - if DateStr <> '' then - Snippet.DateStamp := ParseSQLDateTime(DateStr) - else - Snippet.DateStamp := 0.0; - - Snippet.Title := TXMLDocHelper.GetSubTagText(XMLDoc, Node, 'title'); - - Snippet.Author := TXMLDocHelper.GetSubTagText(XMLDoc, Node, 'author'); - - Snippet.SourceCode := TXMLDocHelper.GetSubTagText( - XMLDoc, Node, 'source_code' - ); - - Snippet.IsDocument := StrMatchText( - TXMLDocHelper.GetSubTagText(XMLDoc, Node, 'is_document'), - ['1', 'yes', 'y', 'true'] - ); -end; - -procedure TSWAGRESTMgr.ParseSnippetResponse(const XML: string; - out Snippet: TSWAGSnippet); -var - XMLDoc: IXMLDocumentEx; - SnippetNode: IXMLNode; -resourcestring - sSnippetNodeMissing = 'Response has no snippet information'; -begin - XMLDoc := CreateValidXMLDoc(XML); - SnippetNode := XMLDoc.FindNode('response\snippet'); - if not Assigned(SnippetNode) then - raise EWebServiceFailure.Create(sSnippetNodeMissing); - ParseSnippetNode(XMLDoc, SnippetNode, Snippet); -end; - -procedure TSWAGRESTMgr.ParseSnippetsResponse(const XML: string; - SnippetList: TList); -var - XMLDOc: IXMLDocumentEx; - SnippetsNode: IXMLNode; - SnippetNodes: IXMLSimpleNodeList; - SnippetNode: IXMLNode; - Snippet: TSWAGSnippet; -resourcestring - sSnippetsNodeMissing = 'Response has no snippets information'; -begin - XMLDoc := CreateValidXMLDoc(XML); - SnippetsNode := XMLDoc.FindNode('response\snippets'); - if not Assigned(SnippetsNode) then - raise EWebServiceFailure.Create(sSnippetsNodeMissing); - SnippetNodes := XMLDoc.FindChildNodes(SnippetsNode, 'snippet'); - for SnippetNode in SnippetNodes do - begin - ParseSnippetNode(XMLDoc, SnippetNode, Snippet); - SnippetList.Add(Snippet); - end; -end; - -procedure TSWAGRESTMgr.ValidateResponse(XMLDoc: IXMLDocumentEx); -resourcestring - sMissingRootNode = 'Response root node not found'; - sBadStatus = 'Response status missing or invalid'; - sMissingErrInfo = 'Error information missing'; - sBadErrStatus = 'Error status code missing or mal-formed'; - sBadErrCode = 'Error code missing or mal-formed'; - sMissingErrMessage = 'Error message missing'; -var - RootNode: IXMLNode; - Status: string; - ErrNode: IXMLNode; - ErrStatus: Integer; - ErrCode: Integer; - ErrMessage: string; -begin - TXMLDocHelper.ValidateProcessingInstr(XMLDoc); - RootNode := XMLDoc.FindNode('response'); - if not Assigned(RootNode) then - raise EWebServiceFailure.Create(sMissingRootNode); - Status := TXMLDocHelper.GetSubTagText(XMLDoc, RootNode, 'status'); - if not StrSameText(Status, 'ok') and not StrSameText(Status, 'error') then - raise EWebServiceFailure.Create(sBadStatus); - if StrSameText(Status, 'ok') then - Exit; - // we have error response - validate response and get details (don't validate - // 'response\error\status' node since we don't make use of it). - ErrNode := XMLDoc.FindNode('response\error'); - if not Assigned(ErrNode) then - raise EWebServiceFailure(sMissingErrInfo); - if not TryStrToInt( - TXMLDocHelper.GetSubTagText(XMLDOc, ErrNode, 'status'), ErrStatus - ) then - raise EWebServiceFailure.Create(sBadErrStatus); - if not TryStrToInt( - TXMLDocHelper.GetSubTagText(XMLDoc, ErrNode, 'code'), ErrCode - ) then - raise EWebServiceFailure.Create(sBadErrCode); - ErrMessage := TXMLDocHelper.GetSubTagText(XMLDoc, ErrNode, 'message'); - if ErrMessage = '' then - raise EWebServiceFailure.Create(sMissingErrMessage); - // error response is valid: raise exception for error message and code - raise EWebServiceError.Create(ErrMessage, ErrCode); -end; - -{ TSWAGRESTRange } - -constructor TSWAGRESTRange.Create(AStart, ALength: Cardinal); -begin - Start := AStart; - Length := ALength; -end; - -class function TSWAGRESTRange.CreateNull: TSWAGRESTRange; -begin - Result := TSWAGRESTRange.Create(0, 0); -end; - -function TSWAGRESTRange.IsNull: Boolean; -begin - Result := Length = 0; -end; - -function TSWAGRESTRange.ToString: string; -begin - Result := Format('%d,%d', [Start, Length]); -end; - -end. - From 983079eafbf91e9f7ce9499ec444d6ce66cfc58b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 05:50:49 +0000 Subject: [PATCH 101/714] Added support for generating CSS line-height property --- Src/UCSSUtils.pas | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Src/UCSSUtils.pas b/Src/UCSSUtils.pas index 1ef9e29b6..7119fe6ff 100644 --- a/Src/UCSSUtils.pas +++ b/Src/UCSSUtils.pas @@ -417,6 +417,14 @@ TCSS = record /// string. Required CSS property. class function OverflowProp(const Value: TCSSOverflowValue; const Direction: TCSSOverflowDirection = codBoth): string; static; + + /// Creates a CSS "line-height" property. + /// UInt16 [in] Line height as a percentage of + /// font size. + /// string. Required CSS property. + /// Only the percentage version of line height is supported. + /// + class function LineHeightProp(const Percentage: UInt16): string; static; end; @@ -615,6 +623,11 @@ class function TCSS.LengthUnit(const LU: TCSSLengthUnit): string; Result := Units[LU]; end; +class function TCSS.LineHeightProp(const Percentage: UInt16): string; +begin + Result := 'line-height: ' + IntToStr(Percentage) + '%'; +end; + class function TCSS.MarginProp(const Margin: array of Integer): string; begin Assert(Length(Margin) in [1,2,4], From 30af12e1a1bc88f922e49cf8f2104cf221ec7e08 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 05:51:15 +0000 Subject: [PATCH 102/714] Added URL for SWAG database releases --- Src/Web.UInfo.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Src/Web.UInfo.pas b/Src/Web.UInfo.pas index 92bc007b1..58209afab 100644 --- a/Src/Web.UInfo.pas +++ b/Src/Web.UInfo.pas @@ -93,6 +93,9 @@ TWebInfo = class(TNoConstructObject) /// database releases are hosted. CSDBReleaseURL = 'https://github.com/' + 'delphidabbler/code-snippets/releases'; + /// URL of the GitHub page where SWAG database releases are + /// hosted. + SWAGReleaseURL = 'https://github.com/delphidabbler/swag/releases'; /// URL of the online Code Snippets database. DatabaseURL = WebsiteURL + '/url/csdb'; /// URL used to make donations towards the CodeSnip project. From 9b6d5b8bd45809e825ce5f8cbf47ba3b8d53a9fd Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 05:53:36 +0000 Subject: [PATCH 103/714] Removed unnecessary CSS style --- Src/FmDBUpdateDlg.pas | 3 --- Src/Res/HTML/dlg-dbupdate-intro-tplt.html | 7 +++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Src/FmDBUpdateDlg.pas b/Src/FmDBUpdateDlg.pas index a67459656..5f99f7d57 100644 --- a/Src/FmDBUpdateDlg.pas +++ b/Src/FmDBUpdateDlg.pas @@ -251,9 +251,6 @@ procedure TDBUpdateDlg.BuildCSS(Sender: TObject; const CSSBuilder: TCSSBuilder); begin inherited; - // Set body style to use window colour and frame's font with no margin - with CSSBuilder.Selectors['a'] do - AddProperty(TCSS.ColorProp(clExternalLink)); // Create .framed border style with CSSBuilder.AddSelector('.framed') do begin diff --git a/Src/Res/HTML/dlg-dbupdate-intro-tplt.html b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html index c9ef1d0ec..ba140b344 100644 --- a/Src/Res/HTML/dlg-dbupdate-intro-tplt.html +++ b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html @@ -24,10 +24,9 @@

      - Important Note: you are strongly advised to back up your user database before going ahead with this installation. To do this cancel this dialogue box then use the Database | Backup User Database menu option to create a backup, then come back here. + Warning: you are strongly advised to back up your user database before going ahead with this installation. To do this cancel this dialogue box then use the Database | Backup User Database menu option to create a backup. When you have done that please come back here. + +

      From 6c57b03e1442f9b4c5ac185b02e5b9672e31cc87 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 05:57:00 +0000 Subject: [PATCH 104/714] Revised text of intro page and styling of intro and finish pages of SWAG import wizard --- Src/FmSWAGImportDlg.dfm | 40 +++------- Src/FmSWAGImportDlg.pas | 43 ++++++++++- Src/HTML.hrc | 2 +- Src/Res/HTML/dlg-swag-import-intro-tplt.html | 63 ++++++++++++++++ Src/Res/HTML/dlg-swag-import-intro.html | 77 -------------------- 5 files changed, 113 insertions(+), 112 deletions(-) create mode 100644 Src/Res/HTML/dlg-swag-import-intro-tplt.html delete mode 100644 Src/Res/HTML/dlg-swag-import-intro.html diff --git a/Src/FmSWAGImportDlg.dfm b/Src/FmSWAGImportDlg.dfm index 2a9131cdf..9249bf9f5 100644 --- a/Src/FmSWAGImportDlg.dfm +++ b/Src/FmSWAGImportDlg.dfm @@ -25,32 +25,24 @@ inherited SWAGImportDlg: TSWAGImportDlg object tsIntro: TTabSheet Caption = 'tsIntro' TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 - inline frmIntro: TFixedHTMLDlgFrame + inline frmIntro: THTMLTpltDlgFrame Left = 0 Top = 0 Width = 663 - Height = 446 + Height = 236 Align = alTop TabOrder = 0 TabStop = True - ExplicitWidth = 663 - ExplicitHeight = 446 + ExplicitLeft = 8 + ExplicitTop = 8 inherited pnlBrowser: TPanel Width = 663 - Height = 446 - ExplicitWidth = 663 - ExplicitHeight = 446 inherited wbBrowser: TWebBrowser Width = 663 - Height = 446 - ExplicitWidth = 663 - ExplicitHeight = 446 + ExplicitWidth = 320 + ExplicitHeight = 240 ControlData = { - 4C00000086440000182E00000000000000000000000000000000000000000000 + 4C00000086440000641800000000000000000000000000000000000000000000 000000004C000000000000000000000001000000E0D057007335CF11AE690800 2B2E126208000000000000004C0000000114020000000000C000000000000046 8000000000000000000000000000000000000000000000000000000000000000 @@ -63,10 +55,6 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsFolder' ImageIndex = 4 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 27 - ExplicitWidth = 0 - ExplicitHeight = 425 object lblFolder: TLabel Left = 0 Top = 8 @@ -110,10 +98,6 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsCategories' ImageIndex = 1 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object lblCategories: TLabel Left = 0 Top = 45 @@ -186,10 +170,6 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsUpdate' ImageIndex = 2 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object lblUpdateDesc: TLabel Left = 0 Top = 3 @@ -232,16 +212,14 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsFinish' ImageIndex = 3 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frmOutro: THTMLTpltDlgFrame Left = 0 Top = 0 Width = 663 Height = 446 Align = alTop + DoubleBuffered = False + ParentDoubleBuffered = False TabOrder = 0 TabStop = True ExplicitWidth = 663 diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index 213b90753..83ada4d91 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -44,6 +44,7 @@ interface FrHTMLTpltDlg, UBaseObjects, UContainers, + UCSSBuilder, SWAG.UCommon, SWAG.UImporter, SWAG.UReader, ActnList; @@ -57,7 +58,6 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) tsIntro: TTabSheet; tsCategories: TTabSheet; lblCategories: TLabel; - frmIntro: TFixedHTMLDlgFrame; lbCategories: TListBox; lblCategoriesDesc: TLabel; lblSelectSnippets: TLabel; @@ -78,6 +78,7 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) lblFolderPageInfo: TLabel; btnBrowse: TButton; actBrowse: TAction; + frmIntro: THTMLTpltDlgFrame; ///

      Handles clicks on the check boxes next to snippets in the /// snippet selection list box by selecting and deselecting snippets for /// inclusion in the import. @@ -150,6 +151,13 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) /// Validates entries on the wizard page identified by the given /// page index. procedure ValidatePage(const PageIdx: Integer); + /// Handles HTML template frame's OnBuildCSS event. Adds + /// additional CSS required by HTML in this form. + /// TObject [in] Reference to object triggering event. + /// + /// TCSSBuilder [in] Object used to construct the + /// CSS. + procedure BuildCSS(Sender: TObject; const CSSBuilder: TCSSBuilder); /// Displays snippets selected for import in list view on Update /// page. procedure PopulateImportsLV; @@ -246,14 +254,17 @@ implementation FmPreviewDlg, FmWaitDlg, UBrowseForFolderDlg, + UColours, UConsts, + UCSSUtils, UCtrlArranger, UEncodings, UExceptions, UHTMLTemplate, UMessageBox, UStrUtils, - UWaitForThreadUI; + UWaitForThreadUI, + Web.UInfo; {$R *.dfm} @@ -403,6 +414,21 @@ procedure TSWAGImportDlg.BeginPage(const PageIdx: Integer); end; end; +procedure TSWAGImportDlg.BuildCSS(Sender: TObject; + const CSSBuilder: TCSSBuilder); +begin + inherited; + // Set body text spacing + with CSSBuilder.Selectors['body'] do + AddProperty(TCSS.LineHeightProp(120)); + // Create .framed border style + with CSSBuilder.AddSelector('.framed') do + begin + AddProperty(TCSS.BorderProp(cssAll, 1, cbsSolid, clBorder)); + AddProperty(TCSS.PaddingProp(4)); + end; +end; + procedure TSWAGImportDlg.clbSelectSnippetsClickCheck(Sender: TObject); var SelIdx: Integer; @@ -440,6 +466,7 @@ procedure TSWAGImportDlg.ConfigForm; begin inherited; pcWizard.ActivePage := tsFinish; + frmOutro.OnBuildCSS := BuildCSS; frmOutro.Initialise( 'dlg-swag-import-outro-tplt.html', procedure (Tplt: THTMLTemplate) @@ -451,7 +478,17 @@ procedure TSWAGImportDlg.ConfigForm; end ); pcWizard.ActivePage := tsIntro; - frmIntro.Initialise('dlg-swag-import-intro.html'); + frmIntro.OnBuildCSS := BuildCSS; + frmIntro.Initialise( + 'dlg-swag-import-intro-tplt.html', + procedure (Tplt: THTMLTemplate) + begin + Tplt.ResolvePlaceholderText( + 'SWAGReleaseURL', + TWebInfo.SWAGReleaseURL + ); + end + ); end; destructor TSWAGImportDlg.Destroy; diff --git a/Src/HTML.hrc b/Src/HTML.hrc index 2b920a012..21451ae8c 100644 --- a/Src/HTML.hrc +++ b/Src/HTML.hrc @@ -41,7 +41,7 @@ Res\HTML\dlg-activetext-preview-tplt.html Res\HTML\dlg-rssnews.html # SWAG import dialogue -Res\HTML\dlg-swag-import-intro.html +Res\HTML\dlg-swag-import-intro-tplt.html Res\HTML\dlg-swag-import-outro-tplt.html # code submission wizard diff --git a/Src/Res/HTML/dlg-swag-import-intro-tplt.html b/Src/Res/HTML/dlg-swag-import-intro-tplt.html new file mode 100644 index 000000000..9fab4f1b5 --- /dev/null +++ b/Src/Res/HTML/dlg-swag-import-intro-tplt.html @@ -0,0 +1,63 @@ + + + + + + + + + + dlg-swag-import-intro.html + + + + +

      + This wizard enables you to import snippets from the SWAG database into your local user database. +

      + +

      + You must have a copy of a specially prepared version of SWAG on your local system before continuing. If you haven't already got it then you need to download it from the delphidabbler/swag repository on GitHub. Go to <%SWAGReleaseURL%> and find the latest release of the XML version of SWAG. The file name will be in the form swag-xml-vX.X.X where X.X.X is the version number. Download the file and unzip it into a folder on your computer. Make a note of the folder's location - it will be needed in the next step. + +

      + On the next page of the wizard you will be asked for the location of the folder containing the SWAG database. CodeSnip will then open the database and display all SWAG's categories on the following page. From there you can browse and display the snippets in each category before selecting those you want to import. You get a chance to review these before importing. +

      + +

      + All snippets are imported as freeform. +

      + +

      + CodeSnip does not keep a track of snippets imported from SWAG – it treats them just like any other user defined snippet. This means it is possible to import the same snippet more than once. It's up to you to keep track of this. +

      + +

      + Note: It can take quite some time to import snippets from SWAG. You are advised not to import more than about 20 snippets in one go. If you want to import a lot of snippets you should run this wizard more than once. +

      + + + + diff --git a/Src/Res/HTML/dlg-swag-import-intro.html b/Src/Res/HTML/dlg-swag-import-intro.html deleted file mode 100644 index 0bb082cdf..000000000 --- a/Src/Res/HTML/dlg-swag-import-intro.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - dlg-swag-import-intro.html - - - - -

      - This wizard enables you to import one or more snippets from the online SWAG database into your local user database. -

      - -

      - When you click the "Next" button, CodeSnip will - download a list of categories from the SWAG database. Double-click on a - category to see a list of the snippets it contains. You can then select - the snippet(s) you want to import using the check boxes that appear next - to each snippet. Double-clicking a snippet lets you view it. -

      - -

      - To help you to decide what to import you can - view the SWAG database in your browser. Make a note of the names of - the snippet(s) you are interested in, along with their categories. That - will help you find them in this wizard. -

      - -

      - All snippets are imported as freeform. -

      - -

      - CodeSnip does not keep a track of snippets imported from the SWAG - database – it treats them just like any other user defined snippet. - This means that you will be able to import the same snippet more than once - and it's up to you to keep track of this. -

      - -

      - NOTE: - It can take quite some time to import SWAG snippets. You are advised not - to import more than about 20 snippets in one go. If you want to import a - lot of snippets you should run this wizard more than once. -

      - - - - From acb85794b11a46f433d5dad8921c69ab9677ea3c Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 06:06:39 +0000 Subject: [PATCH 105/714] Removed redundant internet-related units --- Src/CodeSnip.dpr | 5 - Src/CodeSnip.dproj | 5 - Src/UURIParams.pas | 167 ----------- Src/Web.UBaseWebService.pas | 437 ----------------------------- Src/Web.UDownloadMonitor.pas | 235 ---------------- Src/Web.UExceptions.pas | 194 ------------- Src/Web.UHTTPEx.pas | 521 ----------------------------------- 7 files changed, 1564 deletions(-) delete mode 100644 Src/UURIParams.pas delete mode 100644 Src/Web.UBaseWebService.pas delete mode 100644 Src/Web.UDownloadMonitor.pas delete mode 100644 Src/Web.UExceptions.pas delete mode 100644 Src/Web.UHTTPEx.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 9c08f44ec..20ccd5bc9 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -359,7 +359,6 @@ uses UUnitAnalyser in 'UUnitAnalyser.pas', UUnitsChkListMgr in 'UUnitsChkListMgr.pas', UURIEncode in 'UURIEncode.pas', - UURIParams in 'UURIParams.pas', UUrlMonEx in 'UUrlMonEx.pas', UUserDBBackup in 'UUserDBBackup.pas', UUserDBMgr in 'UUserDBMgr.pas', @@ -380,11 +379,7 @@ uses UXMLDocConsts in 'UXMLDocConsts.pas', UXMLDocHelper in 'UXMLDocHelper.pas', UXMLDocumentEx in 'UXMLDocumentEx.pas', - Web.UBaseWebService in 'Web.UBaseWebService.pas', Web.UCharEncodings in 'Web.UCharEncodings.pas', - Web.UDownloadMonitor in 'Web.UDownloadMonitor.pas', - Web.UExceptions in 'Web.UExceptions.pas', - Web.UHTTPEx in 'Web.UHTTPEx.pas', Web.UInfo in 'Web.UInfo.pas'; // Include resources diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 741faaaf1..6071dbaa2 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -557,7 +557,6 @@ - @@ -578,11 +577,7 @@ - - - - diff --git a/Src/UURIParams.pas b/Src/UURIParams.pas deleted file mode 100644 index cd99c828c..000000000 --- a/Src/UURIParams.pas +++ /dev/null @@ -1,167 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2010-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Encapsulates URI query string parameters and generates a query string from - * them. -} - - -unit UURIParams; - - -interface - - -uses - // Delphi - Classes, Generics.Collections; - - -type - { - TURIParams: - Class that encapsulates URI query string parameters and generates a query - string from them. - } - TURIParams = class(TObject) - strict private - fDict: TDictionary; - {Dictionary mapping param names to values} - procedure Add(const Params: TStrings); overload; - {Adds zero or more new parameters to object. - @param Params [in] String list containing parameters to be added. Each - element is a string in name=value format. - } - public - constructor Create; overload; - {Constructs object that contains no parameters. - } - constructor Create(const Params: TStrings); overload; - {Constructs object containing zero or more parameters. - @param Params [in] String list where each element specifies a parameter - in name=value format. - } - destructor Destroy; override; - {Tears down object. - } - procedure Add(const Name, Value: string); overload; - {Adds a single new parameter to object. - @param Name [in] Name of parameter to be added. - @param Value [in] Value of parameter to be added. - } - function EncodedQueryString: string; - {Creates a URI encoded query string containing details of all recorded - parameters. - @return Required query string. - } - function IsEmpty: Boolean; - {Checks if the object is empty, i.e. has no recorded parameters. - @return True if there are no recorded parameters, False otherwise. - } - end; - - -implementation - - -uses - // Delphi - SysUtils, - // Project - UComparers, UURIEncode; - - -{ TURIParams } - -procedure TURIParams.Add(const Name, Value: string); - {Adds a single new parameter to object. - @param Name [in] Name of parameter to be added. - @param Value [in] Value of parameter to be added. - } -begin - fDict.Add(Name, Value); -end; - -procedure TURIParams.Add(const Params: TStrings); - {Adds zero or more new parameters to object. - @param Params [in] String list containing parameters to be added. Each - element is a string in name=value format. - } -var - Idx: Integer; // loops through all elements of Params -begin - Assert(Assigned(Params), ClassName + '.Add(TStrings): Params is nil'); - for Idx := 0 to Pred(Params.Count) do - Add(Params.Names[Idx], Params.ValueFromIndex[Idx]); -end; - -constructor TURIParams.Create; - {Constructs object that contains no parameters. - } -begin - inherited Create; - fDict := TDictionary.Create( - 24, TTextEqualityComparer.Create - ); -end; - -constructor TURIParams.Create(const Params: TStrings); - {Constructs object containing zero or more parameters. - @param Params [in] String list where each element specifies a parameter in - name=value format. - } -begin - Create; - Add(Params); -end; - -destructor TURIParams.Destroy; - {Tears down object. - } -begin - fDict.Free; - inherited; -end; - -function TURIParams.EncodedQueryString: string; - {Creates a URI encoded query string containing details of all recorded - parameters. - @return Required query string. - } -var - AParam: TPair; // references each recorded parameter - SB: TStringBuilder; // used to build query string -begin - SB := TStringBuilder.Create; - try - for AParam in fDict do - begin - if SB.Length > 0 then - SB.Append('&'); - SB.Append(URIEncodeQueryString(AParam.Key)); - if AParam.Value <> '' then - SB.AppendFormat('=%s', [URIEncodeQueryString(AParam.Value)]); - end; - Result := SB.ToString; - finally - SB.Free; - end; -end; - -function TURIParams.IsEmpty: Boolean; - {Checks if the object is empty, i.e. has no recorded parameters. - @return True if there are no recorded parameters, False otherwise. - } -begin - Result := fDict.Count = 0; -end; - -end. - diff --git a/Src/Web.UBaseWebService.pas b/Src/Web.UBaseWebService.pas deleted file mode 100644 index c2ea6bd16..000000000 --- a/Src/Web.UBaseWebService.pas +++ /dev/null @@ -1,437 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2010-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Provides a base class for all classes that access web services. -} - - -unit Web.UBaseWebService; - - -interface - - -uses - // Delphi - SysUtils, Classes, - // Projects - UURIParams, Web.UHTTPEx, Web.UInfo; - - -type - - { - TWebServiceProgressEvent: - Type of event handler used to handle TBaseWebService.OnProgress events. Used - to monitor download progress. - @param Sender [in] Reference to TBaseWebService object triggering event. - @param BytesToDate [in] Number of bytes downloaded. - @param BytesExpected [in] Total number of bytes to be downloaded. - } - TWebServiceProgressEvent = procedure(Sender: TObject; const BytesToDate, - BytesExpected: Int64) of object; - - { - TBaseWebService: - Base class for all web service classes. Provides helper methods to ease - interaction with web services. - } - TBaseWebService = class(TObject) - strict private - fHTTP: THTTPEx; // Class used for HTTP requests - fScriptURI: string; // URI of web service - fOnProgress: TWebServiceProgressEvent; // OnProgress event handler - fWantProgress: Boolean; // Value of WantProgress property - procedure DoPostParams(const Params: TURIParams; - const PostProc: TProc); - {Helper method that assists in performing POST requests that send encoded - query strings. Converts query string to raw data, sets required content - type then hands off actual POST request to a provided anonymous method. - @param Params [in] Parameters to be POSTed. - @param PostProc [in] Anonymous method that performs POST request and - processes response. - } - function BuildURI(const ResourcePath: string; - const Params: TURIParams = nil): string; - {Builds a URI from web service name and any required parameters. - @param ResourcePath [in] Path to append to web service URI to specify - resource in REST APIs. - @param Params [in] Parameters to append to URI as query string. May be - empty or nil. - @return Required URI. - } - function GetResponseCharSet: string; - {Read accessor for ResponseCharSet property. - @return Character set used by last HTTP response. - } - strict protected - property WantProgress: Boolean read fWantProgress write fWantProgress; - {Flag that indicates if progress reporting is required. When True the - OnProgress event is triggered if assigned. The OnProgress event is not - triggered if this property is False} - function GetRaw(const ResourcePath: string; const Params: TURIParams = nil): - TBytes; - {Performs a GET request on web service with optional query string and - returns response as raw data. - @param ResourcePath [in] Path to append to web service URI to specify - resource in REST APIs. - @param Params [in] Optional parameters to include in query string. - @return Response as raw byte array. - } - function GetText(const ResourcePath: string; - const Params: TURIParams = nil): string; - {Performs a GET request on web service with optional query string and - returns response as text. - @param ResourcePath [in] Path to append to web service URI to specify - resource in REST APIs. - @param Params [in] Optional parameters to include in query string. - @return Response as text, decoded according to response header. - } - procedure GetStrings(const ResourcePath: string; const Params: TURIParams; - const Strings: TStrings); overload; - {Performs a GET request on web service with query string and stores - response in string list. - @param ResourcePath [in] Path to append to web service URI to specify - resource in REST APIs. - @param Params [in] Parameters to include in query string. May be empty - or nil. - } - procedure GetStrings(const ResourcePath: string; const Strings: TStrings); - overload; - {Performs a GET request on web service and stores response in string list. - @param ResourcePath [in] Path to append to web service URI to specify - resource in REST APIs. - @params Strings [in] String list that receives response. - } - function PostRaw(const Data: TStream): TBytes; overload; - {Performs a POST request on web service sending data from a stream and - returns response as raw data. - @param Data [in] Data to be posted. Must not be nil. - @return Response as raw byte array. - } - function PostText(const Data: TStream): string; overload; - {Performs a POST request on web service sending data from a stream and - returns response as text. - @param Data [in] Data to be posted. Must not be nil. - @return Response as text, decoded according to response header. - } - function PostText(const Data: TBytes): string; overload; - {Performs a POST request on web service sending data from a byte array and - returns response as text. - @param Data [in] Data to be posted. - @return Response as text, decoded according to response header. - } - function PostRaw(const Params: TURIParams): TBytes; overload; - {Performs a POST request on web service sending query strings and returns - response as raw data. - @param Params [in] Parameters to be posted. Must not be nil. - @return Response as raw byte array. - } - function PostText(const Params: TURIParams): string; overload; - {Performs a POST request on web service sending query strings and returns - response as text. - @param Params [in] Parameters to be posted. Must not be nil. - @return Response as text, decoded according to response header. - } - procedure PostStrings(const Data: TStream; const Strings: TStrings); - overload; - {Performs a POST request on web service sending data from a stream and - stores response in a string list. - @param Data [in] Data to be posted. Must not be nil. - @param Strings [in] String list that receives response. - } - procedure PostStrings(const Data: TBytes; const Strings: TStrings); - overload; - {Performs a POST request on web service sending data from a byte array and - stores response in a string list. - @param Data [in] Data to be posted. - @param Strings [in] String list that receives response. - } - procedure PostStrings(const Params: TURIParams; const Strings: TStrings); - overload; - {Performs a POST request on web service sending query strings and stores - response in a string list. - @param Params [in] Parameters to be posted. Must not be nil. - @param Strings [in] String list that receives response. - } - public - constructor Create(const WebInfo: TWebServiceInfo); - {Constructor. Creates and initialises web service object. - @param WebInfo [in] Information about the web service. - } - destructor Destroy; override; - {Destructor. Tears down object. - } - property OnProgress: TWebServiceProgressEvent - read fOnProgress write fOnProgress; - {Event that can be triggered to monitor progress of downloads. Event is - only triggered when WantProgress property is true} - property ResponseCharSet: string read GetResponseCharSet; - {Character set used for last response from web server} - end; - - -implementation - - -uses - // Project - UStrUtils; - - -{ TBaseWebService } - -function TBaseWebService.BuildURI(const ResourcePath: string; - const Params: TURIParams): string; - {Builds a URI from web service name and any required parameters. - @param ResourcePath [in] Path to append to web service URI to specify - resource in REST APIs. - @param Params [in] Parameters to append to URI as query string. May be empty - or nil. - @return Required URI. - } -begin - Result := fScriptURI; - if ResourcePath <> '' then - Result := Result + '/' + ResourcePath; - if Assigned(Params) and not Params.IsEmpty then - Result := Result + '?' + Params.EncodedQueryString; -end; - -constructor TBaseWebService.Create(const WebInfo: TWebServiceInfo); - {Constructor. Creates and initialises web service object. - @param WebInfo [in] Information about the web service. - } -begin - inherited Create; - // Create and initialise HTTP request object - fHTTP := THTTPEx.Create( - procedure (BytesReceived, BytesExpected: Int64) - begin - if fWantProgress and Assigned(fOnProgress) then - fOnProgress(Self, BytesReceived, BytesExpected); - end - ); - fHTTP.UserAgent := WebInfo.UserAgent; - fHTTP.MediaType := WebInfo.MediaType + ', */*'; - // Record script URI for future use - fScriptURI := WebInfo.ScriptURI; -end; - -destructor TBaseWebService.Destroy; - {Destructor. Tears down object. - } -begin - fHTTP.Free; - inherited; -end; - -procedure TBaseWebService.DoPostParams(const Params: TURIParams; - const PostProc: TProc); - {Helper method that assists in performing POST requests that send encoded - query strings. Converts query string to raw data, sets required content type - then hands off actual POST request to a provided anonymous method. - @param Params [in] Parameters to be POSTed. - @param PostProc [in] Anonymous method that performs POST request and - processes response. - } -var - Data: TStream; // contains data sent to web service as part of POST request -begin - // Create URI encoded parameters and store in stream. Encoded parameters are - // in ASCII format - Data := TBytesStream.Create( - TEncoding.ASCII.GetBytes(Params.EncodedQueryString) - ); - Data.Position := 0; - try - // Perform POST - fHTTP.ContentType := 'application/x-www-form-urlencoded'; - try - PostProc(Data); - finally - fHTTP.ContentType := ''; - end; - finally - Data.Free; - end; -end; - -function TBaseWebService.GetRaw(const ResourcePath: string; - const Params: TURIParams = nil): TBytes; - {Performs a GET request on web service with optional query string and returns - response as raw data. - @param ResourcePath [in] Path to append to web service URI to specify - resource in REST APIs. - @param Params [in] Optional parameters to include in query string. - @return Response as raw byte array. - } -begin - Result := fHTTP.GetRaw(BuildURI(ResourcePath, Params)); -end; - -function TBaseWebService.GetResponseCharSet: string; - {Read accessor for ResponseCharSet property. - @return Character set used by last HTTP response. - } -begin - Result := fHTTP.ResponseCharSet; -end; - -procedure TBaseWebService.GetStrings(const ResourcePath: string; - const Strings: TStrings); - {Performs a GET request on web service and stores response in string list. - @param ResourcePath [in] Path to append to web service URI to specify - resource in REST APIs. - @params Strings [in] String list that receives response. - } -begin - GetStrings(ResourcePath, nil, Strings); -end; - -procedure TBaseWebService.GetStrings(const ResourcePath: string; - const Params: TURIParams; const Strings: TStrings); - {Performs a GET request on web service with query string and stores response - in string list. - @param ResourcePath [in] Path to append to web service URI to specify - resource in REST APIs. - @param Params [in] Parameters to include in query string. May be empty or - nil. - } -begin - Strings.Text := StrTrim(GetText(ResourcePath, Params)); -end; - -function TBaseWebService.GetText(const ResourcePath: string; - const Params: TURIParams = nil): string; - {Performs a GET request on web service with optional query string and returns - response as text. - @param ResourcePath [in] Path to append to web service URI to specify - resource in REST APIs. - @param Params [in] Optional parameters to include in query string. - @return Response as text, decoded according to response header. - } -begin - Result := fHTTP.GetText(BuildURI(ResourcePath, Params)); -end; - -function TBaseWebService.PostRaw(const Params: TURIParams): TBytes; - {Performs a POST request on web service sending query strings and returns - response as raw data. - @param Params [in] Parameters to be posted. Must not be nil. - @return Response as raw byte array. - } -var - RetVal: TBytes; // return value from POST request -begin - DoPostParams( - Params, - procedure(Data: TStream) - begin - RetVal := PostRaw(Data) - end - ); - Result := RetVal; -end; - -function TBaseWebService.PostRaw(const Data: TStream): TBytes; - {Performs a POST request on web service sending data from a stream and returns - response as raw data. - @param Data [in] Data to be posted. Must not be nil. - @return Response as raw byte array. - } -var - RequestData: TBytes; // request data as byte array -begin - SetLength(RequestData, Data.Size); - Data.Position := 0; - Data.ReadBuffer(Pointer(RequestData)^, Data.Size); - Result := fHTTP.PostRaw(fScriptURI, RequestData); -end; - -procedure TBaseWebService.PostStrings(const Params: TURIParams; - const Strings: TStrings); - {Performs a POST request on web service sending query strings and stores - response in a string list. - @param Params [in] Parameters to be posted. Must not be nil. - @param Strings [in] String list that receives response. - } -begin - Strings.Text := StrTrim(PostText(Params)); -end; - -procedure TBaseWebService.PostStrings(const Data: TBytes; - const Strings: TStrings); - {Performs a POST request on web service sending data from a byte array and - stores response in a string list. - @param Data [in] Data to be posted. - @param Strings [in] String list that receives response. - } -begin - Strings.Text := StrTrim(PostText(Data)); -end; - -procedure TBaseWebService.PostStrings(const Data: TStream; - const Strings: TStrings); - {Performs a POST request on web service sending data from a stream and stores - response in a string list. - @param Data [in] Data to be posted. Must not be nil. - @param Strings [in] String list that receives response. - } -begin - Strings.Text := StrTrim(PostText(Data)); -end; - -function TBaseWebService.PostText(const Params: TURIParams): string; - {Performs a POST request on web service sending query strings and returns - response as text. - @param Params [in] Parameters to be posted. Must not be nil. - @return Response as text, decoded according to response header. - } -var - RetVal: string; // return value from POST request -begin - DoPostParams( - Params, - procedure(Data: TStream) - begin - RetVal := PostText(Data); - end - ); - Result := RetVal; -end; - -function TBaseWebService.PostText(const Data: TBytes): string; - {Performs a POST request on web service sending data from a byte array and - returns response as text. - @param Data [in] Data to be posted. - @return Response as text, decoded according to response header. - } -begin - Result := fHTTP.PostText(fScriptURI, Data); -end; - -function TBaseWebService.PostText(const Data: TStream): string; - {Performs a POST request on web service sending data from a stream and returns - response as text. - @param Data [in] Data to be posted. Must not be nil. - @return Response as text, decoded according to response header. - } -var - RequestData: TBytes; // request data as byte array -begin - SetLength(RequestData, Data.Size); - Data.Position := 0; - Data.ReadBuffer(Pointer(RequestData)^, Data.Size); - Result := PostText(RequestData); -end; - -end. - diff --git a/Src/Web.UDownloadMonitor.pas b/Src/Web.UDownloadMonitor.pas deleted file mode 100644 index aa9c95447..000000000 --- a/Src/Web.UDownloadMonitor.pas +++ /dev/null @@ -1,235 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Manages download progress reporting for objects that interact with web - * service. -} - - - -unit Web.UDownloadMonitor; - - -interface - - -uses - // Indy - IdHTTP, IdComponent, IdGlobal {needed for conditional defines below}; - - -// TWorkEvent and TWorkBeginEvent have different signatures between Indy v10.1.x -// and v10.2.x and later. The following is an attempt to decide which signature -// to use. Should this unit fail to compile, you can define INDY_WORKEVENT_INT64 -// in the project options or on the compiler command line to override this -// code. Define INDY_WORKEVENT_INT64 to use a Int64 parameter and or define -// INDY_WORKEVENT_INT32 to use a 32 bit integer as the last paramter of both -// event handler types. -{$IF not Defined(INDY_WORKEVENT_INT64) and not Defined(INDY_WORKEVENT_INT64)} - {$IF gsIdVersion >= '10.2'} - {$DEFINE INDY_WORKEVENT_INT64} - {$UNDEF INDY_WORKEVENT_INT32} - {$ELSE} - {$UNDEF INDY_WORKEVENT_INT64} - {$DEFINE INDY_WORKEVENT_INT32} - {$IFEND} -{$IFEND} -{$IF Defined(INDY_WORKEVENT_INT32) and Defined(INDY_WORKEVENT_INT64)} - {$MESSAGE FATAL - 'Can''t define both INDY_WORKEVENT_INT32 and INDY_WORKEVENT_INT32'} -{$IFEND} - - -type - - { - TDownloadMonitorCallback: - Type of callback method called by TDownloadMonitor when download information - changes. - } - TDownloadMonitorCallback = procedure of object; - - { - TDownloadMonitor: - Manages download progress reporting for web service object. - } - TDownloadMonitor = class(TObject) - strict private - fCallback: TDownloadMonitorCallback; - {Reference to method called to notify changes in download state} - fBytesExpected: Integer; - {Number of bytes expected in current download} - fBytesReceived: Integer; - {Number of bytes received to date in curent download} - procedure HTTPWorkHandler(Sender: TObject; AWorkMode: TWorkMode; - AWorkCount: - {$IFDEF INDY_WORKEVENT_INT64}Int64{$ENDIF} - {$IFDEF INDY_WORKEVENT_INT32}Integer{$ENDIF}); - {Handles Indy HTTP client's OnWork event. We process only download events. - Upload events are ignored. Updates record of bytes received. - @param Sender [in] Not used. - @param AWorkMode [in] Whether download (read) or upload (write) event. - @param AWorkCount [in] Number of bytes received to date. - } - procedure HTTPWorkBeginHandler(Sender: TObject; AWorkMode: TWorkMode; - AWorkCountMax: - {$IFDEF INDY_WORKEVENT_INT64}Int64{$ENDIF} - {$IFDEF INDY_WORKEVENT_INT32}Integer{$ENDIF}); - {Handles Indy HTTP client's OnWorkBegin event. We process only download - events. Upload events are ignored. Records number of expected bytes in - download. - @param Sender [in] Not used. - @param AWorkMode [in] Whether download (read) or upload (write) event. - @param AWorkCountMax [in] Number of bytes expected in download. - } - procedure HTTPWorkEndHandler(Sender: TObject; AWorkMode: TWorkMode); - {Handles Indy HTTP client's OnWorkEnd event. We process only download - events. Upload events are ignored. Finalises download. - @param Sender [in] Not used. - @param AWorkMode [in] Whether download (read) or upload (write) event. - } - procedure NotifyChange; - {Notifies change in download state by calling callback method. - } - procedure Init(const BytesExpected: Integer); - {Initialises new download. - @param BytesExpected [in] Number of bytes to be downloaded. - } - procedure Update(const BytesReceived: Integer); - {Updates download statistics. - @param BytesReceived [in] Number of bytes received to date. - } - procedure Done; - {Finalises a download. Adjusts bytes received and calls callback. - } - public - constructor Create(const HTTP: TIdHTTP; - const Callback: TDownloadMonitorCallback); - {Class constructor. Sets up object to monitor downloads received by Indy - HTTP components. - @param HTTP [in] Reference to Indy HTTP component we use to intercept - download events. Must not be nil. - @param Callback [in] Method to call to notify of download updates. Must - not be nil. - } - property BytesReceived: Integer - read fBytesReceived; - {Total number of bytes received in current download} - property BytesExpected: Integer - read fBytesExpected; - {Total number of bytes expected in current download} - end; - - -implementation - - -{ TDownloadMonitor } - -constructor TDownloadMonitor.Create(const HTTP: TIdHTTP; - const Callback: TDownloadMonitorCallback); - {Class constructor. Sets up object to monitor downloads received by Indy HTTP - components. - @param HTTP [in] Reference to Indy HTTP component we use to intercept - download events. Must not be nil. - @param Callback [in] Method to call to notify of download updates. Must not - be nil. - } -begin - Assert(Assigned(HTTP), ClassName + '.Create: HTTP is nil'); - Assert(Assigned(Callback), ClassName + '.Create: Callback is nil'); - inherited Create; - HTTP.OnWork := HTTPWorkHandler; - HTTP.OnWorkBegin := HTTPWorkBeginHandler; - HTTP.OnWorkEnd := HTTPWorkEndHandler; - fCallback := Callback; -end; - -procedure TDownloadMonitor.Done; - {Finalises a download. Adjusts bytes received and calls callback. - } -begin - fBytesReceived := fBytesExpected; - NotifyChange; -end; - -procedure TDownloadMonitor.HTTPWorkBeginHandler(Sender: TObject; - AWorkMode: TWorkMode; - AWorkCountMax: - {$IFDEF INDY_WORKEVENT_INT64}Int64{$ENDIF} - {$IFDEF INDY_WORKEVENT_INT32}Integer{$ENDIF}); - {Handles Indy HTTP client's OnWorkBegin event. We process only download - events. Upload events are ignored. Records number of expected bytes in - download. - @param Sender [in] Not used. - @param AWorkMode [in] Whether download (read) or upload (write) event. - @param AWorkCountMax [in] Number of bytes expected in download. - } -begin - if AWorkMode = wmRead then - Init(AWorkCountMax) -end; - -procedure TDownloadMonitor.HTTPWorkEndHandler(Sender: TObject; - AWorkMode: TWorkMode); - {Handles Indy HTTP client's OnWorkEnd event. We process only download events. - Upload events are ignored. Finalises download. - @param Sender [in] Not used. - @param AWorkMode [in] Whether download (read) or upload (write) event. - } -begin - if AWorkMode = wmRead then - Done; -end; - -procedure TDownloadMonitor.HTTPWorkHandler(Sender: TObject; - AWorkMode: TWorkMode; - AWorkCount: - {$IFDEF INDY_WORKEVENT_INT64}Int64{$ENDIF} - {$IFDEF INDY_WORKEVENT_INT32}Integer{$ENDIF}); - {Handles Indy HTTP client's OnWork event. We process only download events. - Upload events are ignored. Updates record of bytes received. - @param Sender [in] Not used. - @param AWorkMode [in] Whether download (read) or upload (write) event. - @param AWorkCount [in] Number of bytes received to date. - } -begin - if AWorkMode = wmRead then - Update(AWorkCount); -end; - -procedure TDownloadMonitor.Init(const BytesExpected: Integer); - {Initialises new download. - @param BytesExpected [in] Number of bytes to be downloaded. - } -begin - fBytesExpected := BytesExpected; - fBytesReceived := 0; - NotifyChange; -end; - -procedure TDownloadMonitor.NotifyChange; - {Notifies change in download state by calling callback method. - } -begin - fCallback; -end; - -procedure TDownloadMonitor.Update(const BytesReceived: Integer); - {Updates download statistics. - @param BytesReceived [in] Number of bytes received to date. - } -begin - fBytesReceived := BytesReceived; - NotifyChange; -end; - -end. - diff --git a/Src/Web.UExceptions.pas b/Src/Web.UExceptions.pas deleted file mode 100644 index f23240b4b..000000000 --- a/Src/Web.UExceptions.pas +++ /dev/null @@ -1,194 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Provides exception classes used by web services classes and code. -} - - -unit Web.UExceptions; - - -interface - - -uses - // Delphi - SysUtils, - // Indy - IdHTTP, - // Project - UExceptions; - - -type - - { - EWebError: - Base class for exceptions raised by any code that accesses the web. - } - EWebError = class(ECodeSnip); - - { - EHTTPError: - Exception raised when web server HTTP error is detected. - } - EHTTPError = class(EWebError) - strict private - fHTTPErrorCode: Integer; // HTTPErrorCode property value - public - constructor Create(const E: EIdHTTPProtocolException); overload; - {Constructor. Creates object from properties of given exception. - @param E [in] Instance of exception from which to create this exception. - E.ReplyErrorCode is stored in HTTPErrorCode property and E.Message is - stored in Message property. - } - procedure Assign(const E: Exception); override; - {Assigns properties of another exception to this one. - @param E [in] Exception whose properties are to be copied. Must be an - EHTTPError or an EIdHTTPProtocolException instance. - } - property HTTPErrorCode: Integer read fHTTPErrorCode; - {HTTP error code from web server} - end; - - { - EWebTransmissionError: - Type of exception raised when an error in transmission over the net is - detected. - } - EWebTransmissionError = class(EWebError); - - { - EWebConnectionError: - Exception raised when there is a problem connecting to web server (i.e. - socket error). - } - EWebConnectionError = class(EWebError); - - { - EWebService: - Base class for all errors generated by web services. None of these - exceptions are treated as bugs. - } - EWebService = class(EWebError); - - { - EWebServiceFailure: - Exception raised when the web service fails to response as expected. - } - EWebServiceFailure = class(EWebService); - - { - EWebServiceError: - Exception raised when a web service returns an error condition as a response - to a command. It has a non-zero error code in addition to the error message. - } - EWebServiceError = class(EWebService) - strict private - fErrorCode: Integer; // Value of ErrorCode property - public - constructor Create(const Msg: string; const ErrorCode: Integer = -1); - overload; - {Constructor. Constructs exception object with an error code in addition - to standard error message. - @param Message [in] Error message. - @param ErrorCode [in] Optional non-zero error code (defaults to -1). - } - constructor CreateFmt(const Fmt: string; const Args: array of const; - const ErrorCode: Integer = -1); overload; - {Constructor. Constructs exception object with an error code in addition - to message built from format string and arguments. - @param Fmt [in] Format for message string. - @param Args [in] Arguments to be included in formatted message string. - @param ErrorCode [in] Optional non-zero error code (defaults to -1). - } - procedure Assign(const E: Exception); override; - {Assigns properties of another exception to this one. - @param E [in] Exception whose properties are to be copied. Must be an - EWebServiceError instance. - } - property ErrorCode: Integer read fErrorCode; - {Non-zero error code} - end; - - -implementation - - -{ EHTTPError } - -procedure EHTTPError.Assign(const E: Exception); - {Assigns properties of another exception to this one. - @param E [in] Exception whose properties are to be copied. Must be an - EHTTPError or an EIdHTTPProtocolException instance. - } -begin - Assert((E is EHTTPError) or (E is EIdHTTPProtocolException), - ClassName + '.Assign: E must be EHTTPError or EIdHTTPProtocolException'); - inherited; - if E is EHTTPError then - fHTTPErrorCode := (E as EHTTPError).fHTTPErrorCode - else - fHTTPErrorCode := (E as EIdHTTPProtocolException).ErrorCode; -end; - -constructor EHTTPError.Create(const E: EIdHTTPProtocolException); - {Constructor. Creates object from properties of given exception. - @param E [in] Instance of exception from which to create this exception. - E.ReplyErrorCode is stored in HTTPErrorCode property and E.Message is - stored in Message property. - } -begin - inherited Create(E.Message); - fHTTPErrorCode := E.ErrorCode; -end; - -{ EWebServiceError } - -procedure EWebServiceError.Assign(const E: Exception); - {Assigns properties of another exception to this one. - @param E [in] Exception whose properties are to be copied. Must be an - EWebServiceError instance. - } -begin - Assert(E is EWebServiceError, - ClassName + '.Assign: E must be EWebServiceError'); - inherited; - fErrorCode := (E as EWebServiceError).fErrorCode; -end; - -constructor EWebServiceError.Create(const Msg: string; - const ErrorCode: Integer); - {Constructor. Constructs exception object with an error code in addition - to standard error message. - @param Message [in] Error message. - @param ErrorCode [in] Optional non-zero error code (defaults to -1). - } -begin - Assert(ErrorCode <> 0, ClassName + '.Create: zero error code'); - inherited Create(Msg); - fErrorCode := ErrorCode; -end; - -constructor EWebServiceError.CreateFmt(const Fmt: string; - const Args: array of const; const ErrorCode: Integer); - {Constructor. Constructs exception object with an error code in addition to - message built from format string and arguments. - @param Fmt [in] Format for message string. - @param Args [in] Arguments to be included in formatted message string. - @param ErrorCode [in] Optional non-zero error code (defaults to -1). - } -begin - Assert(ErrorCode <> 0, ClassName + '.CreateFmt: zero error code'); - Create(Format(Fmt, Args), ErrorCode); -end; - -end. - diff --git a/Src/Web.UHTTPEx.pas b/Src/Web.UHTTPEx.pas deleted file mode 100644 index 7b1437f08..000000000 --- a/Src/Web.UHTTPEx.pas +++ /dev/null @@ -1,521 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ - * - * Class that makes HTTP requests over the internet. Correctly decodes text - * according to the character set defined in the HTTP response and validates - * responses that include a checksum. Uses Indy components to make the actual - * HTTP request. -} - - -unit Web.UHTTPEx; - - -interface - - -uses - // Delphi - SysUtils, Classes, - // Indy - IdHTTP, IdAntiFreeze, IdException, - // Project - UURIParams, Web.UDownloadMonitor; - - -type - - { - THTTPDownloadProgressProc: - Type of closure provided to THTTPEx constructor when download progress - reports are required. - @param BytesReceived [in] Number of bytes received to date. - @param BytesExpected [in] Total number of bytes expected in download. - } - THTTPDownloadProgressProc = reference to procedure(BytesReceived, - BytesExpected: Int64); - - { - THTTPEx: - Class that makes HTTP requests over the internet and processes responses - according to response header information. Text responses are correctly - decoded according to the response character set and any provided checksums - are validated. - } - THTTPEx = class(TObject) - strict private - var - fHTTP: TIdHTTP; // Component used for HTTP requests - fDownloadMonitor: TDownloadMonitor; // Monitors download progress - fProgress: THTTPDownloadProgressProc; // Closure used to report progress - fMediaType: string; // Value of MediaType property - class var - fAntiFreeze: TIdAntiFreeze; // Prevents HTTP requests blocking - function GetUserAgent: string; - {Read accessor for UserAgent property. - @return String describing user agent. - } - procedure SetUserAgent(const Value: string); - {Write accessor for UserAgent property. - @param Value [in] New property value. - } - procedure SetMediaType(const Value: string); - {Write accessor for MediaType property. - @param Value [in] New property value. - } - function GetContentType: string; - {Read accessor for ContentType property. - @return String describing content type. - } - procedure SetContentTtype(const Value: string); - {Write accessor for ContentType property. - @param Value [in] New property value. - } - function GetResponseCharSet: string; - {Read accessor for ResponseCharSet property. - @return String containing character set. - } - strict protected - function DoRequestText(const Requestor: TProc): string; - {Performs an HTTP request returning response as text decoded according to - code page specified in HTTP response. - @param Requestor [in] Closure that performs a suitable HTTP request. - @return Response as text. - } - function DoRequestRaw(const Requestor: TProc): TBytes; - {Performs an HTTP request returning response as raw data. - @param Requestor [in] Closure that performs a suitable HTTP request. - @return Response as raw data. - } - procedure DoProgress; - {Event handler for download monitor's OnProgress event. - } - procedure HandleException(const E: EIdException); - {Handles exceptions raised when performing HTTP requests. Converts some - Indy exception types to alternative application exception types. - @param E [in] Exception to be handled. - @except An exception of either converted or original type is always - raised. - } - procedure ValidateContent(const Content: TStream); - {Validates HTTP response data against MD5 checksum passed in response's - Content-MD5 header. Must only be called if Content-MD5 header is present. - @param Content [in] Stream containing content to be checked. - @except Exceptions are raised if Content-MD5 header is invalid or if - content checksum is invalid. - } - function ResponseHasChecksum: Boolean; - {Checks if HTTP response has a checksum included. - @return True if there is a checsum, False if not. - } - public - class constructor Create; - {Class constructor. Creates instance of Indy's antifreeze component of - which there must only be one per application. - } - class destructor Destroy; - {Class destructor. Frees the Indy antifreeze singleton. - } - constructor Create(Progress: THTTPDownloadProgressProc); overload; - {Object constructor. Creates object with progress reporting via provided - closure. - @param Progress [in] Closure that handles progress report events. - } - constructor Create; overload; - {Object constructor. Creates object with no progress reporting. - } - destructor Destroy; override; - {Object destructor. Tears down object and frees resources. - } - function GetRaw(const URI: string): TBytes; - {Performs an HTTP GET request returning response as raw data. - @param URI [in] URI to use for request. - @return Response as raw data. - } - function GetText(const URI: string): string; - {Performs an HTTP GET request returning response as text decoded according - to code page specified in HTTP response. - @param URI [in] URI to use for request. - @return Response as text. - } - function PostRaw(const URI: string; const RequestData: TBytes): TBytes; - {Performs an HTTP POST request returning response as raw data. - @param URI [in] URI to use for request. - @param RequestData [in] Data sent as part of request. - @return Response as raw data. - } - function PostText(const URI: string; const RequestData: TBytes): string; - {Performs an HTTP POST request returning response as text decoded - according to code page specified in HTTP response. - @param URI [in] URI to use for request. - @param RequestData [in] Data sent as part of request. - @return Response as text. - } - property UserAgent: string read GetUserAgent write SetUserAgent; - {User agent to be sepcified when making HTTP requests} - property MediaType: string read fMediaType write SetMediaType; - {Media type specified when making HTTP requests} - property ContentType: string read GetContentType write SetContentTtype; - {Content type specified when making HTTP requests} - property ResponseCharSet: string read GetResponseCharSet; - {Character set used for HTTP response} - end; - - -implementation - - -uses - // Indy - IdCoderMIME, IdStack, - // 3rd party - PJMD5, - // Project - UConsts, UStrUtils, Web.UCharEncodings, Web.UExceptions, Web.UInfo; - - -resourcestring - // Error messages - sWebConnectionError = 'There was a problem accessing the internet. Please ' - + 'check your web connection. ' - + 'If you are using a proxy server please check its configuration.' - + EOL2 - + 'The error reported by Windows was: %0:s.'; - sWebValidationError = 'Validation error: checksum failed. This may have been ' - + 'a transmission error.'; - sWebBase64Error = 'Validation error: checksum not transmitted correctly.'; - - -function Base64Decode(const EncodedText: string): TBytes; - {Decodes Base64 encoded text into raw data. - @param EncodedText [in] Base64 encoded text. - @return Decoded data as byte array. - } -var - DecodedStm: TBytesStream; // stream that receives decoded data - Decoder: TIdDecoderMIME; // object used to perform decoding -begin - Decoder := TIdDecoderMIME.Create(nil); - try - DecodedStm := TBytesStream.Create; - try - Decoder.DecodeBegin(DecodedStm); - Decoder.Decode(EncodedText); - Decoder.DecodeEnd; - Result := DecodedStm.Bytes; - finally - DecodedStm.Free; - end; - finally - Decoder.Free; - end; -end; - -{ THTTPEx } - -constructor THTTPEx.Create; - {Constructor. Creates object with no progress reporting. - } -begin - // Pass a do-nothing closure to main constructor - Create(procedure(Received, Expected: Int64) begin end); -end; - -constructor THTTPEx.Create(Progress: THTTPDownloadProgressProc); - {Constructor. Creates object with progress reporting via provided closure. - @param Progress [in] Closure that handles progress report events. - } -var - ProxyInfo: TWebProxyInfo; // details of any proxy server -begin - inherited Create; - fHTTP := TIdHTTP.Create(nil); - fHTTP.HTTPOptions := fHTTP.HTTPOptions - [hoForceEncodeParams]; - fHTTP.Request.AcceptCharSet := TWebCharEncodings.AcceptCharSet; - fHTTP.Request.AcceptLanguage := 'en-gb, en;q=0.8'; - // Get proxy info - ProxyInfo := TWebInfo.WebProxyInfo; - if ProxyInfo.UseProxy then - begin - fHTTP.ProxyParams.ProxyServer := ProxyInfo.IPAddress; - fHTTP.ProxyParams.ProxyPort := ProxyInfo.Port; - fHTTP.ProxyParams.ProxyUsername := ProxyInfo.UserName; - fHTTP.ProxyParams.ProxyPassword := ProxyInfo.Password; - end; - // Set up download progress monitoring - fProgress := Progress; - fDownloadMonitor := TDownloadMonitor.Create(fHTTP, DoProgress); -end; - -class constructor THTTPEx.Create; - {Class constructor. Creates instance of Indy's antifreeze component of which - there must only be one per application. - } -begin - fAntiFreeze := TIdAntiFreeze.Create(nil); -end; - -destructor THTTPEx.Destroy; - {Destructor. Tears down object and frees resources. - } -begin - fDownloadMonitor.Free; - fHTTP.Free; - inherited; -end; - -class destructor THTTPEx.Destroy; - {Class destructor. Frees the Indy antifreeze singleton. - } -begin - fAntiFreeze.Free; -end; - -procedure THTTPEx.DoProgress; - {Event handler for download monitor's OnProgress event. - } -begin - // Call user-supplied closure used to do reporting - fProgress(fDownloadMonitor.BytesReceived, fDownloadMonitor.BytesExpected); -end; - -function THTTPEx.DoRequestRaw(const Requestor: TProc): TBytes; - {Performs an HTTP request returning response as raw data. - @param Requestor [in] Closure that performs a suitable HTTP request. - @return Response as raw data. - } -var - Response: TBytesStream; // receives response from web service as raw bytes -begin - // Set up request - Response := TBytesStream.Create; - try - // Do request, recording response in byte stream - try - Requestor(Response); - except - on E: EIdException do - HandleException(E); - end; - Response.Position := 0; - // Process reponse - if fHTTP.Response.HasContentLength then - Response.SetSize(fHTTP.Response.ContentLength); - if ResponseHasChecksum then - // Response has MD5 checksum: check content is OK - ValidateContent(Response); - Result := Response.Bytes; - finally - Response.Free; - end; -end; - -function THTTPEx.DoRequestText(const Requestor: TProc): string; - {Performs an HTTP request returning response as text decoded according to - code page specified in HTTP response. - @param Requestor [in] Closure that performs a suitable HTTP request. - @return Response as text. - } -var - Content: TBytes; // raw data received from web service - Encoding: TEncoding; // encoding specified as part of HTTP response -begin - // Perform request, getting raw content - Content := DoRequestRaw(Requestor); - // Get text from raw data, decoded according to HTTP response header - Encoding := TWebCharEncodings.GetEncoding(GetResponseCharSet); - try - Result := Encoding.GetString(Content); - finally - TWebCharEncodings.FreeEncoding(Encoding); - end; -end; - -function THTTPEx.GetContentType: string; - {Read accessor for ContentType property. - @return String describing content type. - } -begin - Result := fHTTP.Request.ContentType; -end; - -function THTTPEx.GetRaw(const URI: string): TBytes; - {Performs an HTTP GET request returning response as raw data. - @param URI [in] URI to use for request. - @return Response as raw data. - } -begin - Result := DoRequestRaw( - procedure(ResponseStream: TBytesStream) - begin - fHTTP.Get(URI, ResponseStream) - end - ); -end; - -function THTTPEx.GetResponseCharSet: string; - {Read accessor for ResponseCharSet property. - @return String containing character set. - } -begin - if fHTTP.Response.CharSet <> '' then - Result := fHTTP.Response.CharSet - else - Result := TWebCharEncodings.DefaultCharSet; -end; - -function THTTPEx.GetText(const URI: string): string; - {Performs an HTTP GET request returning response as text decoded according to - code page specified in HTTP response. - @param URI [in] URI to use for request. - @return Response as text. - } -begin - Result := DoRequestText( - procedure(ResponseStream: TBytesStream) - begin - fHTTP.Get(URI, ResponseStream) - end - ) -end; - -function THTTPEx.GetUserAgent: string; - {Read accessor for UserAgent property. - @return String describing user agent. - } -begin - Result := fHTTP.Request.UserAgent; -end; - -procedure THTTPEx.HandleException(const E: EIdException); - {Handles exceptions raised when performing HTTP requests. Converts some Indy - exception types to alternative application exception types. - @param E [in] Exception to be handled. - @except An exception of either converted or original type is always raised. - } -begin - if E is EIdHTTPProtocolException then - raise EHTTPError.Create(E as EIdHTTPProtocolException) - else if E is EIdSocketError then - raise EWebConnectionError.CreateFmt( - sWebConnectionError, [StrTrim(E.Message)] - ) - else - raise E; -end; - -function THTTPEx.PostRaw(const URI: string; const RequestData: TBytes): TBytes; - {Performs an HTTP POST request returning response as raw data. - @param URI [in] URI to use for request. - @param RequestData [in] Data sent as part of request. - @return Response as raw data. - } -var - RequestStream: TBytesStream; // stream to contain request data -begin - RequestStream := TBytesStream.Create(RequestData); - try - Result := DoRequestRaw( - procedure(ResponseStream: TBytesStream) - begin - fHTTP.Post(URI, RequestStream, ResponseStream) - end - ); - finally - RequestStream.Free; - end; -end; - -function THTTPEx.PostText(const URI: string; const RequestData: TBytes): string; - {Performs an HTTP POST request returning response as text decoded according to - code page specified in HTTP response. - @param URI [in] URI to use for request. - @param RequestData [in] Data sent as part of request. - @return Response as text. - } -var - RequestStream: TBytesStream; // stream to contain request data -begin - RequestStream := TBytesStream.Create(RequestData); - try - Result := DoRequestText( - procedure(ResponseStream: TBytesStream) - begin - fHTTP.Post(URI, RequestStream, ResponseStream) - end - ); - finally - RequestStream.Free; - end; -end; - -function THTTPEx.ResponseHasChecksum: Boolean; - {Checks if HTTP response has a checksum included. - @return True if there is a checsum, False if not. - } -begin - Result := fHTTP.Response.RawHeaders.IndexOfName('Content-MD5') >= 0; -end; - -procedure THTTPEx.SetContentTtype(const Value: string); - {Write accessor for ContentType property. - @param Value [in] New property value. - } -begin - fHTTP.Request.ContentType := Value; -end; - -procedure THTTPEx.SetMediaType(const Value: string); - {Write accessor for MediaType property. - @param Value [in] New property value. - } -begin - fMediaType := Value; - fHTTP.Request.Accept := fMediaType + ', */*'; -end; - -procedure THTTPEx.SetUserAgent(const Value: string); - {Write accessor for UserAgent property. - @param Value [in] New property value. - } -begin - fHTTP.Request.UserAgent := Value; -end; - -procedure THTTPEx.ValidateContent(const Content: TStream); - {Validates HTTP response data against MD5 checksum passed in response's - Content-MD5 header. Must only be called if Content-MD5 header is present. - @param Content [in] Stream containing content to be checked. - @except Exceptions are raised if Content-MD5 header is invalid or if content - checksum is invalid. - } -var - HeaderMD5Encoded: string; // encoded md5 from Content-MD5 header - HeaderMD5: TPJMD5Digest; // decoded md5 from Content-MD5 header - ContentMD5: TPJMD5Digest; // md5 of Content stream -begin - Assert(ResponseHasChecksum, - ClassName + '.ValidateContent: No Content-MD5 header present in response'); - // get MD5 from header - HeaderMD5Encoded := fHTTP.Response.RawHeaders.Values['Content-MD5']; - try - HeaderMD5 := Base64Decode(HeaderMD5Encoded); - except - raise EWebTransmissionError.Create(sWebBase64Error); - end; - // calculate MD5 of received content - ContentMD5 := TPJMD5.Calculate(Content); - // check that both MD5s are same and raise exception if not - if HeaderMD5 <> ContentMD5 then - raise EWebTransmissionError.Create(sWebValidationError); -end; - -end. - From c7d533cfdb67ac1aa7d019dbe57b664cc54c02a8 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 06:21:12 +0000 Subject: [PATCH 106/714] Removed dependency on the Indy components Modified build documentation accordingly --- Build.html | 87 ++-------------------------------------------------- Src/Makefile | 6 +--- 2 files changed, 4 insertions(+), 89 deletions(-) diff --git a/Build.html b/Build.html index 0f319dd3b..a5cc00076 100644 --- a/Build.html +++ b/Build.html @@ -95,62 +95,12 @@

      Several DelphiDabbler and other 3rd party libraries and components are - required to compile CodeSnip, most of which are included in the code - repository in the Src/3rdParty directory. Code not included in - the repository is noted below. + required to compile CodeSnip. They are included in the code + repository in the Src/3rdParty directory.

      -

      - Indy libraries v10 -

      - -

      - The Indy 10 Internet components ship with Delphi XE. - If you prefer to work with the latest release you can download it from http://www.indyproject.org/. If you download a copy of Indy 10 you - should compile the source code separately with the same version of Delphi - that is being used to compile CodeSnip. -

      - -

      - Regardless of whether you are using the version of Indy 10 supplied with - Delphi or if you have downloaded and compiled your own version, you must set - the INDY10 environment variable to the directory where you - placed the compiled code. -

      - -

      - Changes between different Indy 10 releases -

      - -

      - Changes were made to the parameter lists of the TWorkBeginEvent - and TWorkEvent events between early and later releases of Indy - 10. Specifically, earlier versions use type Integer for the - AWorkCount parameter of TWorkEvent and the - AWorkCountMax parameter of TWorkBeginEvent, while - later versions use Int64. -

      - -

      - CodeSnip's source code uses conditional compilation to provide the - correct event handler signatures – and it makes an intelligent guess - at which signature to use depending on the version number provided by the - Indy library code. Should the program fail to compile with an error in the - Web.UDownloadMonitor unit, you should check the event signatures in - your Indy IdComponent unit and then define the - INDY_WORKEVENT_INT64 environment variable if Int64 - parameters are required or INDY_WORKEVENT_INT32 if - Integer parameters are used. -

      - -

      - Delphi RTL & VCL -

      -

      - Goes without saying really, but you need the RTL and VCL that ships with + Goes without saying really, but you will also need the RTL and VCL that ships with Delphi.

      @@ -230,23 +180,6 @@

      DELPHIROOT will be set to the value of DELPHIXE. -
      - INDY10 - required -
      -
      - Must be set to the directory where the Indy 10 components are installed. - The code must have been built with the same version of Delphi used to - compile CodeSnip. -
      -
      - INDY_WORKEVENT_INT64 or - INDY_WORKEVENT_INT32 - optional -
      -
      - See above for details. If used, only one of - the environment variables may be defined. Defining both causes - compilation to fail. -

      @@ -391,9 +324,6 @@

    • DELPHIROOT or DELPHIXE
    • -
    • - INDY10 -

    @@ -440,17 +370,6 @@

    -

    - Step 4 -

    - -

    - Set INDY_WORKEVENT_INT64 or INDY_WORKEVENT_INT32 - if necessary (explained above). -

    -

    Get the Source Code

    diff --git a/Src/Makefile b/Src/Makefile index 26d7d7c6b..29d2d2417 100644 --- a/Src/Makefile +++ b/Src/Makefile @@ -24,10 +24,6 @@ DELPHIROOT = $(DELPHIXE) !error DELPHIROOT or DELPHIXE environment variable required. !endif -!ifndef INDY10 -!error INDY10 environment variable required. -!endif - # Define macros for required tools TLIBIMP = "$(DELPHIROOT)\Bin\TLibImp.exe" @@ -127,7 +123,7 @@ CodeSnip.exe: !ifdef PORTABLE @if exist $(EXE)\$(@F) copy $(EXE)\$(@F) $(EXE)\$(@F).bak !endif - @$(DCC32) $(@B).dpr -B -U"$(INDY10)" $(DELPHIDEFINES) + @$(DCC32) $(@B).dpr -B $(DELPHIDEFINES) !ifdef PORTABLE @copy $(EXE)\$(@F) $(EXE)\$(@B)-p.exe /Y @del $(EXE)\$(@F) From fbc363bcbbdada8809913a37a125664359b94063 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 06:28:06 +0000 Subject: [PATCH 107/714] Removed reference to Indy from License and About dialogue --- Docs/License.html | 82 +----------------------- Src/Res/HTML/dlg-about-program-tplt.html | 8 --- 2 files changed, 1 insertion(+), 89 deletions(-) diff --git a/Docs/License.html b/Docs/License.html index 43f8c1b22..0d004fb95 100644 --- a/Docs/License.html +++ b/Docs/License.html @@ -254,8 +254,7 @@

    All of CodeSnip's original source code, and some third party code, is available from the CodeSnip Subversion Repository. The exception is the Indy - Project source code, which must be obtained separately. + >CodeSnip Subversion Repository.

    Details of the license applying to a source code file will usually be @@ -269,31 +268,6 @@

    listed below.

      -
    • -
      - Indy Dual License -
      -
      - You may use the licensed code under the terms of either of the following - two licenses. -
      - -
      - Used by the Indy Project. Components from this project are - not included in the CodeSnip repository. -
      -
    • MD5 License @@ -1401,54 +1375,6 @@

      Exhibit A - Mozilla Public License.


      -

      - Indy Modified BSD License -

      - -

      Copyright

      - -

      Portions of this software are Copyright © 1993 - 2003, Chad Z. Hower - (Kudzu) and the Indy Pit Crew - http://www.IndyProject.org/

      - -

      License

      - -

      Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met:

      - -
        - -
      • Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer.
      • - -
      • Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation, about box and/or other materials provided with the - distribution.
      • - -
      • No personal names or organizations names associated with the Indy - project may be used to endorse or promote products derived from this - software without specific prior written permission of the specific - individual or organization.
      • - -
      - -

      THIS SOFTWARE IS PROVIDED BY Chad Z. Hower (Kudzu) and the Indy Pit Crew - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE.

      - -
      -

      MD5 License

      @@ -2393,12 +2319,6 @@

    • This software is based, in part, on the work of Anders Melander.
    • -
    • - Portions of this software are Copyright © 1993 - 2003, Chad Z. Hower - (Kudzu) and the Indy Pit Crew - http://www.IndyProject.org/. -
    • The TListViewEx component used in this program is copyright © 1999-2009 Vadim Crits. diff --git a/Src/Res/HTML/dlg-about-program-tplt.html b/Src/Res/HTML/dlg-about-program-tplt.html index 1ea073618..d75284a30 100644 --- a/Src/Res/HTML/dlg-about-program-tplt.html +++ b/Src/Res/HTML/dlg-about-program-tplt.html @@ -78,14 +78,6 @@
    • This software is based, in part, on the work of Anders Melander.
    • -
    • - Portions of this software are copyright © 1993 - 2003, Chad Z. - Hower (Kudzu) and the Indy Pit Crew - - http://www.IndyProject.org/. -
    • The TListViewEx component used in this program is copyright © 1999-2009 Vadim Crits. From 94b09d9bf904fb5adc33446bc7595ce836bcdf08 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 06:28:24 +0000 Subject: [PATCH 108/714] Added TODOs --- Src/CodeSnip.todo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index 7fa2209b4..67b1270c0 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,3 +1,5 @@ +{TODO -cDocs : Update License.html to replace references to SVN with Git} +{TODO -cDocs : Update Build.html to replace references to SVN with Git} {TODO -cFirstRun : Delete UpdateChecks section from Config file on first run} {TODO -cFirstRun : Delete Prefs:Updating section from Config file on first run} {TODO -cHelp : From ec617787b8d9f2c7a25979dfb2b3434d09caf5b5 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 17:45:42 +0000 Subject: [PATCH 109/714] Changed URL in copyright statements. Extended copyright date range to include 2020 in many files. Also deleted some Subversion related fields in many files where they were close to the copyright statement. --- Build.html | 5 +--- Docs/ChangeLogs/ChangeLog-v0.txt | 5 +--- Docs/ChangeLogs/ChangeLog-v1.txt | 5 +--- Docs/ChangeLogs/ChangeLog-v2.txt | 5 +--- Docs/ChangeLogs/ChangeLog-v3.txt | 5 +--- Docs/ChangeLogs/ChangeLog-v4.txt | 5 +--- Docs/Design/FileFormats/backup.html | 5 +--- Docs/Design/FileFormats/config.html | 5 +--- Docs/Design/FileFormats/export.html | 5 +--- Docs/Design/FileFormats/favourites.html | 5 +--- Docs/Design/FileFormats/index.html | 5 +--- Docs/Design/FileFormats/main-db-update.html | 5 +--- Docs/Design/FileFormats/main-db.html | 5 +--- Docs/Design/FileFormats/main.css | 5 +--- Docs/Design/FileFormats/saved.html | 5 +--- Docs/Design/FileFormats/selection.html | 5 +--- Docs/Design/FileFormats/test-unit.html | 5 +--- Docs/Design/FileFormats/user-db.html | 5 +--- Docs/LICENSE | 3 ++- Docs/License.html | 17 +++++------- Docs/MPL-2.0-Boilerplate.txt | 25 ++++-------------- Src/ActiveText.UHTMLRenderer.pas | 5 +--- Src/ActiveText.UMain.pas | 5 +--- Src/ActiveText.URTFRenderer.pas | 5 +--- Src/ActiveText.UTextRenderer.pas | 5 +--- Src/ActiveText.UValidator.pas | 5 +--- Src/Browser.IntfDocHostUI.pas | 5 +--- Src/Browser.UControlHelper.pas | 5 +--- Src/Browser.UController.pas | 5 +--- Src/Browser.UHTMLEvents.pas | 5 +--- Src/Browser.UHighlighter.pas | 5 +--- Src/Browser.UIOMgr.pas | 5 +--- Src/Browser.UNulUIHandler.pas | 5 +--- Src/Browser.UUIMgr.pas | 5 +--- Src/CodeSnip.dpr | 5 +--- Src/CompilerChecks.inc | 5 +--- Src/Compilers.UBDS.pas | 5 +--- Src/Compilers.UBorland.pas | 5 +--- Src/Compilers.UCompilerBase.pas | 5 +--- Src/Compilers.UCompilers.pas | 5 +--- Src/Compilers.UDelphi.pas | 5 +--- Src/Compilers.UFreePascal.pas | 5 +--- Src/Compilers.UGlobals.pas | 5 +--- Src/Compilers.URunner.pas | 5 +--- Src/Compilers.USearchDirs.pas | 5 +--- Src/DB.UCategory.pas | 5 +--- Src/DB.UDatabaseIO.pas | 5 +--- Src/DB.UMain.pas | 5 +--- Src/DB.UMetaData.pas | 2 +- Src/DB.USnippet.pas | 5 +--- Src/DB.USnippetKind.pas | 5 +--- Src/DBIO.UFileIOIntf.pas | 5 +--- Src/DBIO.UIniDataReader.pas | 5 +--- Src/DBIO.UNulDataReader.pas | 5 +--- Src/DBIO.UXMLDataIO.pas | 5 +--- Src/ExternalObj.ridl | 5 +--- Src/Favourites.UFavourites.pas | 5 +--- Src/Favourites.UManager.pas | 5 +--- Src/Favourites.UPersist.pas | 5 +--- Src/FirstRun.FmV4ConfigDlg.pas | 5 +--- Src/FirstRun.UConfigFile.pas | 5 +--- Src/FirstRun.UDatabase.pas | 5 +--- Src/FirstRun.UIniFile.pas | 5 +--- Src/FirstRun.UInstallInfo.pas | 5 +--- Src/FirstRun.UMain.pas | 5 +--- Src/FmAboutDlg.pas | 5 +--- Src/FmActiveTextPreviewDlg.pas | 5 +--- Src/FmAddCategoryDlg.pas | 5 +--- Src/FmBase.pas | 5 +--- Src/FmBugReportBaseDlg.pas | 5 +--- Src/FmCategoryEditDlg.pas | 5 +--- Src/FmCodeExportDlg.pas | 5 +--- Src/FmCodeImportDlg.pas | 5 +--- Src/FmCompErrorDlg.pas | 5 +--- Src/FmCompilersDlg.FrBase.pas | 5 +--- Src/FmCompilersDlg.FrCompiler.pas | 5 +--- Src/FmCompilersDlg.FrLog.pas | 5 +--- Src/FmCompilersDlg.FrNamespaces.pas | 5 +--- Src/FmCompilersDlg.FrSearchDirs.pas | 5 +--- Src/FmCompilersDlg.FrSwitches.pas | 5 +--- Src/FmCompilersDlg.UBannerMgr.pas | 5 +--- Src/FmCompilersDlg.UCompilerListMgr.pas | 5 +--- Src/FmCompilersDlg.pas | 5 +--- Src/FmDBUpdateDlg.pas | 2 +- Src/FmDeleteCategoryDlg.pas | 5 +--- Src/FmDependenciesDlg.pas | 5 +--- Src/FmDonateDlg.pas | 5 +--- Src/FmDuplicateSnippetDlg.pas | 5 +--- Src/FmEasterEgg.pas | 5 +--- Src/FmFavouritesDlg.pas | 5 +--- Src/FmFindCompilerDlg.pas | 5 +--- Src/FmFindTextDlg.pas | 5 +--- Src/FmFindXRefsDlg.pas | 5 +--- Src/FmGenericDlg.pas | 5 +--- Src/FmGenericModalDlg.pas | 5 +--- Src/FmGenericNonModalDlg.pas | 5 +--- Src/FmGenericOKDlg.pas | 5 +--- Src/FmGenericViewDlg.pas | 5 +--- Src/FmHelpAware.pas | 5 +--- Src/FmMain.pas | 5 +--- Src/FmNewHiliterNameDlg.pas | 5 +--- Src/FmPreferencesDlg.pas | 5 +--- Src/FmPreviewDlg.pas | 5 +--- Src/FmPrintDlg.pas | 5 +--- Src/FmProxyServerDlg.pas | 5 +--- Src/FmRenameCategoryDlg.pas | 5 +--- Src/FmSWAGImportDlg.pas | 5 +--- Src/FmSelectionSearchDlg.pas | 5 +--- ...FmSnippetsEditorDlg.FrActiveTextEditor.pas | 5 +--- Src/FmSnippetsEditorDlg.pas | 5 +--- Src/FmSplash.pas | 5 +--- Src/FmTestCompileDlg.pas | 5 +--- Src/FmTrappedBugReportDlg.pas | 5 +--- Src/FmUserBugReportDlg.pas | 5 +--- Src/FmUserDataPathDlg.pas | 5 +--- Src/FmUserHiliterMgrDlg.pas | 5 +--- Src/FmWaitDlg.pas | 5 +--- Src/FmWizardDlg.pas | 5 +--- Src/FrBrowserBase.pas | 5 +--- Src/FrCategoryDescEdit.pas | 5 +--- Src/FrCategoryList.pas | 5 +--- Src/FrCheckedTV.pas | 5 +--- Src/FrCodeGenPrefs.pas | 5 +--- Src/FrDetail.pas | 5 +--- Src/FrDetailView.pas | 5 +--- Src/FrDisplayPrefs.pas | 5 +--- Src/FrEasterEgg.pas | 5 +--- Src/FrFixedHTMLDlg.pas | 5 +--- Src/FrGeneralPrefs.pas | 5 +--- Src/FrHTMLDlg.pas | 5 +--- Src/FrHTMLPreview.pas | 5 +--- Src/FrHTMLTpltDlg.pas | 5 +--- Src/FrHiliterPrefs.pas | 5 +--- Src/FrMemoPreview.pas | 5 +--- Src/FrNewsPrefs.pas | 5 +--- Src/FrOverview.pas | 5 +--- Src/FrPrefsBase.pas | 5 +--- Src/FrPrintingPrefs.pas | 5 +--- Src/FrProgress.pas | 5 +--- Src/FrRTFPreview.pas | 5 +--- Src/FrRTFShowCase.pas | 5 +--- Src/FrSelectSnippets.pas | 5 +--- Src/FrSelectSnippetsBase.pas | 5 +--- Src/FrSelectUserSnippets.pas | 5 +--- Src/FrSnippetLayoutPrefs.pas | 5 +--- Src/FrSourcePrefs.pas | 5 +--- Src/FrTextPreview.pas | 5 +--- Src/FrTitled.pas | 5 +--- Src/HTML.hrc | 5 +--- Src/Help/CSS/codesnip.css | 5 +--- Src/Help/CodeSnip.hhp | 2 +- Src/Help/HTML/about_compiler_checks.htm | 5 +--- Src/Help/HTML/about_swag.htm | 5 +--- Src/Help/HTML/detail_pane.htm | 5 +--- Src/Help/HTML/dlg_about.htm | 5 +--- Src/Help/HTML/dlg_addcategory.htm | 5 +--- Src/Help/HTML/dlg_backup.htm | 5 +--- Src/Help/HTML/dlg_configcompilers.htm | 5 +--- Src/Help/HTML/dlg_deletecategory.htm | 5 +--- Src/Help/HTML/dlg_dependencies.htm | 5 +--- Src/Help/HTML/dlg_dependencies_edit.htm | 5 +--- Src/Help/HTML/dlg_duplicatesnippet.htm | 5 +--- Src/Help/HTML/dlg_editsnippet.htm | 5 +--- Src/Help/HTML/dlg_elementcolour.htm | 5 +--- Src/Help/HTML/dlg_export.htm | 5 +--- Src/Help/HTML/dlg_exportfile.htm | 5 +--- Src/Help/HTML/dlg_favourites.htm | 5 +--- Src/Help/HTML/dlg_findcompiler.htm | 5 +--- Src/Help/HTML/dlg_findtext.htm | 5 +--- Src/Help/HTML/dlg_findxrefs.htm | 5 +--- Src/Help/HTML/dlg_firstrun.htm | 5 +--- Src/Help/HTML/dlg_hilitemgr.htm | 5 +--- Src/Help/HTML/dlg_import.htm | 5 +--- Src/Help/HTML/dlg_importfile.htm | 5 +--- Src/Help/HTML/dlg_loadselection.htm | 5 +--- Src/Help/HTML/dlg_moveuserdb.htm | 5 +--- Src/Help/HTML/dlg_pagesetup.htm | 5 +--- Src/Help/HTML/dlg_preferences.htm | 5 +--- Src/Help/HTML/dlg_prefs_codegen.htm | 5 +--- Src/Help/HTML/dlg_prefs_display.htm | 5 +--- Src/Help/HTML/dlg_prefs_general.htm | 5 +--- Src/Help/HTML/dlg_prefs_hiliter.htm | 5 +--- Src/Help/HTML/dlg_prefs_printing.htm | 5 +--- Src/Help/HTML/dlg_prefs_snippetlayout.htm | 5 +--- Src/Help/HTML/dlg_prefs_sourcecode.htm | 5 +--- Src/Help/HTML/dlg_prefs_updates.htm | 5 +--- Src/Help/HTML/dlg_print.htm | 5 +--- Src/Help/HTML/dlg_proxyserver.htm | 5 +--- Src/Help/HTML/dlg_renamecategory.htm | 5 +--- Src/Help/HTML/dlg_restore.htm | 5 +--- Src/Help/HTML/dlg_savehiliter.htm | 5 +--- Src/Help/HTML/dlg_saveselection.htm | 5 +--- Src/Help/HTML/dlg_savesnippet.htm | 5 +--- Src/Help/HTML/dlg_saveunit.htm | 5 +--- Src/Help/HTML/dlg_selectcompiler.htm | 5 +--- Src/Help/HTML/dlg_selectroutines.htm | 5 +--- Src/Help/HTML/dlg_swagimport.htm | 5 +--- Src/Help/HTML/dlg_testcompile.htm | 5 +--- Src/Help/HTML/dlg_trappedbugreport.htm | 5 +--- Src/Help/HTML/dlg_update.htm | 5 +--- Src/Help/HTML/dlg_userbugreport.htm | 5 +--- .../HTML/explain_all_compilers_hidden.htm | 5 +--- Src/Help/HTML/faqs.htm | 5 +--- Src/Help/HTML/license.htm | 11 +++----- Src/Help/HTML/main_display.htm | 5 +--- Src/Help/HTML/main_menu.htm | 5 +--- Src/Help/HTML/markup_editor.htm | 5 +--- Src/Help/HTML/menu_categories.htm | 5 +--- Src/Help/HTML/menu_compile.htm | 5 +--- Src/Help/HTML/menu_database.htm | 5 +--- Src/Help/HTML/menu_edit.htm | 5 +--- Src/Help/HTML/menu_file.htm | 5 +--- Src/Help/HTML/menu_help.htm | 5 +--- Src/Help/HTML/menu_search.htm | 5 +--- Src/Help/HTML/menu_snippets.htm | 5 +--- Src/Help/HTML/menu_tools.htm | 5 +--- Src/Help/HTML/menu_view.htm | 5 +--- Src/Help/HTML/navigation.htm | 5 +--- Src/Help/HTML/new.htm | 5 +--- Src/Help/HTML/notifiy_database_update.htm | 5 +--- Src/Help/HTML/overview_pane.htm | 5 +--- Src/Help/HTML/privacy_statement.htm | 5 +--- Src/Help/HTML/quickstart.htm | 5 +--- Src/Help/HTML/reml.htm | 5 +--- Src/Help/HTML/snippet_class.htm | 5 +--- Src/Help/HTML/snippet_constant.htm | 5 +--- Src/Help/HTML/snippet_freeform.htm | 5 +--- Src/Help/HTML/snippet_kinds.htm | 5 +--- Src/Help/HTML/snippet_routine.htm | 5 +--- Src/Help/HTML/snippet_type.htm | 5 +--- Src/Help/HTML/snippet_unit.htm | 5 +--- Src/Help/HTML/task_addsnippets.htm | 5 +--- Src/Help/HTML/task_copysnippet.htm | 5 +--- Src/Help/HTML/task_customise.htm | 5 +--- Src/Help/HTML/task_export.htm | 5 +--- Src/Help/HTML/task_generateunit.htm | 5 +--- Src/Help/HTML/task_printroutine.htm | 5 +--- Src/Help/HTML/task_savesnippet.htm | 5 +--- Src/Help/HTML/task_search.htm | 5 +--- Src/Help/HTML/task_testcompile.htm | 5 +--- Src/Help/HTML/task_update.htm | 5 +--- Src/Help/HTML/tasks.htm | 5 +--- Src/Help/HTML/welcome.htm | 5 +--- Src/Help/Index.hhk | 5 +--- Src/Help/TOC.hhc | 5 +--- Src/Hiliter.UAttrs.pas | 5 +--- Src/Hiliter.UCSS.pas | 5 +--- Src/Hiliter.UFileHiliter.pas | 5 +--- Src/Hiliter.UGlobals.pas | 5 +--- Src/Hiliter.UHiliters.pas | 5 +--- Src/Hiliter.UPasLexer.pas | 5 +--- Src/Hiliter.UPasParser.pas | 5 +--- Src/Hiliter.UPersist.pas | 5 +--- Src/Install/Assets/LICENSE | 3 ++- Src/Install/CodeSnip.iss | 5 +--- Src/Install/DataLocations.ps | Bin 5058 -> 5038 bytes Src/Install/EventHandlers.ps | Bin 8003 -> 7983 bytes Src/Install/Unicode.ps | Bin 2743 -> 2723 bytes Src/Install/UpdateDBase.ps | Bin 2006 -> 1986 bytes Src/Install/UpdateIni.ps | Bin 3824 -> 3804 bytes Src/Install/VersionInfo.ps | Bin 3334 -> 3322 bytes Src/IntfAligner.pas | 5 +--- Src/IntfCommon.pas | 5 +--- Src/IntfFrameMgrs.pas | 5 +--- Src/IntfNotifier.pas | 5 +--- Src/IntfPreview.pas | 5 +--- Src/Makefile | 5 +--- Src/Res/CSS/detail.css | 5 +--- Src/Res/CSS/easteregg.css | 5 +--- Src/Res/HTML/dlg-about-database-tplt.html | 5 +--- Src/Res/HTML/dlg-about-head-tplt.html | 5 +--- Src/Res/HTML/dlg-about-program-tplt.html | 5 +--- Src/Res/HTML/dlg-activetext-preview-tplt.html | 5 +--- Src/Res/HTML/dlg-codesubmit-finished.html | 5 +--- Src/Res/HTML/dlg-codesubmit-intro.html | 5 +--- Src/Res/HTML/dlg-codesubmit-license.html | 5 +--- Src/Res/HTML/dlg-codesubmit-submit.html | 5 +--- Src/Res/HTML/dlg-comperror-tplt.html | 5 +--- Src/Res/HTML/dlg-dbupdate-finish.html | 2 +- Src/Res/HTML/dlg-dbupdate-intro-tplt.html | 2 +- Src/Res/HTML/dlg-dbupdate-load.html | 2 +- Src/Res/HTML/dlg-donate.html | 5 +--- Src/Res/HTML/dlg-easter-egg.html | 5 +--- Src/Res/HTML/dlg-rssnews.html | 5 +--- Src/Res/HTML/dlg-swag-import-intro-tplt.html | 5 +--- Src/Res/HTML/dlg-swag-import-outro-tplt.html | 5 +--- Src/Res/HTML/frm-emailprivacy.html | 5 +--- Src/Res/HTML/info-basic-tplt.html | 5 +--- Src/Res/HTML/info-empty-selection-tplt.html | 5 +--- Src/Res/HTML/info-snippet-list-tplt.html | 5 +--- Src/Res/HTML/info-snippet-tplt.html | 5 +--- Src/Res/HTML/welcome-tplt.html | 5 +--- Src/Res/Img/Branding/LICENSE | 4 +-- Src/Res/Misc/CodeSnip.manifest | 5 +--- Src/Res/Scripts/easteregg.js | 5 +--- Src/Res/Scripts/external.js | 5 +--- Src/Res/Scripts/overflowXFix.js | 5 +--- Src/Resources.rc | 5 +--- Src/SWAG.UCommon.pas | 5 +--- Src/SWAG.UImporter.pas | 5 +--- Src/SWAG.UReader.pas | 5 +--- Src/SWAG.USnippetCache.pas | 5 +--- Src/SWAG.UXMLProcessor.pas | 2 +- Src/UActionFactory.pas | 5 +--- Src/UAnchors.pas | 5 +--- Src/UAppInfo.pas | 5 +--- Src/UBaseObjects.pas | 5 +--- Src/UBox.pas | 5 +--- Src/UBrowseForFolderDlg.pas | 5 +--- Src/UBrowseProtocol.pas | 5 +--- Src/UCSSBuilder.pas | 5 +--- Src/UCSSUtils.pas | 5 +--- Src/UCategoryAction.pas | 5 +--- Src/UCategoryListAdapter.pas | 5 +--- Src/UClassHelpers.pas | 5 +--- Src/UClipboardHelper.pas | 5 +--- Src/UCodeImportExport.pas | 5 +--- Src/UCodeImportMgr.pas | 5 +--- Src/UCodeShareMgr.pas | 5 +--- Src/UColorBoxEx.pas | 5 +--- Src/UColorDialogEx.pas | 5 +--- Src/UColours.pas | 5 +--- Src/UCommandBars.pas | 5 +--- Src/UCommonDlg.pas | 5 +--- Src/UCompResHTML.pas | 5 +--- Src/UComparers.pas | 5 +--- Src/UCompileMgr.pas | 5 +--- Src/UCompileResultsLBMgr.pas | 5 +--- Src/UConsoleApp.pas | 5 +--- Src/UConsts.pas | 5 +--- Src/UContainers.pas | 5 +--- Src/UControlStateMgr.pas | 5 +--- Src/UCopyInfoMgr.pas | 5 +--- Src/UCopySourceMgr.pas | 5 +--- Src/UCopyViewMgr.pas | 5 +--- Src/UCtrlArranger.pas | 5 +--- Src/UDBUpdateMgr.pas | 5 +--- Src/UDOSDateTime.pas | 5 +--- Src/UDataBackupMgr.pas | 5 +--- Src/UDataStreamIO.pas | 5 +--- Src/UDatabaseLoader.pas | 5 +--- Src/UDatabaseLoaderUI.pas | 5 +--- Src/UDetailPageHTML.pas | 5 +--- Src/UDetailPageLoader.pas | 5 +--- Src/UDetailTabAction.pas | 5 +--- Src/UDialogMgr.pas | 5 +--- Src/UDirectoryCopier.pas | 2 +- Src/UDispatchList.pas | 5 +--- Src/UDlgHelper.pas | 5 +--- Src/UDropDownButtons.pas | 5 +--- Src/UEditSnippetAction.pas | 5 +--- Src/UEmailHelper.pas | 5 +--- Src/UEncodings.pas | 5 +--- Src/UEncryptor.pas | 5 +--- Src/UExceptions.pas | 5 +--- Src/UExeFileType.pas | 5 +--- Src/UFileProtocol.pas | 5 +--- Src/UFileUpdater.pas | 5 +--- Src/UFolderBackup.pas | 5 +--- Src/UFontHelper.pas | 5 +--- Src/UFormAligner.pas | 5 +--- Src/UGIFImageList.pas | 5 +--- Src/UGraphicUtils.pas | 5 +--- Src/UGroups.pas | 5 +--- Src/UHTMLBuilder.pas | 5 +--- Src/UHTMLDOMHelper.pas | 5 +--- Src/UHTMLHelp.pas | 5 +--- Src/UHTMLHelpMgr.pas | 5 +--- Src/UHTMLTemplate.pas | 5 +--- Src/UHTMLUtils.pas | 5 +--- Src/UHTTPProtocol.pas | 5 +--- Src/UHelpMgr.pas | 5 +--- Src/UHelpProtocol.pas | 5 +--- Src/UHexUtils.pas | 5 +--- Src/UHiddenRichEdit.pas | 5 +--- Src/UHiddenWindow.pas | 5 +--- Src/UHistory.pas | 5 +--- Src/UHistoryMenus.pas | 5 +--- Src/UIOUtils.pas | 5 +--- Src/UIStringList.pas | 5 +--- Src/UImageTags.pas | 5 +--- Src/UIniDataLoader.pas | 5 +--- Src/UInitialLetter.pas | 5 +--- Src/UJavaScriptUtils.pas | 5 +--- Src/UKeysHelper.pas | 5 +--- Src/ULEDImageList.pas | 5 +--- Src/ULinkAction.pas | 5 +--- Src/ULocales.pas | 5 +--- Src/UMainDBFileReader.pas | 5 +--- Src/UMainDisplayMgr.pas | 5 +--- Src/UMarquee.pas | 5 +--- Src/UMeasurement.pas | 5 +--- Src/UMemoCaretPosDisplayMgr.pas | 5 +--- Src/UMemoHelper.pas | 5 +--- Src/UMemoProgBarMgr.pas | 5 +--- Src/UMenus.pas | 5 +--- Src/UMessageBox.pas | 5 +--- Src/UMessageWindow.pas | 5 +--- Src/UMultiCastEvents.pas | 5 +--- Src/UNotifier.pas | 5 +--- Src/UNulDropTarget.pas | 5 +--- Src/UNulFormAligner.pas | 5 +--- Src/UOleClientSite.pas | 5 +--- Src/UOpenDialogEx.pas | 5 +--- Src/UOpenDialogHelper.pas | 5 +--- Src/UOverviewTreeBuilder.pas | 5 +--- Src/UOverviewTreeState.pas | 5 +--- Src/UPageSetupDialogEx.pas | 5 +--- Src/UPageSetupDlgMgr.pas | 5 +--- Src/UPaypalDonateAction.pas | 5 +--- Src/UPipe.pas | 5 +--- Src/UPreferences.pas | 5 +--- Src/UPrintDocuments.pas | 5 +--- Src/UPrintEngine.pas | 5 +--- Src/UPrintInfo.pas | 5 +--- Src/UPrintMgr.pas | 5 +--- Src/UProtocols.pas | 5 +--- Src/UQuery.pas | 5 +--- Src/UREMLDataIO.pas | 5 +--- Src/URTFBuilder.pas | 5 +--- Src/URTFCategoryDoc.pas | 5 +--- Src/URTFSnippetDoc.pas | 5 +--- Src/URTFStyles.pas | 5 +--- Src/URTFUtils.pas | 5 +--- Src/UReservedCategories.pas | 5 +--- Src/UResourceUtils.pas | 5 +--- Src/USaveDialogEx.pas | 5 +--- Src/USaveSnippetMgr.pas | 5 +--- Src/USaveSourceDlg.pas | 5 +--- Src/USaveSourceMgr.pas | 5 +--- Src/USaveUnitMgr.pas | 5 +--- Src/USearch.pas | 5 +--- Src/USelectionIOMgr.pas | 5 +--- Src/USettings.pas | 5 +--- Src/UShowCaseCtrl.pas | 5 +--- Src/UShowPrefsPageAction.pas | 5 +--- Src/USimpleDispatch.pas | 5 +--- Src/USingleton.pas | 5 +--- Src/USnipKindListAdapter.pas | 5 +--- Src/USnippetAction.pas | 5 +--- Src/USnippetCreditsParser.pas | 5 +--- Src/USnippetDoc.pas | 5 +--- Src/USnippetExtraHelper.pas | 5 +--- Src/USnippetHTML.pas | 5 +--- Src/USnippetIDListIOHandler.pas | 5 +--- Src/USnippetIDs.pas | 5 +--- Src/USnippetPageHTML.pas | 5 +--- Src/USnippetPageStructure.pas | 5 +--- Src/USnippetSourceGen.pas | 5 +--- Src/USnippetValidator.pas | 5 +--- Src/USnippetsChkListMgr.pas | 5 +--- Src/USnippetsTVDraw.pas | 5 +--- Src/USourceFileInfo.pas | 5 +--- Src/USourceGen.pas | 5 +--- Src/UStartUp.pas | 5 +--- Src/UStatusBarMgr.pas | 5 +--- Src/UStrUtils.pas | 5 +--- Src/UStringReader.pas | 5 +--- Src/UStructs.pas | 5 +--- Src/USystemID.pas | 5 +--- Src/USystemInfo.pas | 5 +--- Src/UTVCheckBoxes.pas | 5 +--- Src/UTaggedTextLexer.pas | 5 +--- Src/UTestCompile.pas | 5 +--- Src/UTestCompileUI.pas | 5 +--- Src/UTestUnit.pas | 5 +--- Src/UTestUnitDlgMgr.pas | 5 +--- Src/UTextSnippetDoc.pas | 5 +--- Src/UThemesEx.pas | 5 +--- Src/UToolButtonEx.pas | 5 +--- Src/UUIWidgetImages.pas | 5 +--- Src/UURIEncode.pas | 5 +--- Src/UUniqueID.pas | 5 +--- Src/UUnitAnalyser.pas | 5 +--- Src/UUnitsChkListMgr.pas | 5 +--- Src/UUrlMonEx.pas | 5 +--- Src/UUserDBBackup.pas | 5 +--- Src/UUserDBMgr.pas | 5 +--- Src/UUserDBMove.pas | 5 +--- Src/UUserDetails.pas | 5 +--- Src/UUserDetailsPersist.pas | 5 +--- Src/UUtils.pas | 5 +--- Src/UVersionInfo.pas | 5 +--- Src/UView.pas | 5 +--- Src/UViewItemAction.pas | 5 +--- Src/UViewItemTreeNode.pas | 5 +--- Src/UWBCommandBars.pas | 5 +--- Src/UWBExternal.pas | 5 +--- Src/UWBPopupMenus.pas | 5 +--- Src/UWaitForThreadUI.pas | 5 +--- Src/UWarnings.pas | 5 +--- Src/UWindowSettings.pas | 5 +--- Src/UXMLDocConsts.pas | 5 +--- Src/UXMLDocHelper.pas | 5 +--- Src/UXMLDocumentEx.pas | 5 +--- Src/VCodeSnip.vi | 5 +--- Src/VCodeSnipPortable.vi | 5 +--- Src/Web.UCharEncodings.pas | 5 +--- Src/Web.UInfo.pas | 5 +--- 499 files changed, 509 insertions(+), 1965 deletions(-) diff --git a/Build.html b/Build.html index a5cc00076..36969e6fc 100644 --- a/Build.html +++ b/Build.html @@ -6,10 +6,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2015, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Instructions for building CodeSnip from source. --> diff --git a/Docs/ChangeLogs/ChangeLog-v0.txt b/Docs/ChangeLogs/ChangeLog-v0.txt index 82c2642a9..1a6577a62 100644 --- a/Docs/ChangeLogs/ChangeLog-v0.txt +++ b/Docs/ChangeLogs/ChangeLog-v0.txt @@ -3,10 +3,7 @@ ; v. 2.0. If a copy of the MPL was not distributed with this file, You can ; obtain one at http://mozilla.org/MPL/2.0/ ; -; Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). -; -; $Rev$ -; $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). ; ; Change Log for CodeSnip Release 0 (Beta releases) ; ------------------------------------------------------------------------------ diff --git a/Docs/ChangeLogs/ChangeLog-v1.txt b/Docs/ChangeLogs/ChangeLog-v1.txt index ee1a2151a..fc3617efc 100644 --- a/Docs/ChangeLogs/ChangeLog-v1.txt +++ b/Docs/ChangeLogs/ChangeLog-v1.txt @@ -3,10 +3,7 @@ ; v. 2.0. If a copy of the MPL was not distributed with this file, You can ; obtain one at http://mozilla.org/MPL/2.0/ ; -; Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). -; -; $Rev$ -; $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). ; ; Change Log for CodeSnip Release 1 ; ------------------------------------------------------------------------------ diff --git a/Docs/ChangeLogs/ChangeLog-v2.txt b/Docs/ChangeLogs/ChangeLog-v2.txt index 352515fc5..77f967fa0 100644 --- a/Docs/ChangeLogs/ChangeLog-v2.txt +++ b/Docs/ChangeLogs/ChangeLog-v2.txt @@ -3,10 +3,7 @@ ; v. 2.0. If a copy of the MPL was not distributed with this file, You can ; obtain one at http://mozilla.org/MPL/2.0/ ; -; Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). -; -; $Rev$ -; $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). ; ; Change Log for CodeSnip Release 2 ; ------------------------------------------------------------------------------ diff --git a/Docs/ChangeLogs/ChangeLog-v3.txt b/Docs/ChangeLogs/ChangeLog-v3.txt index 66e0ad007..bbbca6668 100644 --- a/Docs/ChangeLogs/ChangeLog-v3.txt +++ b/Docs/ChangeLogs/ChangeLog-v3.txt @@ -3,10 +3,7 @@ ; v. 2.0. If a copy of the MPL was not distributed with this file, You can ; obtain one at http://mozilla.org/MPL/2.0/ ; -; Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). -; -; $Rev$ -; $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). ; ; Change Log for CodeSnip Release 3 ; ------------------------------------------------------------------------------ diff --git a/Docs/ChangeLogs/ChangeLog-v4.txt b/Docs/ChangeLogs/ChangeLog-v4.txt index b4079b83d..1a41d82c4 100644 --- a/Docs/ChangeLogs/ChangeLog-v4.txt +++ b/Docs/ChangeLogs/ChangeLog-v4.txt @@ -3,10 +3,7 @@ ; v. 2.0. If a copy of the MPL was not distributed with this file, You can ; obtain one at http://mozilla.org/MPL/2.0/ ; -; Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). -; -; $Rev$ -; $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). ; ; Change Log for CodeSnip Release 4 ; ------------------------------------------------------------------------------ diff --git a/Docs/Design/FileFormats/backup.html b/Docs/Design/FileFormats/backup.html index c3646ad1d..9ffda3bed 100644 --- a/Docs/Design/FileFormats/backup.html +++ b/Docs/Design/FileFormats/backup.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: Backup Files. --> diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index eb3a52a71..0d3319250 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: Configuration Files --> diff --git a/Docs/Design/FileFormats/export.html b/Docs/Design/FileFormats/export.html index 70e3292bb..6e1596b43 100644 --- a/Docs/Design/FileFormats/export.html +++ b/Docs/Design/FileFormats/export.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: Export --> diff --git a/Docs/Design/FileFormats/favourites.html b/Docs/Design/FileFormats/favourites.html index 9d4c0bbb6..e302c4837 100644 --- a/Docs/Design/FileFormats/favourites.html +++ b/Docs/Design/FileFormats/favourites.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: Favourites Files --> diff --git a/Docs/Design/FileFormats/index.html b/Docs/Design/FileFormats/index.html index 191f8f78b..c14c904c9 100644 --- a/Docs/Design/FileFormats/index.html +++ b/Docs/Design/FileFormats/index.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: Index File --> diff --git a/Docs/Design/FileFormats/main-db-update.html b/Docs/Design/FileFormats/main-db-update.html index f962e500f..a701b06fb 100644 --- a/Docs/Design/FileFormats/main-db-update.html +++ b/Docs/Design/FileFormats/main-db-update.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: Main Database Update Data Stream --> diff --git a/Docs/Design/FileFormats/main-db.html b/Docs/Design/FileFormats/main-db.html index 09b38fcfa..8f7e1108f 100644 --- a/Docs/Design/FileFormats/main-db.html +++ b/Docs/Design/FileFormats/main-db.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: Main Database --> diff --git a/Docs/Design/FileFormats/main.css b/Docs/Design/FileFormats/main.css index cc640cb04..a105d5932 100644 --- a/Docs/Design/FileFormats/main.css +++ b/Docs/Design/FileFormats/main.css @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: CSS used by all documentation HTML files. */ diff --git a/Docs/Design/FileFormats/saved.html b/Docs/Design/FileFormats/saved.html index 9b78e8530..aac8c9156 100644 --- a/Docs/Design/FileFormats/saved.html +++ b/Docs/Design/FileFormats/saved.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: Saved Files --> diff --git a/Docs/Design/FileFormats/selection.html b/Docs/Design/FileFormats/selection.html index 6d83814cb..687f8d739 100644 --- a/Docs/Design/FileFormats/selection.html +++ b/Docs/Design/FileFormats/selection.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: Selection Files --> diff --git a/Docs/Design/FileFormats/test-unit.html b/Docs/Design/FileFormats/test-unit.html index 8ec83e453..0620d0c85 100644 --- a/Docs/Design/FileFormats/test-unit.html +++ b/Docs/Design/FileFormats/test-unit.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: Test Units --> diff --git a/Docs/Design/FileFormats/user-db.html b/Docs/Design/FileFormats/user-db.html index b479002a8..6b3fd97d3 100644 --- a/Docs/Design/FileFormats/user-db.html +++ b/Docs/Design/FileFormats/user-db.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip File Format Documentation: User Database --> diff --git a/Docs/LICENSE b/Docs/LICENSE index 72fc4f92e..51a6b6038 100644 --- a/Docs/LICENSE +++ b/Docs/LICENSE @@ -5,4 +5,5 @@ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -All files are copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). +All files are Copyright (C) 2012-2020, Peter Johnson +(gravatar.com/delphidabbler). diff --git a/Docs/License.html b/Docs/License.html index 0d004fb95..009f3ea03 100644 --- a/Docs/License.html +++ b/Docs/License.html @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip license. --> @@ -228,10 +225,10 @@

      Executable Program

      - DelphiDabbler CodeSnip is copyright © 2005-2016 by Peter D + DelphiDabbler CodeSnip is copyright © 2005-2020 by Peter D Johnson, http://www.delphidabbler.com. + href="https://gravatar.com/delphidabbler" + >https://gravatar.com/delphidabbler.

      The executable version of the program is made available under the terms of @@ -340,9 +337,9 @@

      This condition applies to all files in the Src/Res/Img/Branding directory, all of which are original - work copyright © 2012 by Peter D Johnson, http://www.delphidabbler.com/. + work copyright © 2012-2020 by Peter D Johnson, https://gravatar.com/delphidabbler.

    • diff --git a/Docs/MPL-2.0-Boilerplate.txt b/Docs/MPL-2.0-Boilerplate.txt index 8e70675bf..a5437f533 100644 --- a/Docs/MPL-2.0-Boilerplate.txt +++ b/Docs/MPL-2.0-Boilerplate.txt @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) COPYRIGHTDATE, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) COPYRIGHTDATE, Peter Johnson (gravatar.com/delphidabbler). * * DESCRIPTION. } @@ -17,10 +14,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) COPYRIGHTDATE, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) COPYRIGHTDATE, Peter Johnson (gravatar.com/delphidabbler). * * DESCRIPTION. */ @@ -30,10 +24,7 @@ ; v. 2.0. If a copy of the MPL was not distributed with this file, You can ; obtain one at http://mozilla.org/MPL/2.0/ ; -; Copyright (C) COPYRIGHTDATE, Peter Johnson (www.delphidabbler.com). -; -; $Rev$ -; $Date$ + * Copyright (C) COPYRIGHTDATE, Peter Johnson (gravatar.com/delphidabbler). ; ; DESCRIPTION. @@ -42,10 +33,7 @@ # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/ # -# Copyright (C) COPYRIGHTDATE, Peter Johnson (www.delphidabbler.com). -# -# $Rev$ -# $Date$ + * Copyright (C) COPYRIGHTDATE, Peter Johnson (gravatar.com/delphidabbler). # # DESCRIPTION. @@ -54,10 +42,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) COPYRIGHTDATE, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) COPYRIGHTDATE, Peter Johnson (gravatar.com/delphidabbler). * * DESCRIPTION. --> diff --git a/Src/ActiveText.UHTMLRenderer.pas b/Src/ActiveText.UHTMLRenderer.pas index a000d69f6..492823c81 100644 --- a/Src/ActiveText.UHTMLRenderer.pas +++ b/Src/ActiveText.UHTMLRenderer.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides a class that renders active text as HTML. } diff --git a/Src/ActiveText.UMain.pas b/Src/ActiveText.UMain.pas index f9b3f3d3f..e06bcbaaf 100644 --- a/Src/ActiveText.UMain.pas +++ b/Src/ActiveText.UMain.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides interfaces, a factory class and implementation of "active text". * Active text is text that can have actions performed on it. Actions may diff --git a/Src/ActiveText.URTFRenderer.pas b/Src/ActiveText.URTFRenderer.pas index 43561c691..112142a51 100644 --- a/Src/ActiveText.URTFRenderer.pas +++ b/Src/ActiveText.URTFRenderer.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class and helpers that create RTF representations of active text * with customised styling. diff --git a/Src/ActiveText.UTextRenderer.pas b/Src/ActiveText.UTextRenderer.pas index 0ee25a60b..5ac62c25c 100644 --- a/Src/ActiveText.UTextRenderer.pas +++ b/Src/ActiveText.UTextRenderer.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that renders active text as plain text in fixed width, word * wrapped paragraphs. diff --git a/Src/ActiveText.UValidator.pas b/Src/ActiveText.UValidator.pas index d1fcc50a7..cac3dd714 100644 --- a/Src/ActiveText.UValidator.pas +++ b/Src/ActiveText.UValidator.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a container record that provides methods to validate active text * object. diff --git a/Src/Browser.IntfDocHostUI.pas b/Src/Browser.IntfDocHostUI.pas index 1c8fda179..a7cbb1e5d 100644 --- a/Src/Browser.IntfDocHostUI.pas +++ b/Src/Browser.IntfDocHostUI.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Interfaces, records and constants used when hosting the IE WebBrowser Control * or automating IE to replace the menus, toolbars, and context menus. The diff --git a/Src/Browser.UControlHelper.pas b/Src/Browser.UControlHelper.pas index 44116b621..ca49252b8 100644 --- a/Src/Browser.UControlHelper.pas +++ b/Src/Browser.UControlHelper.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a static class that provides helper methods for manipulating and * interogating web browser controls. diff --git a/Src/Browser.UController.pas b/Src/Browser.UController.pas index 92cf57d4a..da877a062 100644 --- a/Src/Browser.UController.pas +++ b/Src/Browser.UController.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that hosts the IE web browser control and enables both direct loading * and saving of browser's HTML and customisation of the user interface. Much of diff --git a/Src/Browser.UHTMLEvents.pas b/Src/Browser.UHTMLEvents.pas index 9c53db45c..7cee7ceec 100644 --- a/Src/Browser.UHTMLEvents.pas +++ b/Src/Browser.UHTMLEvents.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides sinks for events triggered by HTML documents loaded in a TWebBrowser * control. Sinks for the HTMLDocumentEvents2 and HTMLWindowEvents2 diff --git a/Src/Browser.UHighlighter.pas b/Src/Browser.UHighlighter.pas index 0e3d4f30a..69d323411 100644 --- a/Src/Browser.UHighlighter.pas +++ b/Src/Browser.UHighlighter.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that highlights text in web browser that match a search criteria. } diff --git a/Src/Browser.UIOMgr.pas b/Src/Browser.UIOMgr.pas index e7e62b020..367ebdc4a 100644 --- a/Src/Browser.UIOMgr.pas +++ b/Src/Browser.UIOMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that wraps the IE web browser control and provides ability to load and * save HTML from files, streams or strings. Also simplifies navigation to diff --git a/Src/Browser.UNulUIHandler.pas b/Src/Browser.UNulUIHandler.pas index 1f3c037c1..df597dd8c 100644 --- a/Src/Browser.UNulUIHandler.pas +++ b/Src/Browser.UNulUIHandler.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a class that provides a "do-nothing" implementation of the * IDocHostUIHandler interface. All methods are "stubbed out" to return values diff --git a/Src/Browser.UUIMgr.pas b/Src/Browser.UUIMgr.pas index 9bc26f695..d7b62dc04 100644 --- a/Src/Browser.UUIMgr.pas +++ b/Src/Browser.UUIMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Contains class that implements IDocHostUIHandler interface and allows * customisation of IE web browser control's user interface, message diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 20ccd5bc9..c0278db35 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip application project file. } diff --git a/Src/CompilerChecks.inc b/Src/CompilerChecks.inc index ffe0d8b06..61b29f2de 100644 --- a/Src/CompilerChecks.inc +++ b/Src/CompilerChecks.inc @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Include file that checks details of compiler to determine whether or not * CodeSnip can be compiled. diff --git a/Src/Compilers.UBDS.pas b/Src/Compilers.UBDS.pas index 7011b61b6..3491d7d16 100644 --- a/Src/Compilers.UBDS.pas +++ b/Src/Compilers.UBDS.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that controls and provides information about Borland CodeGear and * Embarcadero "BDS" Win32 compilers. diff --git a/Src/Compilers.UBorland.pas b/Src/Compilers.UBorland.pas index 0024be877..1a451aa01 100644 --- a/Src/Compilers.UBorland.pas +++ b/Src/Compilers.UBorland.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Abstract base class for classes that control and provide information about * Borland compilers. diff --git a/Src/Compilers.UCompilerBase.pas b/Src/Compilers.UCompilerBase.pas index 54f28479c..cb186a4f3 100644 --- a/Src/Compilers.UCompilerBase.pas +++ b/Src/Compilers.UCompilerBase.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Abstract base class for classes that control and provide information about * compilers. Also provides a specialised exception class. diff --git a/Src/Compilers.UCompilers.pas b/Src/Compilers.UCompilers.pas index 170f012e5..01334da44 100644 --- a/Src/Compilers.UCompilers.pas +++ b/Src/Compilers.UCompilers.pas @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides a class that maintains a list of all supported compilers and creates * a global singleton instance of the list. Also provides a class that can diff --git a/Src/Compilers.UDelphi.pas b/Src/Compilers.UDelphi.pas index dc91a3963..009631009 100644 --- a/Src/Compilers.UDelphi.pas +++ b/Src/Compilers.UDelphi.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that controls and provides information about the Delphi v2-7 compilers. } diff --git a/Src/Compilers.UFreePascal.pas b/Src/Compilers.UFreePascal.pas index 70d89c810..32b66548b 100644 --- a/Src/Compilers.UFreePascal.pas +++ b/Src/Compilers.UFreePascal.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that wraps the Free Pascal compiler. Controls compilation, * processes compiler output and provides information about the compiler. diff --git a/Src/Compilers.UGlobals.pas b/Src/Compilers.UGlobals.pas index c28053548..9bae8f23a 100644 --- a/Src/Compilers.UGlobals.pas +++ b/Src/Compilers.UGlobals.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Declares various types that describe the compiler and compilation results and * defines interfaces to compiler objects. diff --git a/Src/Compilers.URunner.pas b/Src/Compilers.URunner.pas index 31b50ec9e..3be906d8a 100644 --- a/Src/Compilers.URunner.pas +++ b/Src/Compilers.URunner.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that executes a compiler and captures its output and exit * code. Also provides specialised exception object that captures information diff --git a/Src/Compilers.USearchDirs.pas b/Src/Compilers.USearchDirs.pas index 611b7765d..4c195bfde 100644 --- a/Src/Compilers.USearchDirs.pas +++ b/Src/Compilers.USearchDirs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that encapsulates a list of search directories for use * by the compiler. diff --git a/Src/DB.UCategory.pas b/Src/DB.UCategory.pas index 815486fa3..cf810503e 100644 --- a/Src/DB.UCategory.pas +++ b/Src/DB.UCategory.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Objects, records etc that encapsulate a category, its data and lists of * categories. diff --git a/Src/DB.UDatabaseIO.pas b/Src/DB.UDatabaseIO.pas index e791ca19f..f256c7ab7 100644 --- a/Src/DB.UDatabaseIO.pas +++ b/Src/DB.UDatabaseIO.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements objects that can load data into the Database object from both the * user and main databases. Also provides a class that can write the user diff --git a/Src/DB.UMain.pas b/Src/DB.UMain.pas index 1f8daf38b..447a709c6 100644 --- a/Src/DB.UMain.pas +++ b/Src/DB.UMain.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a singleton object and subsidiary classes that encapsulate the * snippets and categories in the CodeSnip database and user defined databases. diff --git a/Src/DB.UMetaData.pas b/Src/DB.UMetaData.pas index badb61e66..f28ec0fd1 100644 --- a/Src/DB.UMetaData.pas +++ b/Src/DB.UMetaData.pas @@ -3,7 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2020, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides meta data for the current main database and for any database * updates. diff --git a/Src/DB.USnippet.pas b/Src/DB.USnippet.pas index 90fb6155e..d30c3e785 100644 --- a/Src/DB.USnippet.pas +++ b/Src/DB.USnippet.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Objects, records etc that encapsulate a code snippet, its data and lists of * code snippets. diff --git a/Src/DB.USnippetKind.pas b/Src/DB.USnippetKind.pas index 8cd96532c..f71d17b8b 100644 --- a/Src/DB.USnippetKind.pas +++ b/Src/DB.USnippetKind.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a record that provides information about the different snippet kinds * enumerated by TSnippetKind along with a static class that provides an diff --git a/Src/DBIO.UFileIOIntf.pas b/Src/DBIO.UFileIOIntf.pas index 229e2247d..b515b61d7 100644 --- a/Src/DBIO.UFileIOIntf.pas +++ b/Src/DBIO.UFileIOIntf.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines interfaces implemented by classes that read and write physical code * snippets database files. Also provides an exception class for data I/O diff --git a/Src/DBIO.UIniDataReader.pas b/Src/DBIO.UIniDataReader.pas index bf6689ce7..739c86ec4 100644 --- a/Src/DBIO.UIniDataReader.pas +++ b/Src/DBIO.UIniDataReader.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements code that reads the main CodeSnip database from .ini and .dat * files. diff --git a/Src/DBIO.UNulDataReader.pas b/Src/DBIO.UNulDataReader.pas index ba079d1cf..1afe8d05c 100644 --- a/Src/DBIO.UNulDataReader.pas +++ b/Src/DBIO.UNulDataReader.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a do nothing data reader for use when a database does not exist. } diff --git a/Src/DBIO.UXMLDataIO.pas b/Src/DBIO.UXMLDataIO.pas index c989444d1..e23797411 100644 --- a/Src/DBIO.UXMLDataIO.pas +++ b/Src/DBIO.UXMLDataIO.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements classes that can read and write databases stored in XML format * with associated source code files. diff --git a/Src/ExternalObj.ridl b/Src/ExternalObj.ridl index 5e327b55b..02ccf4bf6 100644 --- a/Src/ExternalObj.ridl +++ b/Src/ExternalObj.ridl @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2015, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Source for type library that defines the interface to extensions to the * browser control DOM's "external object". diff --git a/Src/Favourites.UFavourites.pas b/Src/Favourites.UFavourites.pas index bc5475a1a..a95decfbc 100644 --- a/Src/Favourites.UFavourites.pas +++ b/Src/Favourites.UFavourites.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines types used to encapsulate a list of a user's favourite snippets. } diff --git a/Src/Favourites.UManager.pas b/Src/Favourites.UManager.pas index c9f0fcb58..25a3975a0 100644 --- a/Src/Favourites.UManager.pas +++ b/Src/Favourites.UManager.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a class used to manage interaction with, and updating of, the user's * favourites. diff --git a/Src/Favourites.UPersist.pas b/Src/Favourites.UPersist.pas index 7aa981597..32409eed5 100644 --- a/Src/Favourites.UPersist.pas +++ b/Src/Favourites.UPersist.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines an advanced record that can persist a list of favourites to and from * a file on a per user basis. diff --git a/Src/FirstRun.FmV4ConfigDlg.pas b/Src/FirstRun.FmV4ConfigDlg.pas index 1bbea7973..3159c8007 100644 --- a/Src/FirstRun.FmV4ConfigDlg.pas +++ b/Src/FirstRun.FmV4ConfigDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a wizard dialogue box that may be displayed on the first run of * CodeSnip v4 to get user to decide whether what data to bring forward from diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index 24d390400..2559741d1 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that manages the updating of older config files to the * current format. diff --git a/Src/FirstRun.UDatabase.pas b/Src/FirstRun.UDatabase.pas index a07fbbb48..7ad9c88f4 100644 --- a/Src/FirstRun.UDatabase.pas +++ b/Src/FirstRun.UDatabase.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that handles updating of user database from an earlier * version. diff --git a/Src/FirstRun.UIniFile.pas b/Src/FirstRun.UIniFile.pas index 11d66e9c8..774824366 100644 --- a/Src/FirstRun.UIniFile.pas +++ b/Src/FirstRun.UIniFile.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Ini file access helper routines for use with first-run startup code. } diff --git a/Src/FirstRun.UInstallInfo.pas b/Src/FirstRun.UInstallInfo.pas index 553239201..22fc691b0 100644 --- a/Src/FirstRun.UInstallInfo.pas +++ b/Src/FirstRun.UInstallInfo.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that provides information about CodeSnip installations. } diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index f944e3cec..ffb6568ba 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements classes that handle application start up, determine if it the * first run of the current version and perform necessary updates to per-user diff --git a/Src/FmAboutDlg.pas b/Src/FmAboutDlg.pas index 68e56839c..5d2e9aab6 100644 --- a/Src/FmAboutDlg.pas +++ b/Src/FmAboutDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements the program's About dialogue box. } diff --git a/Src/FmActiveTextPreviewDlg.pas b/Src/FmActiveTextPreviewDlg.pas index 85cde30b7..b0774f678 100644 --- a/Src/FmActiveTextPreviewDlg.pas +++ b/Src/FmActiveTextPreviewDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that displays active text rendered from REML markup * or plain text. diff --git a/Src/FmAddCategoryDlg.pas b/Src/FmAddCategoryDlg.pas index b661ab765..403b39cbd 100644 --- a/Src/FmAddCategoryDlg.pas +++ b/Src/FmAddCategoryDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that permits user to add a new user defined * category to the database. diff --git a/Src/FmBase.pas b/Src/FmBase.pas index e769c1cdf..e13503293 100644 --- a/Src/FmBase.pas +++ b/Src/FmBase.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a form that provides the ancestor of all forms in the application. * Provides default names for form window classes along with various operations diff --git a/Src/FmBugReportBaseDlg.pas b/Src/FmBugReportBaseDlg.pas index 632b0a5fb..ec00ab72b 100644 --- a/Src/FmBugReportBaseDlg.pas +++ b/Src/FmBugReportBaseDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides a base class and common functionality for bug report dialogue boxes. } diff --git a/Src/FmCategoryEditDlg.pas b/Src/FmCategoryEditDlg.pas index 8c22e6f1f..4a006df55 100644 --- a/Src/FmCategoryEditDlg.pas +++ b/Src/FmCategoryEditDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements an abstract base class for dialogue boxes used to edit user * defined categories. diff --git a/Src/FmCodeExportDlg.pas b/Src/FmCodeExportDlg.pas index b82619efc..2ddc89786 100644 --- a/Src/FmCodeExportDlg.pas +++ b/Src/FmCodeExportDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that gets snippets to be exported and creates an * export file containing the selected snippets. diff --git a/Src/FmCodeImportDlg.pas b/Src/FmCodeImportDlg.pas index 03e66b146..786c035ab 100644 --- a/Src/FmCodeImportDlg.pas +++ b/Src/FmCodeImportDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a wizard dialogue box that handles the import of user defined * snippets into the database. Permits snippets from the import file to be diff --git a/Src/FmCompErrorDlg.pas b/Src/FmCompErrorDlg.pas index 73d546132..7394c80b1 100644 --- a/Src/FmCompErrorDlg.pas +++ b/Src/FmCompErrorDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that displays compiler error and warning logs. } diff --git a/Src/FmCompilersDlg.FrBase.pas b/Src/FmCompilersDlg.FrBase.pas index b390256b4..4f2c1fc96 100644 --- a/Src/FmCompilersDlg.FrBase.pas +++ b/Src/FmCompilersDlg.FrBase.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a base class for all frames used for editing compiler information * in TCompilersDlg. diff --git a/Src/FmCompilersDlg.FrCompiler.pas b/Src/FmCompilersDlg.FrCompiler.pas index d3efeaf63..3573903e8 100644 --- a/Src/FmCompilersDlg.FrCompiler.pas +++ b/Src/FmCompilersDlg.FrCompiler.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame used to edit executable file name of compiler being edited * in TCompilersDlg. diff --git a/Src/FmCompilersDlg.FrLog.pas b/Src/FmCompilersDlg.FrLog.pas index 04309eb71..16a6df827 100644 --- a/Src/FmCompilersDlg.FrLog.pas +++ b/Src/FmCompilersDlg.FrLog.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame used to change log file prefixes used for a compiler being * edited in TCompilersDlg. diff --git a/Src/FmCompilersDlg.FrNamespaces.pas b/Src/FmCompilersDlg.FrNamespaces.pas index f480d1065..af84f7116 100644 --- a/Src/FmCompilersDlg.FrNamespaces.pas +++ b/Src/FmCompilersDlg.FrNamespaces.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame used to edit namespaces used for a compiler being edited * in TCompilersDlg. diff --git a/Src/FmCompilersDlg.FrSearchDirs.pas b/Src/FmCompilersDlg.FrSearchDirs.pas index cef968d2a..d21053ee6 100644 --- a/Src/FmCompilersDlg.FrSearchDirs.pas +++ b/Src/FmCompilersDlg.FrSearchDirs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame used to edit lists of search directories used for a * compiler being edited in TCompilersDlg. diff --git a/Src/FmCompilersDlg.FrSwitches.pas b/Src/FmCompilersDlg.FrSwitches.pas index 41c861e42..2c94160bd 100644 --- a/Src/FmCompilersDlg.FrSwitches.pas +++ b/Src/FmCompilersDlg.FrSwitches.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame used to edit switches used for a compiler being edited in * TCompilersDlg. diff --git a/Src/FmCompilersDlg.UBannerMgr.pas b/Src/FmCompilersDlg.UBannerMgr.pas index ffd0326ec..ed6218d9b 100644 --- a/Src/FmCompilersDlg.UBannerMgr.pas +++ b/Src/FmCompilersDlg.UBannerMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that manages display of a compiler name on a gradient * filled background in a paint box. diff --git a/Src/FmCompilersDlg.UCompilerListMgr.pas b/Src/FmCompilersDlg.UCompilerListMgr.pas index 6d291bbbb..ae78bec5a 100644 --- a/Src/FmCompilersDlg.UCompilerListMgr.pas +++ b/Src/FmCompilersDlg.UCompilerListMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that manages display of compiler names in an owner draw * list box. diff --git a/Src/FmCompilersDlg.pas b/Src/FmCompilersDlg.pas index a984ff6e6..ae237b485 100644 --- a/Src/FmCompilersDlg.pas +++ b/Src/FmCompilersDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box where the user can configure the Pascal compilers * that are to be used by CodeSnip. diff --git a/Src/FmDBUpdateDlg.pas b/Src/FmDBUpdateDlg.pas index 5f99f7d57..1536cad2d 100644 --- a/Src/FmDBUpdateDlg.pas +++ b/Src/FmDBUpdateDlg.pas @@ -3,7 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2020, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a wizard dialogue box that handles the updating of the main * DelphiDabbler Code Snippets database. diff --git a/Src/FmDeleteCategoryDlg.pas b/Src/FmDeleteCategoryDlg.pas index 6d4f63cd7..3e3ea01da 100644 --- a/Src/FmDeleteCategoryDlg.pas +++ b/Src/FmDeleteCategoryDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that permits user to select and delete a user * defined category. diff --git a/Src/FmDependenciesDlg.pas b/Src/FmDependenciesDlg.pas index b3672533b..be2480ace 100644 --- a/Src/FmDependenciesDlg.pas +++ b/Src/FmDependenciesDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that displays all the dependencies and dependents * of a snippet. diff --git a/Src/FmDonateDlg.pas b/Src/FmDonateDlg.pas index 92e212eef..7fef5db55 100644 --- a/Src/FmDonateDlg.pas +++ b/Src/FmDonateDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that displays information about donating to support * CodeSnip along with button to access Paypal donation web page in default diff --git a/Src/FmDuplicateSnippetDlg.pas b/Src/FmDuplicateSnippetDlg.pas index 0db87ce55..878f84d1a 100644 --- a/Src/FmDuplicateSnippetDlg.pas +++ b/Src/FmDuplicateSnippetDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box which can create a duplicate copy of asnippet. } diff --git a/Src/FmEasterEgg.pas b/Src/FmEasterEgg.pas index 031c08228..19fddd207 100644 --- a/Src/FmEasterEgg.pas +++ b/Src/FmEasterEgg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a form that hosts the program's easter egg. } diff --git a/Src/FmFavouritesDlg.pas b/Src/FmFavouritesDlg.pas index d996e25b3..a3461c20e 100644 --- a/Src/FmFavouritesDlg.pas +++ b/Src/FmFavouritesDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that displays and manages the user's favourite * snippets. diff --git a/Src/FmFindCompilerDlg.pas b/Src/FmFindCompilerDlg.pas index abc4ee470..0b32b650f 100644 --- a/Src/FmFindCompilerDlg.pas +++ b/Src/FmFindCompilerDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that is used to select criteria for searches for * snippets that compile or don't compile with selected compilers. diff --git a/Src/FmFindTextDlg.pas b/Src/FmFindTextDlg.pas index d6bc502f1..e7663af37 100644 --- a/Src/FmFindTextDlg.pas +++ b/Src/FmFindTextDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that is used to select criteria for text searches. * diff --git a/Src/FmFindXRefsDlg.pas b/Src/FmFindXRefsDlg.pas index b2ab09ae4..7005e2b24 100644 --- a/Src/FmFindXRefsDlg.pas +++ b/Src/FmFindXRefsDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that is used to select criteria for searches for * cross referenced snippets. diff --git a/Src/FmGenericDlg.pas b/Src/FmGenericDlg.pas index 7752f03f6..96d60e57e 100644 --- a/Src/FmGenericDlg.pas +++ b/Src/FmGenericDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a base class for all the program's dialogue boxes. } diff --git a/Src/FmGenericModalDlg.pas b/Src/FmGenericModalDlg.pas index 5a4f1695b..91ecf29c6 100644 --- a/Src/FmGenericModalDlg.pas +++ b/Src/FmGenericModalDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements an abstract base class for all the program's modal dialogue boxes. } diff --git a/Src/FmGenericNonModalDlg.pas b/Src/FmGenericNonModalDlg.pas index 528af8904..17a65a1eb 100644 --- a/Src/FmGenericNonModalDlg.pas +++ b/Src/FmGenericNonModalDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a base class for all the program's non-modal dialogue boxes. } diff --git a/Src/FmGenericOKDlg.pas b/Src/FmGenericOKDlg.pas index 0bfffc87f..89c74f26f 100644 --- a/Src/FmGenericOKDlg.pas +++ b/Src/FmGenericOKDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a base class for modal dialogue boxes that have both OK and Cancel * buttons. diff --git a/Src/FmGenericViewDlg.pas b/Src/FmGenericViewDlg.pas index 18f5cabf0..c47b21aed 100644 --- a/Src/FmGenericViewDlg.pas +++ b/Src/FmGenericViewDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a base class for modal dialogue boxes that have a single Close * button. diff --git a/Src/FmHelpAware.pas b/Src/FmHelpAware.pas index 0b9a5bbe6..8bcab08e9 100644 --- a/Src/FmHelpAware.pas +++ b/Src/FmHelpAware.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a base class for forms that can access topics in the help file. } diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 83cb77019..32b035f59 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Application's main form. Handles the program's main window display and user * interaction. diff --git a/Src/FmNewHiliterNameDlg.pas b/Src/FmNewHiliterNameDlg.pas index 792517ff5..ded2900e5 100644 --- a/Src/FmNewHiliterNameDlg.pas +++ b/Src/FmNewHiliterNameDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that enables the user to enter a syntax highlighter * name. diff --git a/Src/FmPreferencesDlg.pas b/Src/FmPreferencesDlg.pas index cdc2635f2..390f2cbfb 100644 --- a/Src/FmPreferencesDlg.pas +++ b/Src/FmPreferencesDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that is used to set user preferences. } diff --git a/Src/FmPreviewDlg.pas b/Src/FmPreviewDlg.pas index e6c50485e..9b2a3f1eb 100644 --- a/Src/FmPreviewDlg.pas +++ b/Src/FmPreviewDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that is used to preview or display plain text, HTML * and Rich text documents. diff --git a/Src/FmPrintDlg.pas b/Src/FmPrintDlg.pas index 770129bd9..1270bc76d 100644 --- a/Src/FmPrintDlg.pas +++ b/Src/FmPrintDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a print dialogue box. } diff --git a/Src/FmProxyServerDlg.pas b/Src/FmProxyServerDlg.pas index 8bcda6d5a..727e0020b 100644 --- a/Src/FmProxyServerDlg.pas +++ b/Src/FmProxyServerDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that enables users to configure a proxy server for * use by CodeSnip's web services. diff --git a/Src/FmRenameCategoryDlg.pas b/Src/FmRenameCategoryDlg.pas index 9bf1230fa..3db447920 100644 --- a/Src/FmRenameCategoryDlg.pas +++ b/Src/FmRenameCategoryDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that permits user to select and rename a user * defined category. diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index 83ada4d91..735c64961 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a wizard dialogue box that lets the user select and import * snippets from the DelphiDabbler implementation of the SWAG Pascal archive. diff --git a/Src/FmSelectionSearchDlg.pas b/Src/FmSelectionSearchDlg.pas index 3e7312a7d..b488bdc5f 100644 --- a/Src/FmSelectionSearchDlg.pas +++ b/Src/FmSelectionSearchDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that enables the user to the select the snippets * that are to be displayed. diff --git a/Src/FmSnippetsEditorDlg.FrActiveTextEditor.pas b/Src/FmSnippetsEditorDlg.FrActiveTextEditor.pas index c3dcac798..fe9fcaced 100644 --- a/Src/FmSnippetsEditorDlg.FrActiveTextEditor.pas +++ b/Src/FmSnippetsEditorDlg.FrActiveTextEditor.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * A frame that provides an editor for entering and ammending active text, * either as plain text or in markup. diff --git a/Src/FmSnippetsEditorDlg.pas b/Src/FmSnippetsEditorDlg.pas index 0ba307edc..da31c6fd8 100644 --- a/Src/FmSnippetsEditorDlg.pas +++ b/Src/FmSnippetsEditorDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that enables the user to create or edit user * defined snippets. diff --git a/Src/FmSplash.pas b/Src/FmSplash.pas index 26fdf5b0e..6e937dff2 100644 --- a/Src/FmSplash.pas +++ b/Src/FmSplash.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements the program's splash screen. } diff --git a/Src/FmTestCompileDlg.pas b/Src/FmTestCompileDlg.pas index f2068e1e5..8a83de614 100644 --- a/Src/FmTestCompileDlg.pas +++ b/Src/FmTestCompileDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box which test compiles a snippet and displays the * results. diff --git a/Src/FmTrappedBugReportDlg.pas b/Src/FmTrappedBugReportDlg.pas index 2201826f6..f8ff1f941 100644 --- a/Src/FmTrappedBugReportDlg.pas +++ b/Src/FmTrappedBugReportDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a bug report dialogue box that is displayed when unexpected * exceptions are detected. diff --git a/Src/FmUserBugReportDlg.pas b/Src/FmUserBugReportDlg.pas index 9006b77d0..dcb193bbe 100644 --- a/Src/FmUserBugReportDlg.pas +++ b/Src/FmUserBugReportDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that informs users how to report bugs. } diff --git a/Src/FmUserDataPathDlg.pas b/Src/FmUserDataPathDlg.pas index 6776677ea..ff110a4bc 100644 --- a/Src/FmUserDataPathDlg.pas +++ b/Src/FmUserDataPathDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that can be used to move the user database to a * different directory. diff --git a/Src/FmUserHiliterMgrDlg.pas b/Src/FmUserHiliterMgrDlg.pas index 54a0c78fa..d4371034a 100644 --- a/Src/FmUserHiliterMgrDlg.pas +++ b/Src/FmUserHiliterMgrDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a dialogue box that manages named user defined syntax * highlighters. It lists available named highlighters which can be selected for diff --git a/Src/FmWaitDlg.pas b/Src/FmWaitDlg.pas index eecbee0b8..66f35c92c 100644 --- a/Src/FmWaitDlg.pas +++ b/Src/FmWaitDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a borderless dialogue box that displays a message. * diff --git a/Src/FmWizardDlg.pas b/Src/FmWizardDlg.pas index ef3879adf..b4ef58cc5 100644 --- a/Src/FmWizardDlg.pas +++ b/Src/FmWizardDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Base class for multi-page modal "wizard" dialogue boxes. } diff --git a/Src/FrBrowserBase.pas b/Src/FrBrowserBase.pas index 4eeaa22d3..5dea1ac83 100644 --- a/Src/FrBrowserBase.pas +++ b/Src/FrBrowserBase.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a base class for all frames that contain a web browser control. } diff --git a/Src/FrCategoryDescEdit.pas b/Src/FrCategoryDescEdit.pas index c845fccfd..62b099080 100644 --- a/Src/FrCategoryDescEdit.pas +++ b/Src/FrCategoryDescEdit.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that accepts and validates a description for a snippet * category. diff --git a/Src/FrCategoryList.pas b/Src/FrCategoryList.pas index fbabae8f5..72b4c3a65 100644 --- a/Src/FrCategoryList.pas +++ b/Src/FrCategoryList.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that displays a list of categories and provides access to * the selected category. diff --git a/Src/FrCheckedTV.pas b/Src/FrCheckedTV.pas index 5444b889d..169965bd4 100644 --- a/Src/FrCheckedTV.pas +++ b/Src/FrCheckedTV.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame containing a treeview that has check boxes associated with * tree nodes and updates parent check boxes according to state of child nodes. diff --git a/Src/FrCodeGenPrefs.pas b/Src/FrCodeGenPrefs.pas index 0205bd006..387700edb 100644 --- a/Src/FrCodeGenPrefs.pas +++ b/Src/FrCodeGenPrefs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that allows user to set source code generation * preferences. diff --git a/Src/FrDetail.pas b/Src/FrDetail.pas index a0bee1621..273c18a08 100644 --- a/Src/FrDetail.pas +++ b/Src/FrDetail.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a title frame that displays, and manages user interaction with, * the detail pane tabset. diff --git a/Src/FrDetailView.pas b/Src/FrDetailView.pas index 6bfeac0e5..be4ed5d4d 100644 --- a/Src/FrDetailView.pas +++ b/Src/FrDetailView.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that can display detailed views. } diff --git a/Src/FrDisplayPrefs.pas b/Src/FrDisplayPrefs.pas index 9277f8973..08e053321 100644 --- a/Src/FrDisplayPrefs.pas +++ b/Src/FrDisplayPrefs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that allows user to set application display preferences. * Designed for use as one of the tabs in the preferences dialog box. diff --git a/Src/FrEasterEgg.pas b/Src/FrEasterEgg.pas index c48d93e90..9a5d2ef8d 100644 --- a/Src/FrEasterEgg.pas +++ b/Src/FrEasterEgg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that hosts the HTML, CSS and JavaScript used to display * the program's animated easter egg. diff --git a/Src/FrFixedHTMLDlg.pas b/Src/FrFixedHTMLDlg.pas index 74fcb1177..b3863ec50 100644 --- a/Src/FrFixedHTMLDlg.pas +++ b/Src/FrFixedHTMLDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame containing a web browser control that displays content * loaded from an HTML resource. diff --git a/Src/FrGeneralPrefs.pas b/Src/FrGeneralPrefs.pas index 8fcaf36d6..3b825acde 100644 --- a/Src/FrGeneralPrefs.pas +++ b/Src/FrGeneralPrefs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that allows user to set general application preferences. * Designed for use as one of the tabs in the Preferences dialogue box. diff --git a/Src/FrHTMLDlg.pas b/Src/FrHTMLDlg.pas index 9cc248b13..fc1e17039 100644 --- a/Src/FrHTMLDlg.pas +++ b/Src/FrHTMLDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame containing a web browser control that displays HTML * content that takes on the appearance of a dialogue box. diff --git a/Src/FrHTMLPreview.pas b/Src/FrHTMLPreview.pas index 0b581ce10..bc2aade49 100644 --- a/Src/FrHTMLPreview.pas +++ b/Src/FrHTMLPreview.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame used to display previews of HTML documents. } diff --git a/Src/FrHTMLTpltDlg.pas b/Src/FrHTMLTpltDlg.pas index 435ebe244..d84b9ab04 100644 --- a/Src/FrHTMLTpltDlg.pas +++ b/Src/FrHTMLTpltDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame containing a web browser control that displays HTML * content generated from a template that takes on the appearance of a dialogue diff --git a/Src/FrHiliterPrefs.pas b/Src/FrHiliterPrefs.pas index c21fa1002..97c1ded47 100644 --- a/Src/FrHiliterPrefs.pas +++ b/Src/FrHiliterPrefs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that allows the user to set syntax highlighter * preferences. Designed for use as one of the tabs in the Preferences dialogue diff --git a/Src/FrMemoPreview.pas b/Src/FrMemoPreview.pas index 0e91c54ca..5d2fd9727 100644 --- a/Src/FrMemoPreview.pas +++ b/Src/FrMemoPreview.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements an abstract base class for frames used to display previews of * documents using controls that descend from TCustomMemo. diff --git a/Src/FrNewsPrefs.pas b/Src/FrNewsPrefs.pas index b02e85f8d..78a17f573 100644 --- a/Src/FrNewsPrefs.pas +++ b/Src/FrNewsPrefs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that allows user to set preferences that relate to news * items. diff --git a/Src/FrOverview.pas b/Src/FrOverview.pas index 274ade2ac..7e2ac962b 100644 --- a/Src/FrOverview.pas +++ b/Src/FrOverview.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a titled frame that displays lists of snippets, arranged in * different ways, and manages user interaction with the displayed items. diff --git a/Src/FrPrefsBase.pas b/Src/FrPrefsBase.pas index 718b3bac2..ecd20ee04 100644 --- a/Src/FrPrefsBase.pas +++ b/Src/FrPrefsBase.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that forms an abstract base class for all frames displayed * in the Preferences dialogue box. diff --git a/Src/FrPrintingPrefs.pas b/Src/FrPrintingPrefs.pas index 73ec956b0..86c32fcdc 100644 --- a/Src/FrPrintingPrefs.pas +++ b/Src/FrPrintingPrefs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that allows user to set printing preferences. Designed for * use as one of the tabs in the Preferences dialogue box. diff --git a/Src/FrProgress.pas b/Src/FrProgress.pas index 76757a0a0..cf05e7b39 100644 --- a/Src/FrProgress.pas +++ b/Src/FrProgress.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that displays a message and progress bar. Designed for use * with the TUserDataPathDlg dialogue box to indicate progress when moving the diff --git a/Src/FrRTFPreview.pas b/Src/FrRTFPreview.pas index f994b30cf..9b23bff10 100644 --- a/Src/FrRTFPreview.pas +++ b/Src/FrRTFPreview.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame used to display previews of RTF documents. } diff --git a/Src/FrRTFShowCase.pas b/Src/FrRTFShowCase.pas index a883992b2..d72591d97 100644 --- a/Src/FrRTFShowCase.pas +++ b/Src/FrRTFShowCase.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame containing a rich edit control that is placed in a "show * case", i.e. behind a transparent control that prevents the RTF control and diff --git a/Src/FrSelectSnippets.pas b/Src/FrSelectSnippets.pas index cb6ee5c7c..c3adbcf39 100644 --- a/Src/FrSelectSnippets.pas +++ b/Src/FrSelectSnippets.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that enables one or more snippets from both the user and * main databases to be selected via a tree view. diff --git a/Src/FrSelectSnippetsBase.pas b/Src/FrSelectSnippetsBase.pas index aa45fefc5..4abd97993 100644 --- a/Src/FrSelectSnippetsBase.pas +++ b/Src/FrSelectSnippetsBase.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides an abstract base class for frames that enable categorised snippets * to be selected by means of a tree view displaying check boxes. diff --git a/Src/FrSelectUserSnippets.pas b/Src/FrSelectUserSnippets.pas index 813fb1b09..cc12ee855 100644 --- a/Src/FrSelectUserSnippets.pas +++ b/Src/FrSelectUserSnippets.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that enables one or more snippets in the user-defined * database to be selected via a tree view. diff --git a/Src/FrSnippetLayoutPrefs.pas b/Src/FrSnippetLayoutPrefs.pas index 4765f75da..6d2d2cc9e 100644 --- a/Src/FrSnippetLayoutPrefs.pas +++ b/Src/FrSnippetLayoutPrefs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that allows user to customise appearance of different * kinds of snippets in main display. diff --git a/Src/FrSourcePrefs.pas b/Src/FrSourcePrefs.pas index c5af98062..8803863a9 100644 --- a/Src/FrSourcePrefs.pas +++ b/Src/FrSourcePrefs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame that allows user to set source code preferences. * Designed for use as one of the tabs in the Preferences dialogue box. diff --git a/Src/FrTextPreview.pas b/Src/FrTextPreview.pas index 7efce8cf8..4260cf691 100644 --- a/Src/FrTextPreview.pas +++ b/Src/FrTextPreview.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a frame used to display previews of plain text documents. } diff --git a/Src/FrTitled.pas b/Src/FrTitled.pas index 12cf6d368..be9bf13fb 100644 --- a/Src/FrTitled.pas +++ b/Src/FrTitled.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a base class for frames that display a title bar. } diff --git a/Src/HTML.hrc b/Src/HTML.hrc index 21451ae8c..9f5cf7ff1 100644 --- a/Src/HTML.hrc +++ b/Src/HTML.hrc @@ -2,10 +2,7 @@ # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/ # -# Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). -# -# $Rev$ -# $Date$ +# Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). # # Manifest file used to generate HTML.res resource file. diff --git a/Src/Help/CSS/codesnip.css b/Src/Help/CSS/codesnip.css index f769228c1..a83f65ef1 100644 --- a/Src/Help/CSS/codesnip.css +++ b/Src/Help/CSS/codesnip.css @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * CSS for the CodeSnip HTML help file. */ diff --git a/Src/Help/CodeSnip.hhp b/Src/Help/CodeSnip.hhp index bea2da775..910ec6c0b 100644 --- a/Src/Help/CodeSnip.hhp +++ b/Src/Help/CodeSnip.hhp @@ -2,7 +2,7 @@ ; v. 2.0. If a copy of the MPL was not distributed with this file, You can ; obtain one at http://mozilla.org/MPL/2.0/ ; -; Copyright (C) 2005-2014, Peter Johnson (www.delphidabbler.com). +; Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). ; ; $Rev$ ; $Date$ diff --git a/Src/Help/HTML/about_compiler_checks.htm b/Src/Help/HTML/about_compiler_checks.htm index 8592a6966..716ca984a 100644 --- a/Src/Help/HTML/about_compiler_checks.htm +++ b/Src/Help/HTML/about_compiler_checks.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic explaining compiler checks. --> diff --git a/Src/Help/HTML/about_swag.htm b/Src/Help/HTML/about_swag.htm index 3f39dc08c..fab8aeb0c 100644 --- a/Src/Help/HTML/about_swag.htm +++ b/Src/Help/HTML/about_swag.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic explaining the SWAG database. --> diff --git a/Src/Help/HTML/detail_pane.htm b/Src/Help/HTML/detail_pane.htm index e1dce3cad..e0853918a 100644 --- a/Src/Help/HTML/detail_pane.htm +++ b/Src/Help/HTML/detail_pane.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Details pane. --> diff --git a/Src/Help/HTML/dlg_about.htm b/Src/Help/HTML/dlg_about.htm index d8619218e..12dd727fd 100644 --- a/Src/Help/HTML/dlg_about.htm +++ b/Src/Help/HTML/dlg_about.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for About dialogue box. --> diff --git a/Src/Help/HTML/dlg_addcategory.htm b/Src/Help/HTML/dlg_addcategory.htm index d492d4cd3..b8fca3073 100644 --- a/Src/Help/HTML/dlg_addcategory.htm +++ b/Src/Help/HTML/dlg_addcategory.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Add Category dialogue box. --> diff --git a/Src/Help/HTML/dlg_backup.htm b/Src/Help/HTML/dlg_backup.htm index 96e822f57..c9f1f14fb 100644 --- a/Src/Help/HTML/dlg_backup.htm +++ b/Src/Help/HTML/dlg_backup.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Save Backup dialogue box. --> diff --git a/Src/Help/HTML/dlg_configcompilers.htm b/Src/Help/HTML/dlg_configcompilers.htm index 1bf6b60eb..f35527077 100644 --- a/Src/Help/HTML/dlg_configcompilers.htm +++ b/Src/Help/HTML/dlg_configcompilers.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Configure Compilers dialogue box. --> diff --git a/Src/Help/HTML/dlg_deletecategory.htm b/Src/Help/HTML/dlg_deletecategory.htm index f50806446..2abfc0f36 100644 --- a/Src/Help/HTML/dlg_deletecategory.htm +++ b/Src/Help/HTML/dlg_deletecategory.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Delete Category dialogue box. --> diff --git a/Src/Help/HTML/dlg_dependencies.htm b/Src/Help/HTML/dlg_dependencies.htm index 5cf9290db..0a3812e10 100644 --- a/Src/Help/HTML/dlg_dependencies.htm +++ b/Src/Help/HTML/dlg_dependencies.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Dependencies dialogue box. --> diff --git a/Src/Help/HTML/dlg_dependencies_edit.htm b/Src/Help/HTML/dlg_dependencies_edit.htm index 2d0ac6794..3bb97dec9 100644 --- a/Src/Help/HTML/dlg_dependencies_edit.htm +++ b/Src/Help/HTML/dlg_dependencies_edit.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Dependencies dialogue box displayed from Snippets Editor. --> diff --git a/Src/Help/HTML/dlg_duplicatesnippet.htm b/Src/Help/HTML/dlg_duplicatesnippet.htm index 67edabf68..a8bbff99f 100644 --- a/Src/Help/HTML/dlg_duplicatesnippet.htm +++ b/Src/Help/HTML/dlg_duplicatesnippet.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Duplicate Snippet dialogue box. --> diff --git a/Src/Help/HTML/dlg_editsnippet.htm b/Src/Help/HTML/dlg_editsnippet.htm index ab0a78571..ebdf6b2be 100644 --- a/Src/Help/HTML/dlg_editsnippet.htm +++ b/Src/Help/HTML/dlg_editsnippet.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Snippets Editor. --> diff --git a/Src/Help/HTML/dlg_elementcolour.htm b/Src/Help/HTML/dlg_elementcolour.htm index c7f28a097..205d18cd4 100644 --- a/Src/Help/HTML/dlg_elementcolour.htm +++ b/Src/Help/HTML/dlg_elementcolour.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Choose Element Colour dialogue box. --> diff --git a/Src/Help/HTML/dlg_export.htm b/Src/Help/HTML/dlg_export.htm index 1916be9ab..fb874069a 100644 --- a/Src/Help/HTML/dlg_export.htm +++ b/Src/Help/HTML/dlg_export.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Export Snippets dialogue box. --> diff --git a/Src/Help/HTML/dlg_exportfile.htm b/Src/Help/HTML/dlg_exportfile.htm index 2182856b9..12bb33b1c 100644 --- a/Src/Help/HTML/dlg_exportfile.htm +++ b/Src/Help/HTML/dlg_exportfile.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Export File dialogue box. --> diff --git a/Src/Help/HTML/dlg_favourites.htm b/Src/Help/HTML/dlg_favourites.htm index 1d53471aa..d622c2e50 100644 --- a/Src/Help/HTML/dlg_favourites.htm +++ b/Src/Help/HTML/dlg_favourites.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for the Favourites dialogue box. --> diff --git a/Src/Help/HTML/dlg_findcompiler.htm b/Src/Help/HTML/dlg_findcompiler.htm index 3c5060416..00e72cf7c 100644 --- a/Src/Help/HTML/dlg_findcompiler.htm +++ b/Src/Help/HTML/dlg_findcompiler.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Find Compiler(s) dialogue box. --> diff --git a/Src/Help/HTML/dlg_findtext.htm b/Src/Help/HTML/dlg_findtext.htm index 37c3610d9..249bb5e48 100644 --- a/Src/Help/HTML/dlg_findtext.htm +++ b/Src/Help/HTML/dlg_findtext.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Find Text dialogue box. --> diff --git a/Src/Help/HTML/dlg_findxrefs.htm b/Src/Help/HTML/dlg_findxrefs.htm index 308051b00..860f401b1 100644 --- a/Src/Help/HTML/dlg_findxrefs.htm +++ b/Src/Help/HTML/dlg_findxrefs.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Find Cross References dialogue box. --> diff --git a/Src/Help/HTML/dlg_firstrun.htm b/Src/Help/HTML/dlg_firstrun.htm index 8863fb522..31aaf273f 100644 --- a/Src/Help/HTML/dlg_firstrun.htm +++ b/Src/Help/HTML/dlg_firstrun.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for First Run wizard dialogue box. --> diff --git a/Src/Help/HTML/dlg_hilitemgr.htm b/Src/Help/HTML/dlg_hilitemgr.htm index 1883fc27b..1d5e38e55 100644 --- a/Src/Help/HTML/dlg_hilitemgr.htm +++ b/Src/Help/HTML/dlg_hilitemgr.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for User Defined Highlighters Dialogue Box. --> diff --git a/Src/Help/HTML/dlg_import.htm b/Src/Help/HTML/dlg_import.htm index 3ca2c13de..9b48ddb39 100644 --- a/Src/Help/HTML/dlg_import.htm +++ b/Src/Help/HTML/dlg_import.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Import Wizard dialogue box. --> diff --git a/Src/Help/HTML/dlg_importfile.htm b/Src/Help/HTML/dlg_importfile.htm index 09c05e274..530638aed 100644 --- a/Src/Help/HTML/dlg_importfile.htm +++ b/Src/Help/HTML/dlg_importfile.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Import File dialogue box. --> diff --git a/Src/Help/HTML/dlg_loadselection.htm b/Src/Help/HTML/dlg_loadselection.htm index 889b36813..1cc155170 100644 --- a/Src/Help/HTML/dlg_loadselection.htm +++ b/Src/Help/HTML/dlg_loadselection.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Load Selection dialogue box. --> diff --git a/Src/Help/HTML/dlg_moveuserdb.htm b/Src/Help/HTML/dlg_moveuserdb.htm index 4929933f6..fb7c8dc1a 100644 --- a/Src/Help/HTML/dlg_moveuserdb.htm +++ b/Src/Help/HTML/dlg_moveuserdb.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Move User Database dialogue box. --> diff --git a/Src/Help/HTML/dlg_pagesetup.htm b/Src/Help/HTML/dlg_pagesetup.htm index 783987cea..da96377e0 100644 --- a/Src/Help/HTML/dlg_pagesetup.htm +++ b/Src/Help/HTML/dlg_pagesetup.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Page Setup dialogue box. --> diff --git a/Src/Help/HTML/dlg_preferences.htm b/Src/Help/HTML/dlg_preferences.htm index b7281302b..4d7b4791f 100644 --- a/Src/Help/HTML/dlg_preferences.htm +++ b/Src/Help/HTML/dlg_preferences.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Preferences dialogue box. --> diff --git a/Src/Help/HTML/dlg_prefs_codegen.htm b/Src/Help/HTML/dlg_prefs_codegen.htm index db7e18758..4505c3491 100644 --- a/Src/Help/HTML/dlg_prefs_codegen.htm +++ b/Src/Help/HTML/dlg_prefs_codegen.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Code Generation tab of Preferences dialogue box. --> diff --git a/Src/Help/HTML/dlg_prefs_display.htm b/Src/Help/HTML/dlg_prefs_display.htm index 302994439..71fee7d19 100644 --- a/Src/Help/HTML/dlg_prefs_display.htm +++ b/Src/Help/HTML/dlg_prefs_display.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Display tab of Preferences dialogue box. --> diff --git a/Src/Help/HTML/dlg_prefs_general.htm b/Src/Help/HTML/dlg_prefs_general.htm index 8c89f25a1..acd94153f 100644 --- a/Src/Help/HTML/dlg_prefs_general.htm +++ b/Src/Help/HTML/dlg_prefs_general.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Miscellaneous tab of Preferences dialogue box. --> diff --git a/Src/Help/HTML/dlg_prefs_hiliter.htm b/Src/Help/HTML/dlg_prefs_hiliter.htm index 5e436496c..2bba0f250 100644 --- a/Src/Help/HTML/dlg_prefs_hiliter.htm +++ b/Src/Help/HTML/dlg_prefs_hiliter.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Syntax Highlighter tab of Preferences dialogue box. --> diff --git a/Src/Help/HTML/dlg_prefs_printing.htm b/Src/Help/HTML/dlg_prefs_printing.htm index 0d4f27155..49e83e817 100644 --- a/Src/Help/HTML/dlg_prefs_printing.htm +++ b/Src/Help/HTML/dlg_prefs_printing.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Printing tab of Preferences dialogue box. --> diff --git a/Src/Help/HTML/dlg_prefs_snippetlayout.htm b/Src/Help/HTML/dlg_prefs_snippetlayout.htm index d6b77ff5a..79ac666aa 100644 --- a/Src/Help/HTML/dlg_prefs_snippetlayout.htm +++ b/Src/Help/HTML/dlg_prefs_snippetlayout.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Snippet Layout tab of Preferences dialogue box. --> diff --git a/Src/Help/HTML/dlg_prefs_sourcecode.htm b/Src/Help/HTML/dlg_prefs_sourcecode.htm index a4ad33f61..7042665db 100644 --- a/Src/Help/HTML/dlg_prefs_sourcecode.htm +++ b/Src/Help/HTML/dlg_prefs_sourcecode.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Code Formatting tab of Preferences dialogue box. --> diff --git a/Src/Help/HTML/dlg_prefs_updates.htm b/Src/Help/HTML/dlg_prefs_updates.htm index 37935e15f..689cb799b 100644 --- a/Src/Help/HTML/dlg_prefs_updates.htm +++ b/Src/Help/HTML/dlg_prefs_updates.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Updates tab of Preferences dialogue box. --> diff --git a/Src/Help/HTML/dlg_print.htm b/Src/Help/HTML/dlg_print.htm index 7c466aa78..abb5b9ecf 100644 --- a/Src/Help/HTML/dlg_print.htm +++ b/Src/Help/HTML/dlg_print.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Print dialogue box. --> diff --git a/Src/Help/HTML/dlg_proxyserver.htm b/Src/Help/HTML/dlg_proxyserver.htm index 08b5078b7..a3fbc2845 100644 --- a/Src/Help/HTML/dlg_proxyserver.htm +++ b/Src/Help/HTML/dlg_proxyserver.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Proxy Server dialogue box. --> diff --git a/Src/Help/HTML/dlg_renamecategory.htm b/Src/Help/HTML/dlg_renamecategory.htm index 96e8c23f9..87f45f29c 100644 --- a/Src/Help/HTML/dlg_renamecategory.htm +++ b/Src/Help/HTML/dlg_renamecategory.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Rename Category dialogue box. --> diff --git a/Src/Help/HTML/dlg_restore.htm b/Src/Help/HTML/dlg_restore.htm index fdc437eb9..badddaffd 100644 --- a/Src/Help/HTML/dlg_restore.htm +++ b/Src/Help/HTML/dlg_restore.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Open Backup dialogue box. --> diff --git a/Src/Help/HTML/dlg_savehiliter.htm b/Src/Help/HTML/dlg_savehiliter.htm index 6413d49a5..8d98e3862 100644 --- a/Src/Help/HTML/dlg_savehiliter.htm +++ b/Src/Help/HTML/dlg_savehiliter.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Save Highlighter Dialogue Box. --> diff --git a/Src/Help/HTML/dlg_saveselection.htm b/Src/Help/HTML/dlg_saveselection.htm index c3cd33d86..dcb4c1af0 100644 --- a/Src/Help/HTML/dlg_saveselection.htm +++ b/Src/Help/HTML/dlg_saveselection.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Save Selection dialogue box. --> diff --git a/Src/Help/HTML/dlg_savesnippet.htm b/Src/Help/HTML/dlg_savesnippet.htm index dff0a2de8..59f5288ef 100644 --- a/Src/Help/HTML/dlg_savesnippet.htm +++ b/Src/Help/HTML/dlg_savesnippet.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Save Annotated Source dialogue box. --> diff --git a/Src/Help/HTML/dlg_saveunit.htm b/Src/Help/HTML/dlg_saveunit.htm index c04684b24..4e73f9eba 100644 --- a/Src/Help/HTML/dlg_saveunit.htm +++ b/Src/Help/HTML/dlg_saveunit.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Save Unit dialogue box. --> diff --git a/Src/Help/HTML/dlg_selectcompiler.htm b/Src/Help/HTML/dlg_selectcompiler.htm index 6822bcdba..a2504db93 100644 --- a/Src/Help/HTML/dlg_selectcompiler.htm +++ b/Src/Help/HTML/dlg_selectcompiler.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Select Compiler dialogue box. --> diff --git a/Src/Help/HTML/dlg_selectroutines.htm b/Src/Help/HTML/dlg_selectroutines.htm index 8c07fc65b..294b39704 100644 --- a/Src/Help/HTML/dlg_selectroutines.htm +++ b/Src/Help/HTML/dlg_selectroutines.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Select Snippets dialogue box. --> diff --git a/Src/Help/HTML/dlg_swagimport.htm b/Src/Help/HTML/dlg_swagimport.htm index 283296137..b9bf813b5 100644 --- a/Src/Help/HTML/dlg_swagimport.htm +++ b/Src/Help/HTML/dlg_swagimport.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for the SWAG Import Wizard dialogue box. --> diff --git a/Src/Help/HTML/dlg_testcompile.htm b/Src/Help/HTML/dlg_testcompile.htm index 287e82ea9..33aafc5da 100644 --- a/Src/Help/HTML/dlg_testcompile.htm +++ b/Src/Help/HTML/dlg_testcompile.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Test Compile Results dialogue box. --> diff --git a/Src/Help/HTML/dlg_trappedbugreport.htm b/Src/Help/HTML/dlg_trappedbugreport.htm index 5fffa98ff..f361da65b 100644 --- a/Src/Help/HTML/dlg_trappedbugreport.htm +++ b/Src/Help/HTML/dlg_trappedbugreport.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic dialogue box displayed when program detects a bug to enable bug to * be reported online. diff --git a/Src/Help/HTML/dlg_update.htm b/Src/Help/HTML/dlg_update.htm index 4e07bf9ac..85bce2ccb 100644 --- a/Src/Help/HTML/dlg_update.htm +++ b/Src/Help/HTML/dlg_update.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for Update From Web dialogue box. --> diff --git a/Src/Help/HTML/dlg_userbugreport.htm b/Src/Help/HTML/dlg_userbugreport.htm index 65f81563f..ffc7d7231 100644 --- a/Src/Help/HTML/dlg_userbugreport.htm +++ b/Src/Help/HTML/dlg_userbugreport.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for dialogue box initiated by user to report bugs online. --> diff --git a/Src/Help/HTML/explain_all_compilers_hidden.htm b/Src/Help/HTML/explain_all_compilers_hidden.htm index be3f20528..5287949fe 100644 --- a/Src/Help/HTML/explain_all_compilers_hidden.htm +++ b/Src/Help/HTML/explain_all_compilers_hidden.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic that explains why compiler results table can be empty in detail * pane. diff --git a/Src/Help/HTML/faqs.htm b/Src/Help/HTML/faqs.htm index 53fdccea6..1bce2e91c 100644 --- a/Src/Help/HTML/faqs.htm +++ b/Src/Help/HTML/faqs.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic containing link to online CodeSnip FAQs. --> diff --git a/Src/Help/HTML/license.htm b/Src/Help/HTML/license.htm index 052a0b73e..b3f2d649f 100644 --- a/Src/Help/HTML/license.htm +++ b/Src/Help/HTML/license.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic containing summary of CodeSnip license. --> @@ -30,12 +27,12 @@

      Summary of End User License Agreement

      - DelphiDabbler CodeSnip is copyright © 2005-2016 by Peter D + DelphiDabbler CodeSnip is copyright © 2005-2020 by Peter D Johnson, http://delphidabbler.com. + >https://gravatar.com/delphidabbler.

      The executable version of the program is made available under the terms of diff --git a/Src/Help/HTML/main_display.htm b/Src/Help/HTML/main_display.htm index 5764ff860..90604b065 100644 --- a/Src/Help/HTML/main_display.htm +++ b/Src/Help/HTML/main_display.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing program's main window. --> diff --git a/Src/Help/HTML/main_menu.htm b/Src/Help/HTML/main_menu.htm index 0c6454bd6..2cc45600a 100644 --- a/Src/Help/HTML/main_menu.htm +++ b/Src/Help/HTML/main_menu.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing main menu. --> diff --git a/Src/Help/HTML/markup_editor.htm b/Src/Help/HTML/markup_editor.htm index 75a84ed64..e6ac99558 100644 --- a/Src/Help/HTML/markup_editor.htm +++ b/Src/Help/HTML/markup_editor.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2912-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing the use of the Markup Editor. --> diff --git a/Src/Help/HTML/menu_categories.htm b/Src/Help/HTML/menu_categories.htm index dbb54e17b..aad809b2d 100644 --- a/Src/Help/HTML/menu_categories.htm +++ b/Src/Help/HTML/menu_categories.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing Categories menu. --> diff --git a/Src/Help/HTML/menu_compile.htm b/Src/Help/HTML/menu_compile.htm index 0ecf569e4..b2cd4f297 100644 --- a/Src/Help/HTML/menu_compile.htm +++ b/Src/Help/HTML/menu_compile.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing Compile menu. --> diff --git a/Src/Help/HTML/menu_database.htm b/Src/Help/HTML/menu_database.htm index 1e4a1770b..4433a71fa 100644 --- a/Src/Help/HTML/menu_database.htm +++ b/Src/Help/HTML/menu_database.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing Database menu. --> diff --git a/Src/Help/HTML/menu_edit.htm b/Src/Help/HTML/menu_edit.htm index 054588662..437ad9424 100644 --- a/Src/Help/HTML/menu_edit.htm +++ b/Src/Help/HTML/menu_edit.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing Edit menu. --> diff --git a/Src/Help/HTML/menu_file.htm b/Src/Help/HTML/menu_file.htm index c1c06c6e3..cf9179934 100644 --- a/Src/Help/HTML/menu_file.htm +++ b/Src/Help/HTML/menu_file.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing File menu. --> diff --git a/Src/Help/HTML/menu_help.htm b/Src/Help/HTML/menu_help.htm index 311fd2c01..b33ddf9bf 100644 --- a/Src/Help/HTML/menu_help.htm +++ b/Src/Help/HTML/menu_help.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic descrbing Help menu. --> diff --git a/Src/Help/HTML/menu_search.htm b/Src/Help/HTML/menu_search.htm index e529f21ee..95f13646e 100644 --- a/Src/Help/HTML/menu_search.htm +++ b/Src/Help/HTML/menu_search.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing Search menu. --> diff --git a/Src/Help/HTML/menu_snippets.htm b/Src/Help/HTML/menu_snippets.htm index a0d0e4b29..0016d3ffd 100644 --- a/Src/Help/HTML/menu_snippets.htm +++ b/Src/Help/HTML/menu_snippets.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing Snippets menu. --> diff --git a/Src/Help/HTML/menu_tools.htm b/Src/Help/HTML/menu_tools.htm index e4fa1a6cf..f4db4eda4 100644 --- a/Src/Help/HTML/menu_tools.htm +++ b/Src/Help/HTML/menu_tools.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing Tools menu. --> diff --git a/Src/Help/HTML/menu_view.htm b/Src/Help/HTML/menu_view.htm index 80938a99e..31e3d7c1a 100644 --- a/Src/Help/HTML/menu_view.htm +++ b/Src/Help/HTML/menu_view.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing View menu. --> diff --git a/Src/Help/HTML/navigation.htm b/Src/Help/HTML/navigation.htm index 334bc88a3..151bd1f2c 100644 --- a/Src/Help/HTML/navigation.htm +++ b/Src/Help/HTML/navigation.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing program navigation. --> diff --git a/Src/Help/HTML/new.htm b/Src/Help/HTML/new.htm index 629db49b3..17e2a6404 100644 --- a/Src/Help/HTML/new.htm +++ b/Src/Help/HTML/new.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic listing key new features of CodeSnip 4. --> diff --git a/Src/Help/HTML/notifiy_database_update.htm b/Src/Help/HTML/notifiy_database_update.htm index 022ee8add..10c645866 100644 --- a/Src/Help/HTML/notifiy_database_update.htm +++ b/Src/Help/HTML/notifiy_database_update.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic for database update notification. --> diff --git a/Src/Help/HTML/overview_pane.htm b/Src/Help/HTML/overview_pane.htm index 9cde31aad..0c711579b 100644 --- a/Src/Help/HTML/overview_pane.htm +++ b/Src/Help/HTML/overview_pane.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Overview help topic. --> diff --git a/Src/Help/HTML/privacy_statement.htm b/Src/Help/HTML/privacy_statement.htm index 2992499a1..d58a4d7f7 100644 --- a/Src/Help/HTML/privacy_statement.htm +++ b/Src/Help/HTML/privacy_statement.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic containing program's privacy statement. --> diff --git a/Src/Help/HTML/quickstart.htm b/Src/Help/HTML/quickstart.htm index db2053cde..9fb340ea2 100644 --- a/Src/Help/HTML/quickstart.htm +++ b/Src/Help/HTML/quickstart.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Quick start help topic. --> diff --git a/Src/Help/HTML/reml.htm b/Src/Help/HTML/reml.htm index ea23e0ae8..b7d4fd0e2 100644 --- a/Src/Help/HTML/reml.htm +++ b/Src/Help/HTML/reml.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing REML markup language. --> diff --git a/Src/Help/HTML/snippet_class.htm b/Src/Help/HTML/snippet_class.htm index c500fce52..c34d7c29c 100644 --- a/Src/Help/HTML/snippet_class.htm +++ b/Src/Help/HTML/snippet_class.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing class and advanced record snippet kind. --> diff --git a/Src/Help/HTML/snippet_constant.htm b/Src/Help/HTML/snippet_constant.htm index 52846a2e9..2b8060f15 100644 --- a/Src/Help/HTML/snippet_constant.htm +++ b/Src/Help/HTML/snippet_constant.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing constant snippet kind. --> diff --git a/Src/Help/HTML/snippet_freeform.htm b/Src/Help/HTML/snippet_freeform.htm index 5bb945048..6eaf1764e 100644 --- a/Src/Help/HTML/snippet_freeform.htm +++ b/Src/Help/HTML/snippet_freeform.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing freeform snippet kind. --> diff --git a/Src/Help/HTML/snippet_kinds.htm b/Src/Help/HTML/snippet_kinds.htm index a33ab112d..b1309f8a3 100644 --- a/Src/Help/HTML/snippet_kinds.htm +++ b/Src/Help/HTML/snippet_kinds.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic providing an overview of snippet kinds. --> diff --git a/Src/Help/HTML/snippet_routine.htm b/Src/Help/HTML/snippet_routine.htm index 088bc524d..8459f2d53 100644 --- a/Src/Help/HTML/snippet_routine.htm +++ b/Src/Help/HTML/snippet_routine.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic dscribing the routine snippet kind. --> diff --git a/Src/Help/HTML/snippet_type.htm b/Src/Help/HTML/snippet_type.htm index 43b68e59c..1d50310d1 100644 --- a/Src/Help/HTML/snippet_type.htm +++ b/Src/Help/HTML/snippet_type.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing the type definition snippet kind. --> diff --git a/Src/Help/HTML/snippet_unit.htm b/Src/Help/HTML/snippet_unit.htm index c6bb1be30..d08a6e23f 100644 --- a/Src/Help/HTML/snippet_unit.htm +++ b/Src/Help/HTML/snippet_unit.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing the unit snippet kind. --> diff --git a/Src/Help/HTML/task_addsnippets.htm b/Src/Help/HTML/task_addsnippets.htm index 514962a1c..4c50abd79 100644 --- a/Src/Help/HTML/task_addsnippets.htm +++ b/Src/Help/HTML/task_addsnippets.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Hell topic describing how to add snippets to the database. --> diff --git a/Src/Help/HTML/task_copysnippet.htm b/Src/Help/HTML/task_copysnippet.htm index 803e32274..7db32ae6d 100644 --- a/Src/Help/HTML/task_copysnippet.htm +++ b/Src/Help/HTML/task_copysnippet.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing how to copy a snippet to the clipboard. --> diff --git a/Src/Help/HTML/task_customise.htm b/Src/Help/HTML/task_customise.htm index 12c3495e5..32d16abb2 100644 --- a/Src/Help/HTML/task_customise.htm +++ b/Src/Help/HTML/task_customise.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing how to customise CodeSnip. --> diff --git a/Src/Help/HTML/task_export.htm b/Src/Help/HTML/task_export.htm index c99b174ce..b2c247d01 100644 --- a/Src/Help/HTML/task_export.htm +++ b/Src/Help/HTML/task_export.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing how to import and export snippets. --> diff --git a/Src/Help/HTML/task_generateunit.htm b/Src/Help/HTML/task_generateunit.htm index 7e24b9cb2..e64901060 100644 --- a/Src/Help/HTML/task_generateunit.htm +++ b/Src/Help/HTML/task_generateunit.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing how to generate a Pascal unit. --> diff --git a/Src/Help/HTML/task_printroutine.htm b/Src/Help/HTML/task_printroutine.htm index dee8a7ca2..23d3d956f 100644 --- a/Src/Help/HTML/task_printroutine.htm +++ b/Src/Help/HTML/task_printroutine.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing how to print snippet information. --> diff --git a/Src/Help/HTML/task_savesnippet.htm b/Src/Help/HTML/task_savesnippet.htm index e4e2189fa..6008bffa0 100644 --- a/Src/Help/HTML/task_savesnippet.htm +++ b/Src/Help/HTML/task_savesnippet.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing how to save a snippet to disk. --> diff --git a/Src/Help/HTML/task_search.htm b/Src/Help/HTML/task_search.htm index 8a6a85d6e..c4cd8cda3 100644 --- a/Src/Help/HTML/task_search.htm +++ b/Src/Help/HTML/task_search.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing how to search the database. --> diff --git a/Src/Help/HTML/task_testcompile.htm b/Src/Help/HTML/task_testcompile.htm index b5a064b4e..655d90fa2 100644 --- a/Src/Help/HTML/task_testcompile.htm +++ b/Src/Help/HTML/task_testcompile.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing how to test compile a snippet. --> diff --git a/Src/Help/HTML/task_update.htm b/Src/Help/HTML/task_update.htm index 2db98f0c8..f2cc79868 100644 --- a/Src/Help/HTML/task_update.htm +++ b/Src/Help/HTML/task_update.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Help topic describing how to update database. --> diff --git a/Src/Help/HTML/tasks.htm b/Src/Help/HTML/tasks.htm index 31614157a..d80bc01c4 100644 --- a/Src/Help/HTML/tasks.htm +++ b/Src/Help/HTML/tasks.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Summary help topic for Tasks section of help file. --> diff --git a/Src/Help/HTML/welcome.htm b/Src/Help/HTML/welcome.htm index 516c9c6f4..0e8cecd94 100644 --- a/Src/Help/HTML/welcome.htm +++ b/Src/Help/HTML/welcome.htm @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Overview help topic (formerly Welcome topic). --> diff --git a/Src/Help/Index.hhk b/Src/Help/Index.hhk index fde82cf94..5d839b0e2 100644 --- a/Src/Help/Index.hhk +++ b/Src/Help/Index.hhk @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip help index file. --> diff --git a/Src/Help/TOC.hhc b/Src/Help/TOC.hhc index fc3b7d910..aac5a17f2 100644 --- a/Src/Help/TOC.hhc +++ b/Src/Help/TOC.hhc @@ -4,10 +4,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * CodeSnip help table of contents file. --> diff --git a/Src/Hiliter.UAttrs.pas b/Src/Hiliter.UAttrs.pas index b4f4f840c..8d7618155 100644 --- a/Src/Hiliter.UAttrs.pas +++ b/Src/Hiliter.UAttrs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements classes that define syntax highlighter attributes along with an * object that provides a list of named highlighter attributes. diff --git a/Src/Hiliter.UCSS.pas b/Src/Hiliter.UCSS.pas index adca61ca7..55baeb8ad 100644 --- a/Src/Hiliter.UCSS.pas +++ b/Src/Hiliter.UCSS.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a class that generates CSS code to enable syntax highlighted source * to be displayed in HTML. CSS code uses a highlighter's attributes. Access to diff --git a/Src/Hiliter.UFileHiliter.pas b/Src/Hiliter.UFileHiliter.pas index 89ef276c1..a197540b3 100644 --- a/Src/Hiliter.UFileHiliter.pas +++ b/Src/Hiliter.UFileHiliter.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that generates hilighted and formatted source code for a * specified file type. diff --git a/Src/Hiliter.UGlobals.pas b/Src/Hiliter.UGlobals.pas index 1177a4966..51a1d7492 100644 --- a/Src/Hiliter.UGlobals.pas +++ b/Src/Hiliter.UGlobals.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Declares various types that describe syntax hilighters and and defines * interfaces to various syntax highlighters and highlighter attributes. diff --git a/Src/Hiliter.UHiliters.pas b/Src/Hiliter.UHiliters.pas index e789ac74e..f223ebbe6 100644 --- a/Src/Hiliter.UHiliters.pas +++ b/Src/Hiliter.UHiliters.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides highlighter classes used to format and highlight source code in * various file formats. Contains a factory object and implementation of various diff --git a/Src/Hiliter.UPasLexer.pas b/Src/Hiliter.UPasLexer.pas index 88d632fbe..6f11ed348 100644 --- a/Src/Hiliter.UPasLexer.pas +++ b/Src/Hiliter.UPasLexer.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a class that analyses and tokenises Pascal source code. } diff --git a/Src/Hiliter.UPasParser.pas b/Src/Hiliter.UPasParser.pas index 55403c8ee..438923f83 100644 --- a/Src/Hiliter.UPasParser.pas +++ b/Src/Hiliter.UPasParser.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a class that parses Pascal source files and splits into different * highlighting elements. diff --git a/Src/Hiliter.UPersist.pas b/Src/Hiliter.UPersist.pas index a121744a9..8dfb9902b 100644 --- a/Src/Hiliter.UPersist.pas +++ b/Src/Hiliter.UPersist.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that can persist syntax highlighter attributes * to/from a given storage. diff --git a/Src/Install/Assets/LICENSE b/Src/Install/Assets/LICENSE index f9915218c..7a6a68398 100644 --- a/Src/Install/Assets/LICENSE +++ b/Src/Install/Assets/LICENSE @@ -5,4 +5,5 @@ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -All files are copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). \ No newline at end of file +All files are copyright (C) 2012-2020, Peter Johnson +(gravatar.com/delphidabbler). diff --git a/Src/Install/CodeSnip.iss b/Src/Install/CodeSnip.iss index 7d0df17f3..d2e4dd904 100644 --- a/Src/Install/CodeSnip.iss +++ b/Src/Install/CodeSnip.iss @@ -2,10 +2,7 @@ ; v. 2.0. If a copy of the MPL was not distributed with this file, You can ; obtain one at http://mozilla.org/MPL/2.0/ ; -; Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). -; -; $Rev$ -; $Date$ +; Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). ; ; Install file generation script for use with Inno Setup. diff --git a/Src/Install/DataLocations.ps b/Src/Install/DataLocations.ps index 0461036c1d062f232cf249c8e15885265e4111fa..1660115501025d4e95445a741f392ed669e5ea94 100644 GIT binary patch delta 59 zcmX@4zD|9@YkeaF9fg3@lGGvvul$U>;`}@Xjr5|#vc!_aBE97NT>X^PoPvzZl*FW@ OoYW#sz0G=zQ-lDN;T3ZL delta 79 zcmZ3den@@7YiC0v9fg3@lGGvvul$U>;`}@Xjq>txy_D3Pf{e_R#H6I0)FQp){9H{v cUM>YK5LQqLN-a}?uv`*LQdKrfF-{Qz068NV9smFU diff --git a/Src/Install/EventHandlers.ps b/Src/Install/EventHandlers.ps index 82ebcf4018901702981e9d28a84cbf3a7cd32da8..bc278a4db7b79dbaa63a81a3af5dd077e5abc9a6 100644 GIT binary patch delta 59 zcmX?Xx882TYkeaF9fg3@lGGvvul$U>;`}@Xjr5|#vc!_aBE97NT>X^PoPvzZl*FW@ OoYW#sz0G=zqH+M9p%pLy delta 79 zcmZ2)ci3*iYiC1a9fg3@lGGvvul$U>;`}@Xjq>txy_D3Pf{e_R#H6I0)FQp){9H{v cUM>YK5LQqLN-a}?uv`*LQdKrfF^b9o07mK;+yDRo diff --git a/Src/Install/Unicode.ps b/Src/Install/Unicode.ps index c9bf7ff414e876e57a4edd4fac72100ed1511071..77c20881aecb5c1d06cbb8a23b1644539436fa54 100644 GIT binary patch delta 59 zcmdlkx>$6=YkeaF9fg3@lGGvvul$U>;`}@Xjr5|#vc!_aBE97NT>X^PoPvzZl*FW@ OoYW#sz0G=zotyxN!WAU| delta 79 zcmZ21x?Oa_YiC0v9fg3@lGGvvul$U>;`}@Xjq>txy_D3Pf{e_R#H6I0)FQp){9H{v cUM>YK5LQqLN-a}?uv`*LQdKrfF?MnS04IDG&;S4c diff --git a/Src/Install/UpdateDBase.ps b/Src/Install/UpdateDBase.ps index 5cc3f6839676cd253e5724562eedf07c795efbee..ac0cb98d4317a462457eceb15d3e901ad199d40e 100644 GIT binary patch delta 59 zcmcb{e~5p=YkeaF9fg3@lGGvvul$U>;`}@Xjr5|#vc!_aBE97NT>X^PoPvzZl*FW@ OoYW#sz0G=zE7$;&T@`Zx delta 79 zcmX@ae~o{_YiC0v9fg3@lGGvvul$U>;`}@Xjq>txy_D3Pf{e_R#H6I0)FQp){9H{v cUM>YK5LQqLN-a}?uv`*LQdKrfF|J?(05<;^9smFU diff --git a/Src/Install/UpdateIni.ps b/Src/Install/UpdateIni.ps index f3bf50c6ff9f2da4c3aedff73b0ac8af20897f8a..452dacff13ceb3f0a7b7e953c1fd52a8a3598b7c 100644 GIT binary patch delta 59 zcmew$dq;M{YkeaF9fg3@lGGvvul$U>;`}@Xjr5|#vc!_aBE97NT>X^PoPvzZl*FW@ OoYW#sz0G=zhj;;{oE78% delta 79 zcmca3`$2ZXYiC0v9fg3@lGGvvul$U>;`}@Xjq>txy_D3Pf{e_R#H6I0)FQp){9H{v cUM>YK5LQqLN-a}?uv`*LQdKrfF&^Rt08f4xj{pDw diff --git a/Src/Install/VersionInfo.ps b/Src/Install/VersionInfo.ps index 41c609ef05b81481d56424c7356ee30afc19807a..29ca1c9cc4ea6040b00834aa8666d4938baad6da 100644 GIT binary patch delta 62 zcmZpZ`XxExv5~HkfsuiZLO^OsYLS9henwt#ex8CxdQoCoVo73=UUGh}eoAUiK}Kdu RVp390YLTYiW<|!Q+yJ?M7B2t* delta 74 zcmew**(NpNv7L@WKx#>9k%Cu#MqY7#o`ObsdAVLnYED5$W=djGQch}-UUGh}rXH7q Z77!_@1f`a#fEg}{C8;W#MH!!R0|3>^7r_7k diff --git a/Src/IntfAligner.pas b/Src/IntfAligner.pas index b0e075747..a60d63226 100644 --- a/Src/IntfAligner.pas +++ b/Src/IntfAligner.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Declares an interface supported by objects that can align a form on screen. } diff --git a/Src/IntfCommon.pas b/Src/IntfCommon.pas index 0bde0ad78..c8c9e2390 100644 --- a/Src/IntfCommon.pas +++ b/Src/IntfCommon.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Common general purpose interfaces. } diff --git a/Src/IntfFrameMgrs.pas b/Src/IntfFrameMgrs.pas index 2434bab7e..d22b910af 100644 --- a/Src/IntfFrameMgrs.pas +++ b/Src/IntfFrameMgrs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Declares interfaces, constants and enumerations required to manage various * parts of CodeSnip's UI. diff --git a/Src/IntfNotifier.pas b/Src/IntfNotifier.pas index a37a99b6a..7c9968e7e 100644 --- a/Src/IntfNotifier.pas +++ b/Src/IntfNotifier.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines interfaces to set up and use the notifier object that triggers * actions in response to user initiated events in the GUI. diff --git a/Src/IntfPreview.pas b/Src/IntfPreview.pas index ba6742425..f404c711d 100644 --- a/Src/IntfPreview.pas +++ b/Src/IntfPreview.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines the interface implemented by objects that can display a document of a * certain type in a preview dialogue box. diff --git a/Src/Makefile b/Src/Makefile index 29d2d2417..64845b682 100644 --- a/Src/Makefile +++ b/Src/Makefile @@ -2,10 +2,7 @@ # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/ # -# Copyright (C) 2009-2015, Peter Johnson (www.delphidabbler.com). -# -# $Rev$ -# $Date$ +# Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). # # Makefile for the CodeSnip project. diff --git a/Src/Res/CSS/detail.css b/Src/Res/CSS/detail.css index 2232cf903..5a5a3321f 100644 --- a/Src/Res/CSS/detail.css +++ b/Src/Res/CSS/detail.css @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Cascading style sheet used by HTML displayed in detail panes. */ diff --git a/Src/Res/CSS/easteregg.css b/Src/Res/CSS/easteregg.css index f6959a61f..1de8ad2be 100644 --- a/Src/Res/CSS/easteregg.css +++ b/Src/Res/CSS/easteregg.css @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Cascading style sheet used to format HTML displayed in program's easter egg. */ diff --git a/Src/Res/HTML/dlg-about-database-tplt.html b/Src/Res/HTML/dlg-about-database-tplt.html index 2e2f0e8e5..899886bbc 100644 --- a/Src/Res/HTML/dlg-about-database-tplt.html +++ b/Src/Res/HTML/dlg-about-database-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Template for content displayed in database tab of about dialogue box. --> diff --git a/Src/Res/HTML/dlg-about-head-tplt.html b/Src/Res/HTML/dlg-about-head-tplt.html index 1403b5779..2043cc328 100644 --- a/Src/Res/HTML/dlg-about-head-tplt.html +++ b/Src/Res/HTML/dlg-about-head-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Template for content displayed in heading of about dialog box. --> diff --git a/Src/Res/HTML/dlg-about-program-tplt.html b/Src/Res/HTML/dlg-about-program-tplt.html index d75284a30..9d0d6b352 100644 --- a/Src/Res/HTML/dlg-about-program-tplt.html +++ b/Src/Res/HTML/dlg-about-program-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Template for content displayed in program tab of about dialog box. --> diff --git a/Src/Res/HTML/dlg-activetext-preview-tplt.html b/Src/Res/HTML/dlg-activetext-preview-tplt.html index d66c60625..9620a1d40 100644 --- a/Src/Res/HTML/dlg-activetext-preview-tplt.html +++ b/Src/Res/HTML/dlg-activetext-preview-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Template for content displayed in active text preview dialogue box. --> diff --git a/Src/Res/HTML/dlg-codesubmit-finished.html b/Src/Res/HTML/dlg-codesubmit-finished.html index 9c7630db8..bb6898eda 100644 --- a/Src/Res/HTML/dlg-codesubmit-finished.html +++ b/Src/Res/HTML/dlg-codesubmit-finished.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2014-2020, Peter Johnson (gravatar.com/delphidabbler). * * Content of the last page of the Code Submission Wizard. --> diff --git a/Src/Res/HTML/dlg-codesubmit-intro.html b/Src/Res/HTML/dlg-codesubmit-intro.html index 2a0726624..7bc1a88e7 100644 --- a/Src/Res/HTML/dlg-codesubmit-intro.html +++ b/Src/Res/HTML/dlg-codesubmit-intro.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2014-2020, Peter Johnson (gravatar.com/delphidabbler). * * Content of the introductory page of the Code Submission Wizard. --> diff --git a/Src/Res/HTML/dlg-codesubmit-license.html b/Src/Res/HTML/dlg-codesubmit-license.html index 46ce97bec..ada1e428a 100644 --- a/Src/Res/HTML/dlg-codesubmit-license.html +++ b/Src/Res/HTML/dlg-codesubmit-license.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2014-2020, Peter Johnson (gravatar.com/delphidabbler). * * Content of the license page of the Code Submission Wizard. --> diff --git a/Src/Res/HTML/dlg-codesubmit-submit.html b/Src/Res/HTML/dlg-codesubmit-submit.html index 945215933..8368ac8d1 100644 --- a/Src/Res/HTML/dlg-codesubmit-submit.html +++ b/Src/Res/HTML/dlg-codesubmit-submit.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2014-2020, Peter Johnson (gravatar.com/delphidabbler). * * Content of the submit page of the Code Submission Wizard. --> diff --git a/Src/Res/HTML/dlg-comperror-tplt.html b/Src/Res/HTML/dlg-comperror-tplt.html index 61e1a41c1..8a78f5938 100644 --- a/Src/Res/HTML/dlg-comperror-tplt.html +++ b/Src/Res/HTML/dlg-comperror-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Template for content displayed in compiler errors dialog box. --> diff --git a/Src/Res/HTML/dlg-dbupdate-finish.html b/Src/Res/HTML/dlg-dbupdate-finish.html index f43ed6e3e..a63e26995 100644 --- a/Src/Res/HTML/dlg-dbupdate-finish.html +++ b/Src/Res/HTML/dlg-dbupdate-finish.html @@ -9,7 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2020, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2020, Peter Johnson (gravatar.com/delphidabbler). * * Information displayed on the Finish page of the main Database Installation * Wizard. diff --git a/Src/Res/HTML/dlg-dbupdate-intro-tplt.html b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html index ba140b344..b8640a148 100644 --- a/Src/Res/HTML/dlg-dbupdate-intro-tplt.html +++ b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html @@ -9,7 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2020, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2020, Peter Johnson (gravatar.com/delphidabbler). * * Information displayed on the Intro page of the main Database Installation * Wizard. diff --git a/Src/Res/HTML/dlg-dbupdate-load.html b/Src/Res/HTML/dlg-dbupdate-load.html index 50c97e1e7..d15334ad0 100644 --- a/Src/Res/HTML/dlg-dbupdate-load.html +++ b/Src/Res/HTML/dlg-dbupdate-load.html @@ -9,7 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2020, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2020, Peter Johnson (gravatar.com/delphidabbler). * * Information displayed on the Load page of the main Database Installation * Wizard. diff --git a/Src/Res/HTML/dlg-donate.html b/Src/Res/HTML/dlg-donate.html index 4bc8e77c3..1dc3f6c9f 100644 --- a/Src/Res/HTML/dlg-donate.html +++ b/Src/Res/HTML/dlg-donate.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Content of Donate dialogue box. --> diff --git a/Src/Res/HTML/dlg-easter-egg.html b/Src/Res/HTML/dlg-easter-egg.html index e7ffd2857..d3779c062 100644 --- a/Src/Res/HTML/dlg-easter-egg.html +++ b/Src/Res/HTML/dlg-easter-egg.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Content displayed as program's easter egg. References required style sheet * and JavaScript code. diff --git a/Src/Res/HTML/dlg-rssnews.html b/Src/Res/HTML/dlg-rssnews.html index 186032eda..c7f1a3a4c 100644 --- a/Src/Res/HTML/dlg-rssnews.html +++ b/Src/Res/HTML/dlg-rssnews.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Template for content displayed in news dialogue box. --> diff --git a/Src/Res/HTML/dlg-swag-import-intro-tplt.html b/Src/Res/HTML/dlg-swag-import-intro-tplt.html index 9fab4f1b5..b80aba355 100644 --- a/Src/Res/HTML/dlg-swag-import-intro-tplt.html +++ b/Src/Res/HTML/dlg-swag-import-intro-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Introductory information displayed on the first page of the SWAG Import * Wizard. diff --git a/Src/Res/HTML/dlg-swag-import-outro-tplt.html b/Src/Res/HTML/dlg-swag-import-outro-tplt.html index 06128126e..1bc72e4e0 100644 --- a/Src/Res/HTML/dlg-swag-import-outro-tplt.html +++ b/Src/Res/HTML/dlg-swag-import-outro-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Information displayed on the final page of the SWAG Import Wizard. --> diff --git a/Src/Res/HTML/frm-emailprivacy.html b/Src/Res/HTML/frm-emailprivacy.html index 3fa8f8e56..db7d98fa8 100644 --- a/Src/Res/HTML/frm-emailprivacy.html +++ b/Src/Res/HTML/frm-emailprivacy.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Notes on privacy with link to privacy statement help topic. For display in a * frame in various dialogue boxes. diff --git a/Src/Res/HTML/info-basic-tplt.html b/Src/Res/HTML/info-basic-tplt.html index 50d99b327..31889ffe2 100644 --- a/Src/Res/HTML/info-basic-tplt.html +++ b/Src/Res/HTML/info-basic-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Basic detail pane template that displays basic content within the body. --> diff --git a/Src/Res/HTML/info-empty-selection-tplt.html b/Src/Res/HTML/info-empty-selection-tplt.html index 48d1e2a18..7990d7913 100644 --- a/Src/Res/HTML/info-empty-selection-tplt.html +++ b/Src/Res/HTML/info-empty-selection-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Information pane template used to display an empty list of snippets. --> diff --git a/Src/Res/HTML/info-snippet-list-tplt.html b/Src/Res/HTML/info-snippet-list-tplt.html index a6399419a..f1af84732 100644 --- a/Src/Res/HTML/info-snippet-list-tplt.html +++ b/Src/Res/HTML/info-snippet-list-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Information pane template used to display list of selected snippets with * descriptions. diff --git a/Src/Res/HTML/info-snippet-tplt.html b/Src/Res/HTML/info-snippet-tplt.html index 8dbc29caa..008815ada 100644 --- a/Src/Res/HTML/info-snippet-tplt.html +++ b/Src/Res/HTML/info-snippet-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Information pane template used to display details of currently selected * snippet. diff --git a/Src/Res/HTML/welcome-tplt.html b/Src/Res/HTML/welcome-tplt.html index 2dce0f5bd..eed51f34f 100644 --- a/Src/Res/HTML/welcome-tplt.html +++ b/Src/Res/HTML/welcome-tplt.html @@ -9,10 +9,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Template for welcome page displayed in any detail pane. --> diff --git a/Src/Res/Img/Branding/LICENSE b/Src/Res/Img/Branding/LICENSE index 58a2c21ed..8f9a4b79b 100644 --- a/Src/Res/Img/Branding/LICENSE +++ b/Src/Res/Img/Branding/LICENSE @@ -1,5 +1,5 @@ -All image files in the Src/Res/Img/Branding directory are copyright (c) 2012 by -Peter D Johnson, http://www.delphidabbler.com/. +All image files in the Src/Res/Img/Branding directory are copyright +(C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). The files may not be copied or modified and may not be used in the distribution of derived programs without explicit permission of the copyright holder. diff --git a/Src/Res/Misc/CodeSnip.manifest b/Src/Res/Misc/CodeSnip.manifest index 9b018529c..06907cfd6 100644 --- a/Src/Res/Misc/CodeSnip.manifest +++ b/Src/Res/Misc/CodeSnip.manifest @@ -5,10 +5,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Application manifest file. --> diff --git a/Src/Res/Scripts/easteregg.js b/Src/Res/Scripts/easteregg.js index 916f00438..474cebc33 100644 --- a/Src/Res/Scripts/easteregg.js +++ b/Src/Res/Scripts/easteregg.js @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * JavaScript code used to perform animations in program's easter egg. * Requires jQuery and lite version of jQuery Cycle plug-in. diff --git a/Src/Res/Scripts/external.js b/Src/Res/Scripts/external.js index 56bf229f3..b20aefc7b 100644 --- a/Src/Res/Scripts/external.js +++ b/Src/Res/Scripts/external.js @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * JavaScript code used call into host application via external object. All * HTML and JavaScript code should call these routines rather than making diff --git a/Src/Res/Scripts/overflowXFix.js b/Src/Res/Scripts/overflowXFix.js index d58cdbe5e..4843b10e8 100644 --- a/Src/Res/Scripts/overflowXFix.js +++ b/Src/Res/Scripts/overflowXFix.js @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * JavaScript code used fix the overflow "auto" display bug in Internet * explorer where specifying "auto" as the value of the overflow-x CSS property diff --git a/Src/Resources.rc b/Src/Resources.rc index c5cbcd27f..8fab1e84a 100644 --- a/Src/Resources.rc +++ b/Src/Resources.rc @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Resource file containing images, dialogue boxes and manifest for CodeSnip * program. diff --git a/Src/SWAG.UCommon.pas b/Src/SWAG.UCommon.pas index d239fc212..6eba1b193 100644 --- a/Src/SWAG.UCommon.pas +++ b/Src/SWAG.UCommon.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines records that encapsulate SWAG database categories and snippets. } diff --git a/Src/SWAG.UImporter.pas b/Src/SWAG.UImporter.pas index 1d5b416a0..048655341 100644 --- a/Src/SWAG.UImporter.pas +++ b/Src/SWAG.UImporter.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that converts snippets from the SWAG database into * CodeSnip format and adds them to the database. diff --git a/Src/SWAG.UReader.pas b/Src/SWAG.UReader.pas index 5936a8d57..ef10d6d95 100644 --- a/Src/SWAG.UReader.pas +++ b/Src/SWAG.UReader.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that provides cached access to the SWAG database. } diff --git a/Src/SWAG.USnippetCache.pas b/Src/SWAG.USnippetCache.pas index 1c5464a37..903176374 100644 --- a/Src/SWAG.USnippetCache.pas +++ b/Src/SWAG.USnippetCache.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides a class that implements a cache of SWAG snippets. } diff --git a/Src/SWAG.UXMLProcessor.pas b/Src/SWAG.UXMLProcessor.pas index 12a2520bc..982c3695e 100644 --- a/Src/SWAG.UXMLProcessor.pas +++ b/Src/SWAG.UXMLProcessor.pas @@ -3,7 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2020, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that interfaces with a local copy of the DelphiDabbler * version of the SWAG databases to get snippet and category information. diff --git a/Src/UActionFactory.pas b/Src/UActionFactory.pas index 319610b1d..350d5ec77 100644 --- a/Src/UActionFactory.pas +++ b/Src/UActionFactory.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines static factory class that can create various kinds of actions. } diff --git a/Src/UAnchors.pas b/Src/UAnchors.pas index 833074fce..7978e3b67 100644 --- a/Src/UAnchors.pas +++ b/Src/UAnchors.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a static class that gets information about and manipulates HTML * anchor element. diff --git a/Src/UAppInfo.pas b/Src/UAppInfo.pas index 438c6dbfd..3029f4ca0 100644 --- a/Src/UAppInfo.pas +++ b/Src/UAppInfo.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that provides information about the application. } diff --git a/Src/UBaseObjects.pas b/Src/UBaseObjects.pas index 2a50a8ab2..7750134e1 100644 --- a/Src/UBaseObjects.pas +++ b/Src/UBaseObjects.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Contains various common classes for use as base classes to other classes. * Classes are: diff --git a/Src/UBox.pas b/Src/UBox.pas index 14610e2f8..40860d6f7 100644 --- a/Src/UBox.pas +++ b/Src/UBox.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a generic class that can wrap any type in an object. Designed for * use in wrapping value types and strings in objects. diff --git a/Src/UBrowseForFolderDlg.pas b/Src/UBrowseForFolderDlg.pas index 977bf1dea..e3f1aeef1 100644 --- a/Src/UBrowseForFolderDlg.pas +++ b/Src/UBrowseForFolderDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that displays a browse for folder dialog box. } diff --git a/Src/UBrowseProtocol.pas b/Src/UBrowseProtocol.pas index da2cc409c..010c22418 100644 --- a/Src/UBrowseProtocol.pas +++ b/Src/UBrowseProtocol.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a abstract base class for protocol handlers that access a URL * using a TBrowseURL action. diff --git a/Src/UCSSBuilder.pas b/Src/UCSSBuilder.pas index 8dd4f7a6a..0ae608ef0 100644 --- a/Src/UCSSBuilder.pas +++ b/Src/UCSSBuilder.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Classes that help create and manage cascading style sheet code. } diff --git a/Src/UCSSUtils.pas b/Src/UCSSUtils.pas index 7119fe6ff..dd2586fab 100644 --- a/Src/UCSSUtils.pas +++ b/Src/UCSSUtils.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Static method record that assists in generating CSS properties. } diff --git a/Src/UCategoryAction.pas b/Src/UCategoryAction.pas index 8734c8313..e3ba8137a 100644 --- a/Src/UCategoryAction.pas +++ b/Src/UCategoryAction.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Custom action used to display a category by ID. Stores id of required * category in properties. Displays category by creating a view and using diff --git a/Src/UCategoryListAdapter.pas b/Src/UCategoryListAdapter.pas index 2edd299db..aac539bfc 100644 --- a/Src/UCategoryListAdapter.pas +++ b/Src/UCategoryListAdapter.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that adapts a list of snippets categories by providing an * alternative interface to the list sorted by description. Designed for use diff --git a/Src/UClassHelpers.pas b/Src/UClassHelpers.pas index 240910a9a..99d504d02 100644 --- a/Src/UClassHelpers.pas +++ b/Src/UClassHelpers.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides various class helpers for VCL classes. } diff --git a/Src/UClipboardHelper.pas b/Src/UClipboardHelper.pas index a3fc9b575..b23049bf4 100644 --- a/Src/UClipboardHelper.pas +++ b/Src/UClipboardHelper.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that manages copying data to the clipboard in multiple * formats. diff --git a/Src/UCodeImportExport.pas b/Src/UCodeImportExport.pas index fee93b699..1447b5b7b 100644 --- a/Src/UCodeImportExport.pas +++ b/Src/UCodeImportExport.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements classes that can import and export user defined snippets and user * information from and to XML. diff --git a/Src/UCodeImportMgr.pas b/Src/UCodeImportMgr.pas index db75e35a7..e437c2a56 100644 --- a/Src/UCodeImportMgr.pas +++ b/Src/UCodeImportMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that handles import of a codesnip export file into * the user-defined database. diff --git a/Src/UCodeShareMgr.pas b/Src/UCodeShareMgr.pas index 6226182b5..3f823548e 100644 --- a/Src/UCodeShareMgr.pas +++ b/Src/UCodeShareMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that manages sharing of user defined snippets. * Provides support for exporting snippets, importing snippets and submitting diff --git a/Src/UColorBoxEx.pas b/Src/UColorBoxEx.pas index 96cccb6ee..b23402aa6 100644 --- a/Src/UColorBoxEx.pas +++ b/Src/UColorBoxEx.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a subclass of TColorBox that enables an alternative colour dialog * box to be displayed when "Custom Colour" is chosen from the combo box's drop diff --git a/Src/UColorDialogEx.pas b/Src/UColorDialogEx.pas index be5a875ca..f89551688 100644 --- a/Src/UColorDialogEx.pas +++ b/Src/UColorDialogEx.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a colour dialog box subclass that aligns itself over its owner, * works correctly with the Vista task bar, provides a Title property and uses diff --git a/Src/UColours.pas b/Src/UColours.pas index 1612cd6d7..357d758d4 100644 --- a/Src/UColours.pas +++ b/Src/UColours.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines some special colour constants that record various program colours. } diff --git a/Src/UCommandBars.pas b/Src/UCommandBars.pas index 1033d4f55..3dbbfd2de 100644 --- a/Src/UCommandBars.pas +++ b/Src/UCommandBars.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines various classes used to configure one or more command bars owned by * a container. Command bars are UI elements used to issue commands, e.g. menus, diff --git a/Src/UCommonDlg.pas b/Src/UCommonDlg.pas index 8c7a4b008..63f92b063 100644 --- a/Src/UCommonDlg.pas +++ b/Src/UCommonDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * A set of classes that assist in hooking and handling common dialog box * messages. Also provides helper methods for handling dialog box messages. diff --git a/Src/UCompResHTML.pas b/Src/UCompResHTML.pas index 6f47c5cf1..9ed0c5234 100644 --- a/Src/UCompResHTML.pas +++ b/Src/UCompResHTML.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Static class that generate HTML of parts of tables used to display compiler * results in details pane. diff --git a/Src/UComparers.pas b/Src/UComparers.pas index 4e43ae49f..5225c5b44 100644 --- a/Src/UComparers.pas +++ b/Src/UComparers.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Contains comparer classes, hashes etc. } diff --git a/Src/UCompileMgr.pas b/Src/UCompileMgr.pas index 79f0e1c7e..e357a66b7 100644 --- a/Src/UCompileMgr.pas +++ b/Src/UCompileMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides objects that manage test compilation and assoicated UI, display of * compilation results via a callback and and compiler configuration. diff --git a/Src/UCompileResultsLBMgr.pas b/Src/UCompileResultsLBMgr.pas index 803317acc..ac7f6f763 100644 --- a/Src/UCompileResultsLBMgr.pas +++ b/Src/UCompileResultsLBMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines classes that manages display and interaction with a list box that * displays compiler results. diff --git a/Src/UConsoleApp.pas b/Src/UConsoleApp.pas index 21a67ce94..d6284f579 100644 --- a/Src/UConsoleApp.pas +++ b/Src/UConsoleApp.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * A class that encapsulates and executes a command line application and * optionally redirects the application's standard input, output and error. diff --git a/Src/UConsts.pas b/Src/UConsts.pas index 2cf5e7c3e..7f29d51c8 100644 --- a/Src/UConsts.pas +++ b/Src/UConsts.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines various character, string and resource id constants. } diff --git a/Src/UContainers.pas b/Src/UContainers.pas index fcd456396..c8548bda2 100644 --- a/Src/UContainers.pas +++ b/Src/UContainers.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides various generic container classes and enumerators. } diff --git a/Src/UControlStateMgr.pas b/Src/UControlStateMgr.pas index 20a5e56c7..cfc382282 100644 --- a/Src/UControlStateMgr.pas +++ b/Src/UControlStateMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that can enable or disable all controls, actions and * menu items on a form depending on the form's Enabled property diff --git a/Src/UCopyInfoMgr.pas b/Src/UCopyInfoMgr.pas index ace8a86b7..2c72dc8f9 100644 --- a/Src/UCopyInfoMgr.pas +++ b/Src/UCopyInfoMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that copies information about a snippet to clipboard in * plain text and rich text format. Only routines are supported.. diff --git a/Src/UCopySourceMgr.pas b/Src/UCopySourceMgr.pas index 1dd8a4682..d66ad87a2 100644 --- a/Src/UCopySourceMgr.pas +++ b/Src/UCopySourceMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that manages copying of a snippet's source code to the * clipboard. Code is copied as plain text and as rich text. Rich text version diff --git a/Src/UCopyViewMgr.pas b/Src/UCopyViewMgr.pas index 3ac2ac7ef..d0b076a7d 100644 --- a/Src/UCopyViewMgr.pas +++ b/Src/UCopyViewMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements an abstract base class for objects that copy a representation of a * view to the clipboard. diff --git a/Src/UCtrlArranger.pas b/Src/UCtrlArranger.pas index 689e46135..5e2477e0b 100644 --- a/Src/UCtrlArranger.pas +++ b/Src/UCtrlArranger.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that provides methods to assist in aligning a the * controls in forms, frames etc. diff --git a/Src/UDBUpdateMgr.pas b/Src/UDBUpdateMgr.pas index a00b33465..e2b15cc5f 100644 --- a/Src/UDBUpdateMgr.pas +++ b/Src/UDBUpdateMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Object used to manage main Code Snippets database updates. } diff --git a/Src/UDOSDateTime.pas b/Src/UDOSDateTime.pas index 7e6485866..de2fe547f 100644 --- a/Src/UDOSDateTime.pas +++ b/Src/UDOSDateTime.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Interface, implementation class and factory object used to encapsulate, read * and apply DOS file dates. diff --git a/Src/UDataBackupMgr.pas b/Src/UDataBackupMgr.pas index 7489285e1..2f230eb69 100644 --- a/Src/UDataBackupMgr.pas +++ b/Src/UDataBackupMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Static class that manages backups of data files. It can back up the local * database directory, restore the backup and delete it. diff --git a/Src/UDataStreamIO.pas b/Src/UDataStreamIO.pas index 73e222bce..5210be8dc 100644 --- a/Src/UDataStreamIO.pas +++ b/Src/UDataStreamIO.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Stream wrappers read / write data from / to a formatted data stream. Classes * are provided to read from text or binary streams that conform to the data diff --git a/Src/UDatabaseLoader.pas b/Src/UDatabaseLoader.pas index fbad4624d..2153cb5f6 100644 --- a/Src/UDatabaseLoader.pas +++ b/Src/UDatabaseLoader.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that load and reset the database along with a * thread class that performs the same actions in a thread. diff --git a/Src/UDatabaseLoaderUI.pas b/Src/UDatabaseLoaderUI.pas index 35dc60f5c..ff83d8384 100644 --- a/Src/UDatabaseLoaderUI.pas +++ b/Src/UDatabaseLoaderUI.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a static class that loads the database in a thread and displays a * wait dialog if the loading is taking more than a specified amount of time. diff --git a/Src/UDetailPageHTML.pas b/Src/UDetailPageHTML.pas index 7fc46fb35..06222ac79 100644 --- a/Src/UDetailPageHTML.pas +++ b/Src/UDetailPageHTML.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Heirachy of classes that render views as HTML. The HTML is used to display * the view item in a tab in the detail pane. A factory is provided that can diff --git a/Src/UDetailPageLoader.pas b/Src/UDetailPageLoader.pas index 33331e6ac..f7539b802 100644 --- a/Src/UDetailPageLoader.pas +++ b/Src/UDetailPageLoader.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Heirachy of classes that can produce and load HTML pages displayed in the * detail panes. Also provides a factory class to create the loader objects. diff --git a/Src/UDetailTabAction.pas b/Src/UDetailTabAction.pas index d2f4740b6..165fbe146 100644 --- a/Src/UDetailTabAction.pas +++ b/Src/UDetailTabAction.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a custom action used to request change of tab in detail pane. } diff --git a/Src/UDialogMgr.pas b/Src/UDialogMgr.pas index e14a76cc4..c23dda18f 100644 --- a/Src/UDialogMgr.pas +++ b/Src/UDialogMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that manages the display of dialog boxes. } diff --git a/Src/UDirectoryCopier.pas b/Src/UDirectoryCopier.pas index 64824e6c6..3dbbb716e 100644 --- a/Src/UDirectoryCopier.pas +++ b/Src/UDirectoryCopier.pas @@ -3,7 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2020, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that performs shallow directory copies and moves. } diff --git a/Src/UDispatchList.pas b/Src/UDispatchList.pas index 32849f185..88d665eda 100644 --- a/Src/UDispatchList.pas +++ b/Src/UDispatchList.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Interface to list of IDispatch objects along with an implementation of the * list and an enumerator. diff --git a/Src/UDlgHelper.pas b/Src/UDlgHelper.pas index 644162e69..44c145c76 100644 --- a/Src/UDlgHelper.pas +++ b/Src/UDlgHelper.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements "static" classes that help to manipulate dialogue boxes: * + TDlgHelper sets a dialogue box's parent window. diff --git a/Src/UDropDownButtons.pas b/Src/UDropDownButtons.pas index 2fa0145b1..bbb7901df 100644 --- a/Src/UDropDownButtons.pas +++ b/Src/UDropDownButtons.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a class that is used to manage image lists containing drop down * button images for display in UI widgets. diff --git a/Src/UEditSnippetAction.pas b/Src/UEditSnippetAction.pas index 97246095c..b2cbc5fca 100644 --- a/Src/UEditSnippetAction.pas +++ b/Src/UEditSnippetAction.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Custom action used to request editing of a named user-defined snippet. } diff --git a/Src/UEmailHelper.pas b/Src/UEmailHelper.pas index 7404d3dc5..bb5d888d6 100644 --- a/Src/UEmailHelper.pas +++ b/Src/UEmailHelper.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides a helper routine for use in validation of email addresses. } diff --git a/Src/UEncodings.pas b/Src/UEncodings.pas index 61e08acf4..d6533b115 100644 --- a/Src/UEncodings.pas +++ b/Src/UEncodings.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides support for certain character encodings used by the program. } diff --git a/Src/UEncryptor.pas b/Src/UEncryptor.pas index d47f9efe6..5cb711e7a 100644 --- a/Src/UEncryptor.pas +++ b/Src/UEncryptor.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Static class that encrypts and decrypts binary data. Acts as a facade to the * actual encryption engine. diff --git a/Src/UExceptions.pas b/Src/UExceptions.pas index 5667d6377..6b46d991a 100644 --- a/Src/UExceptions.pas +++ b/Src/UExceptions.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines application's exception classes and a handler for untrapped * exceptions. diff --git a/Src/UExeFileType.pas b/Src/UExeFileType.pas index 660dd0775..3b04484a7 100644 --- a/Src/UExeFileType.pas +++ b/Src/UExeFileType.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Exposes a function that determines if a file is executable and, if so, what * type of file it is. diff --git a/Src/UFileProtocol.pas b/Src/UFileProtocol.pas index 3c25a0408..9a5557fc8 100644 --- a/Src/UFileProtocol.pas +++ b/Src/UFileProtocol.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a handler for the "file" URL protocol that displays a local file * in the associated program. diff --git a/Src/UFileUpdater.pas b/Src/UFileUpdater.pas index 79885a1b1..7214f15a9 100644 --- a/Src/UFileUpdater.pas +++ b/Src/UFileUpdater.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that updates local CodeSnip data files from a directory * containing updated files. diff --git a/Src/UFolderBackup.pas b/Src/UFolderBackup.pas index 315637b52..3f6aa8d67 100644 --- a/Src/UFolderBackup.pas +++ b/Src/UFolderBackup.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Code that that can back up and restore all the files in a folder to or from a * single file. Legacy support for restoring data from legacy backup file diff --git a/Src/UFontHelper.pas b/Src/UFontHelper.pas index 7e8f7e556..94feece28 100644 --- a/Src/UFontHelper.pas +++ b/Src/UFontHelper.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2015, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class used to assist when working with fonts. } diff --git a/Src/UFormAligner.pas b/Src/UFormAligner.pas index bc009a946..b271d06bd 100644 --- a/Src/UFormAligner.pas +++ b/Src/UFormAligner.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a classes that implement IAligner and can align a form over an owning * control. diff --git a/Src/UGIFImageList.pas b/Src/UGIFImageList.pas index 1847f6ed8..6448ff5a2 100644 --- a/Src/UGIFImageList.pas +++ b/Src/UGIFImageList.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Image list descendant that enables representations of GIF images loaded from * HTML resource to be added. Resource names are mapped to image indices. diff --git a/Src/UGraphicUtils.pas b/Src/UGraphicUtils.pas index af66827ba..bcf4f5f9d 100644 --- a/Src/UGraphicUtils.pas +++ b/Src/UGraphicUtils.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Utility routines used for working with graphics. } diff --git a/Src/UGroups.pas b/Src/UGroups.pas index 359579920..9d18e61e0 100644 --- a/Src/UGroups.pas +++ b/Src/UGroups.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines classes that group snippets together in different ways. } diff --git a/Src/UHTMLBuilder.pas b/Src/UHTMLBuilder.pas index 41a517c30..82024e818 100644 --- a/Src/UHTMLBuilder.pas +++ b/Src/UHTMLBuilder.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class used to create content of an XHTML strict document. } diff --git a/Src/UHTMLDOMHelper.pas b/Src/UHTMLDOMHelper.pas index f2fe7cfa9..2fc290a67 100644 --- a/Src/UHTMLDOMHelper.pas +++ b/Src/UHTMLDOMHelper.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a static class that provides helper methods for manipulating HTML * documents and elements. diff --git a/Src/UHTMLHelp.pas b/Src/UHTMLHelp.pas index 1eb8d7bbe..1624ba5f7 100644 --- a/Src/UHTMLHelp.pas +++ b/Src/UHTMLHelp.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides a partial translation of HTMLHelp header files. Dynamically imports * HTMLHelp function from hhctrl.ocx. diff --git a/Src/UHTMLHelpMgr.pas b/Src/UHTMLHelpMgr.pas index 6a06a0947..b16e87b44 100644 --- a/Src/UHTMLHelpMgr.pas +++ b/Src/UHTMLHelpMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that implements the IHelpMgr interface and registers an * instantiation of it as the program's help manager. The object provides help diff --git a/Src/UHTMLTemplate.pas b/Src/UHTMLTemplate.pas index 5a29a0320..9a36316b4 100644 --- a/Src/UHTMLTemplate.pas +++ b/Src/UHTMLTemplate.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that loads a HTML template from resources and permits * replacing of placeholders with values. diff --git a/Src/UHTMLUtils.pas b/Src/UHTMLUtils.pas index b3d44df74..cc7cf2a54 100644 --- a/Src/UHTMLUtils.pas +++ b/Src/UHTMLUtils.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Helper interfaces and classes used to generate HTML. } diff --git a/Src/UHTTPProtocol.pas b/Src/UHTTPProtocol.pas index 598b58a41..c2c72aa10 100644 --- a/Src/UHTTPProtocol.pas +++ b/Src/UHTTPProtocol.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a handlers for the "http" and "https:" URL protocols that displays * the URL in the default browser. diff --git a/Src/UHelpMgr.pas b/Src/UHelpMgr.pas index d931aa92a..54aed391e 100644 --- a/Src/UHelpMgr.pas +++ b/Src/UHelpMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides an interface that the program uses to access help. Also exposes a * routine that enables an object that implements the interface to be registered diff --git a/Src/UHelpProtocol.pas b/Src/UHelpProtocol.pas index c83d2df78..31378837c 100644 --- a/Src/UHelpProtocol.pas +++ b/Src/UHelpProtocol.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a handler for the fake "help" URL protocol that displays a help * topic or contents depending on URL. diff --git a/Src/UHexUtils.pas b/Src/UHexUtils.pas index 498b40f9b..d27c03403 100644 --- a/Src/UHexUtils.pas +++ b/Src/UHexUtils.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Routines that support conversion of hexadecimal strings to and from the * corresponding binary data. diff --git a/Src/UHiddenRichEdit.pas b/Src/UHiddenRichEdit.pas index b488c9512..285d0802b 100644 --- a/Src/UHiddenRichEdit.pas +++ b/Src/UHiddenRichEdit.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that maintains and provides access to a hidden rich edit * control. diff --git a/Src/UHiddenWindow.pas b/Src/UHiddenWindow.pas index 73f2f0cbd..c0ca4570d 100644 --- a/Src/UHiddenWindow.pas +++ b/Src/UHiddenWindow.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that provides a hidden window. } diff --git a/Src/UHistory.pas b/Src/UHistory.pas index 8f1fe3345..f74337689 100644 --- a/Src/UHistory.pas +++ b/Src/UHistory.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that records and retrieves history of page accesses. } diff --git a/Src/UHistoryMenus.pas b/Src/UHistoryMenus.pas index 0c5fbf013..837280e91 100644 --- a/Src/UHistoryMenus.pas +++ b/Src/UHistoryMenus.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Custom popup menu components that display menu items for recent view items in * the history. Separate menu classes deal with "forward" and "back" menus. diff --git a/Src/UIOUtils.pas b/Src/UIOUtils.pas index 470968da0..0799770c7 100644 --- a/Src/UIOUtils.pas +++ b/Src/UIOUtils.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides a container for assisting with common file operations. } diff --git a/Src/UIStringList.pas b/Src/UIStringList.pas index b606d9ae3..db9634632 100644 --- a/Src/UIStringList.pas +++ b/Src/UIStringList.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines interface to an object that stores and manipulates a list of strings, * along with a class that implements the interface. diff --git a/Src/UImageTags.pas b/Src/UImageTags.pas index f027e7f8b..6f588b83f 100644 --- a/Src/UImageTags.pas +++ b/Src/UImageTags.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a static class that gets information about and manipulates HTML * image elements. diff --git a/Src/UIniDataLoader.pas b/Src/UIniDataLoader.pas index c5cca7faa..3e5c3e081 100644 --- a/Src/UIniDataLoader.pas +++ b/Src/UIniDataLoader.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements an extension of TMemIniFile that loads the ini data from a set of * associated files and pre-processes the data. diff --git a/Src/UInitialLetter.pas b/Src/UInitialLetter.pas index 16810cc65..dafeac880 100644 --- a/Src/UInitialLetter.pas +++ b/Src/UInitialLetter.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a record that encapsulates an upper case Unicode character. } diff --git a/Src/UJavaScriptUtils.pas b/Src/UJavaScriptUtils.pas index f64961630..8e8fd7758 100644 --- a/Src/UJavaScriptUtils.pas +++ b/Src/UJavaScriptUtils.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Utilities that assist when working with JavaScript. } diff --git a/Src/UKeysHelper.pas b/Src/UKeysHelper.pas index ba14ea3b4..5dc7091d3 100644 --- a/Src/UKeysHelper.pas +++ b/Src/UKeysHelper.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Helper routines for working with key presses and shift states. } diff --git a/Src/ULEDImageList.pas b/Src/ULEDImageList.pas index 12b0e8b58..f0a40cf41 100644 --- a/Src/ULEDImageList.pas +++ b/Src/ULEDImageList.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a custom image list that provides a list of LED images. Image list is * automatically loaded from resources when class is instantiated. diff --git a/Src/ULinkAction.pas b/Src/ULinkAction.pas index 351af28d2..4026301ae 100644 --- a/Src/ULinkAction.pas +++ b/Src/ULinkAction.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a custom action used to trigger an HTML anchor element. } diff --git a/Src/ULocales.pas b/Src/ULocales.pas index b116f111d..6c2514d87 100644 --- a/Src/ULocales.pas +++ b/Src/ULocales.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides locale information in an OS neutral way and declares locale * identifiers. diff --git a/Src/UMainDBFileReader.pas b/Src/UMainDBFileReader.pas index 71236848e..dab30548a 100644 --- a/Src/UMainDBFileReader.pas +++ b/Src/UMainDBFileReader.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that can read files from main database using correct * encoding. diff --git a/Src/UMainDisplayMgr.pas b/Src/UMainDisplayMgr.pas index c1198b84c..bf56cc03d 100644 --- a/Src/UMainDisplayMgr.pas +++ b/Src/UMainDisplayMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that manages and co-ordinates the display of the program's main UI. * Calls into subsidiary manager objects to perform display operations. diff --git a/Src/UMarquee.pas b/Src/UMarquee.pas index c95274711..8f11a774e 100644 --- a/Src/UMarquee.pas +++ b/Src/UMarquee.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * TProgressBar descendant that displays a "marquee" that repeatedly cycles a * progress bar display. diff --git a/Src/UMeasurement.pas b/Src/UMeasurement.pas index 56864ab8a..1cc5bc23a 100644 --- a/Src/UMeasurement.pas +++ b/Src/UMeasurement.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Contains routines and enumerations relating to measurement and conversion * between measurement systems. diff --git a/Src/UMemoCaretPosDisplayMgr.pas b/Src/UMemoCaretPosDisplayMgr.pas index 7fe4f7ecc..0092a6bdd 100644 --- a/Src/UMemoCaretPosDisplayMgr.pas +++ b/Src/UMemoCaretPosDisplayMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Displays the caret position of one or more memo controls in associated label * controls. Labels are automatically updated whenever the caret position diff --git a/Src/UMemoHelper.pas b/Src/UMemoHelper.pas index 32557cb69..eb3adc074 100644 --- a/Src/UMemoHelper.pas +++ b/Src/UMemoHelper.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that provides information about, and assists with manipulation of, memo * controls where the functionality is not directly available from the control. diff --git a/Src/UMemoProgBarMgr.pas b/Src/UMemoProgBarMgr.pas index 62713a77d..b29c52563 100644 --- a/Src/UMemoProgBarMgr.pas +++ b/Src/UMemoProgBarMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that manages a progress bar that is displayed within a memo control and * aligned to text in the control. diff --git a/Src/UMenus.pas b/Src/UMenus.pas index a70b1c6a0..7b1c05708 100644 --- a/Src/UMenus.pas +++ b/Src/UMenus.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Helper routines and interface for working with menus. } diff --git a/Src/UMessageBox.pas b/Src/UMessageBox.pas index 5ed85e5b0..1a45beee9 100644 --- a/Src/UMessageBox.pas +++ b/Src/UMessageBox.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that can display message and confirmation dialogue * boxes. diff --git a/Src/UMessageWindow.pas b/Src/UMessageWindow.pas index 164027998..562dc7857 100644 --- a/Src/UMessageWindow.pas +++ b/Src/UMessageWindow.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a hidden window that triggers an event for each message received. } diff --git a/Src/UMultiCastEvents.pas b/Src/UMultiCastEvents.pas index d5a210887..66ecd81a7 100644 --- a/Src/UMultiCastEvents.pas +++ b/Src/UMultiCastEvents.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that maintains, and can trigger, a list of event handlers. } diff --git a/Src/UNotifier.pas b/Src/UNotifier.pas index 3892951f3..3b9eef5be 100644 --- a/Src/UNotifier.pas +++ b/Src/UNotifier.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Object that notifies the main application of certain user-initiated events. } diff --git a/Src/UNulDropTarget.pas b/Src/UNulDropTarget.pas index 8a38b4db4..73111aa82 100644 --- a/Src/UNulDropTarget.pas +++ b/Src/UNulDropTarget.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Contains class that implements the IDropTarget interface that is designed to * inhibit all drag and drop operations. diff --git a/Src/UNulFormAligner.pas b/Src/UNulFormAligner.pas index c68025bec..efbd5c2a6 100644 --- a/Src/UNulFormAligner.pas +++ b/Src/UNulFormAligner.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a do nothing class that implements IAligner for use with forms that * do not support alignment. diff --git a/Src/UOleClientSite.pas b/Src/UOleClientSite.pas index 713fd1ad2..4cc33f25b 100644 --- a/Src/UOleClientSite.pas +++ b/Src/UOleClientSite.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Contains a class that provides a do-nothing implementation of the * IOleClientSite interface that is sufficient to record the application as a diff --git a/Src/UOpenDialogEx.pas b/Src/UOpenDialogEx.pas index ba324f1b5..0f0d7f642 100644 --- a/Src/UOpenDialogEx.pas +++ b/Src/UOpenDialogEx.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements an open dialog box subclass that aligns itself over its owner and * works correctly with the Vista task bar. Dialog also supports help keywords. diff --git a/Src/UOpenDialogHelper.pas b/Src/UOpenDialogHelper.pas index ded5db9ea..6e586c790 100644 --- a/Src/UOpenDialogHelper.pas +++ b/Src/UOpenDialogHelper.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Helper routines for use when working with standard windows open and save file * dialog boxes. diff --git a/Src/UOverviewTreeBuilder.pas b/Src/UOverviewTreeBuilder.pas index 69515ea27..354953b1b 100644 --- a/Src/UOverviewTreeBuilder.pas +++ b/Src/UOverviewTreeBuilder.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a set of classes that populate the overview treeview with a list * of snippets. Each class groups the snippets in different ways. diff --git a/Src/UOverviewTreeState.pas b/Src/UOverviewTreeState.pas index ee4186df4..cd8f36db3 100644 --- a/Src/UOverviewTreeState.pas +++ b/Src/UOverviewTreeState.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that maintains the expansion state of a set of section * nodes from the overview tree view. The class can record the current state and diff --git a/Src/UPageSetupDialogEx.pas b/Src/UPageSetupDialogEx.pas index 84810d8e3..584092a94 100644 --- a/Src/UPageSetupDialogEx.pas +++ b/Src/UPageSetupDialogEx.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements an extension of TPageSetupDialog that customises the dialog box. } diff --git a/Src/UPageSetupDlgMgr.pas b/Src/UPageSetupDlgMgr.pas index c793639b3..82618da6d 100644 --- a/Src/UPageSetupDlgMgr.pas +++ b/Src/UPageSetupDlgMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that manages the Page Setup dialog box. } diff --git a/Src/UPaypalDonateAction.pas b/Src/UPaypalDonateAction.pas index 3ba7b8ff9..bac2c49bb 100644 --- a/Src/UPaypalDonateAction.pas +++ b/Src/UPaypalDonateAction.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Custom action used to display the DelphiDabbler Paypal donation page in * default web browser. diff --git a/Src/UPipe.pas b/Src/UPipe.pas index 4a8e358d0..3905513a5 100644 --- a/Src/UPipe.pas +++ b/Src/UPipe.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that encapsulates an unamed pipe and can read and write the pipe. } diff --git a/Src/UPreferences.pas b/Src/UPreferences.pas index adb2713ed..4924608f2 100644 --- a/Src/UPreferences.pas +++ b/Src/UPreferences.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a singletion object that exposes and persists user preferences. } diff --git a/Src/UPrintDocuments.pas b/Src/UPrintDocuments.pas index c1affefff..b292a1f32 100644 --- a/Src/UPrintDocuments.pas +++ b/Src/UPrintDocuments.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides interface and classes that can generate output suitable for printing * using print engine. diff --git a/Src/UPrintEngine.pas b/Src/UPrintEngine.pas index 22c181937..ad5f8f5ad 100644 --- a/Src/UPrintEngine.pas +++ b/Src/UPrintEngine.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that uses a rich edit control to print a rich text format * document. diff --git a/Src/UPrintInfo.pas b/Src/UPrintInfo.pas index 8ce53926d..f46d57537 100644 --- a/Src/UPrintInfo.pas +++ b/Src/UPrintInfo.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a singleton object that maintains printer and page information for * lifetime of program. This object maintains information that is not maintained diff --git a/Src/UPrintMgr.pas b/Src/UPrintMgr.pas index 94356bc87..0382ced0b 100644 --- a/Src/UPrintMgr.pas +++ b/Src/UPrintMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that manages printing of a document providing information * about certain view items. diff --git a/Src/UProtocols.pas b/Src/UProtocols.pas index 9fc826292..096a7ad21 100644 --- a/Src/UProtocols.pas +++ b/Src/UProtocols.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Set of classes that can register and provide instances of appropriate * protocol handler classes according to a URL's protocol. Also provides base diff --git a/Src/UQuery.pas b/Src/UQuery.pas index a553df7d9..36cc9f5fd 100644 --- a/Src/UQuery.pas +++ b/Src/UQuery.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a singleton object that encapsulates a query on the code snippets * database. diff --git a/Src/UREMLDataIO.pas b/Src/UREMLDataIO.pas index 4bb7358d3..d8ee997bb 100644 --- a/Src/UREMLDataIO.pas +++ b/Src/UREMLDataIO.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements classes that render and parse Routine Extra Markup Language (REML) * code. This markup is used to read and store active text objects as used by diff --git a/Src/URTFBuilder.pas b/Src/URTFBuilder.pas index 3766ed46b..2a92218f6 100644 --- a/Src/URTFBuilder.pas +++ b/Src/URTFBuilder.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements various classes used to create content of a rich text document. } diff --git a/Src/URTFCategoryDoc.pas b/Src/URTFCategoryDoc.pas index ce9daa50c..b01275466 100644 --- a/Src/URTFCategoryDoc.pas +++ b/Src/URTFCategoryDoc.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that renders a rich text document that lists the snippets * in a category. diff --git a/Src/URTFSnippetDoc.pas b/Src/URTFSnippetDoc.pas index ed0f3545b..fc111c2c3 100644 --- a/Src/URTFSnippetDoc.pas +++ b/Src/URTFSnippetDoc.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that renders a document that describes a snippet as rich * text. diff --git a/Src/URTFStyles.pas b/Src/URTFStyles.pas index c89fbdbc9..9c355b955 100644 --- a/Src/URTFStyles.pas +++ b/Src/URTFStyles.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines structures that encapsulate RTF styling elements. } diff --git a/Src/URTFUtils.pas b/Src/URTFUtils.pas index 5298c28c4..2fa945d96 100644 --- a/Src/URTFUtils.pas +++ b/Src/URTFUtils.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Utility functions used when processing RTF. } diff --git a/Src/UReservedCategories.pas b/Src/UReservedCategories.pas index 785d4308c..2eea98e65 100644 --- a/Src/UReservedCategories.pas +++ b/Src/UReservedCategories.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that provides information about reserved user * defined categories. diff --git a/Src/UResourceUtils.pas b/Src/UResourceUtils.pas index f36bb01fe..484df263b 100644 --- a/Src/UResourceUtils.pas +++ b/Src/UResourceUtils.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Utility functions used to assist when working with program resources. } diff --git a/Src/USaveDialogEx.pas b/Src/USaveDialogEx.pas index 89a3dd236..843695adf 100644 --- a/Src/USaveDialogEx.pas +++ b/Src/USaveDialogEx.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a subclass of the Save dialog box to enable the dialog to align * itself over its owner and to work correctly with the Vista task bar. Also diff --git a/Src/USaveSnippetMgr.pas b/Src/USaveSnippetMgr.pas index 4acdf1083..76361dbb7 100644 --- a/Src/USaveSnippetMgr.pas +++ b/Src/USaveSnippetMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a class that manages generation, previewing and saving of a code * snippet. diff --git a/Src/USaveSourceDlg.pas b/Src/USaveSourceDlg.pas index 7c05ab134..8e8b78dfd 100644 --- a/Src/USaveSourceDlg.pas +++ b/Src/USaveSourceDlg.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements customised Save dialog box for source code. Dialog has additional * controls to allow user to choose output file format, commenting style and diff --git a/Src/USaveSourceMgr.pas b/Src/USaveSourceMgr.pas index 36587fdae..a144281f2 100644 --- a/Src/USaveSourceMgr.pas +++ b/Src/USaveSourceMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements abstract base class for classes that manage generation, previewing * and saving to disk of a source code files in various formats and encodings. diff --git a/Src/USaveUnitMgr.pas b/Src/USaveUnitMgr.pas index 3839a8e02..98e360f04 100644 --- a/Src/USaveUnitMgr.pas +++ b/Src/USaveUnitMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a class that manages generation, previewing and saving of a pascal * unit. diff --git a/Src/USearch.pas b/Src/USearch.pas index 817a71d2a..c55c4c935 100644 --- a/Src/USearch.pas +++ b/Src/USearch.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Interfaces and classes that define and perform searches across snippets in * the CodeSnip database. diff --git a/Src/USelectionIOMgr.pas b/Src/USelectionIOMgr.pas index ede0dde37..9f493a240 100644 --- a/Src/USelectionIOMgr.pas +++ b/Src/USelectionIOMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides a static object that manages loading and saving of stored * database selections. diff --git a/Src/USettings.pas b/Src/USettings.pas index 3805c4b07..a8a5bcf53 100644 --- a/Src/USettings.pas +++ b/Src/USettings.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that can store application settings in application wide and * per user persistent storage. diff --git a/Src/UShowCaseCtrl.pas b/Src/UShowCaseCtrl.pas index 338546419..a0577561a 100644 --- a/Src/UShowCaseCtrl.pas +++ b/Src/UShowCaseCtrl.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a simple transparent control designed to be placed over other * controls to prevent user interaction with the "show cased" controls. diff --git a/Src/UShowPrefsPageAction.pas b/Src/UShowPrefsPageAction.pas index 6f15e66e9..2a390fa63 100644 --- a/Src/UShowPrefsPageAction.pas +++ b/Src/UShowPrefsPageAction.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Custom action used to request display of a page of Preferences dialogue box * specified by the name of the frame class that implements the page. diff --git a/Src/USimpleDispatch.pas b/Src/USimpleDispatch.pas index 7dcc26785..963c4c96f 100644 --- a/Src/USimpleDispatch.pas +++ b/Src/USimpleDispatch.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides an abstract base class that provides a simple, non reference * counted, implementation of IDispatch. diff --git a/Src/USingleton.pas b/Src/USingleton.pas index d791ea09d..3448a5c24 100644 --- a/Src/USingleton.pas +++ b/Src/USingleton.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides a base class for singleton objects along with a manager object that * records instances of each type of singleton. diff --git a/Src/USnipKindListAdapter.pas b/Src/USnipKindListAdapter.pas index d0f5a7fd9..9cdf75214 100644 --- a/Src/USnipKindListAdapter.pas +++ b/Src/USnipKindListAdapter.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that adapts a list of snippet kinds by providing an * alternative interface to the list, sorted by the name of the snippet kind. diff --git a/Src/USnippetAction.pas b/Src/USnippetAction.pas index bf8c01d0e..c0fa388c8 100644 --- a/Src/USnippetAction.pas +++ b/Src/USnippetAction.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Custom action used to request display of a snippet by name. } diff --git a/Src/USnippetCreditsParser.pas b/Src/USnippetCreditsParser.pas index 9a246ae6c..ccbbead10 100644 --- a/Src/USnippetCreditsParser.pas +++ b/Src/USnippetCreditsParser.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides an implementation of IActiveTextParser that can parse the markup * used in Credits elements of data files and convert the markup into an active diff --git a/Src/USnippetDoc.pas b/Src/USnippetDoc.pas index 5917c1576..dbf796fb2 100644 --- a/Src/USnippetDoc.pas +++ b/Src/USnippetDoc.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements an abstract base class that renders a text document that describes * a snippet. Should be overridden by classes that generate actual documents in diff --git a/Src/USnippetExtraHelper.pas b/Src/USnippetExtraHelper.pas index b065cf03a..c93d280cc 100644 --- a/Src/USnippetExtraHelper.pas +++ b/Src/USnippetExtraHelper.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that helps with parsing of a snippet's extra property as * active text and vice versa. diff --git a/Src/USnippetHTML.pas b/Src/USnippetHTML.pas index a1d04b2bb..60fbe6f18 100644 --- a/Src/USnippetHTML.pas +++ b/Src/USnippetHTML.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Classes that generates HTML used to display snippets in detail pane. } diff --git a/Src/USnippetIDListIOHandler.pas b/Src/USnippetIDListIOHandler.pas index a5384b5c6..cca38a3d5 100644 --- a/Src/USnippetIDListIOHandler.pas +++ b/Src/USnippetIDListIOHandler.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides objects that can read and write files containing snippet ID lists. } diff --git a/Src/USnippetIDs.pas b/Src/USnippetIDs.pas index 271bbf581..19fefc122 100644 --- a/Src/USnippetIDs.pas +++ b/Src/USnippetIDs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a record that uniquely indentifies a snippet in the database, along * with an object that maintains a list of snippet ID records. diff --git a/Src/USnippetPageHTML.pas b/Src/USnippetPageHTML.pas index c7a66c420..6510c9b33 100644 --- a/Src/USnippetPageHTML.pas +++ b/Src/USnippetPageHTML.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines classes etc that render different fragments of information about a * snippet as HTML for display in the detail pane. Page content is flexible and diff --git a/Src/USnippetPageStructure.pas b/Src/USnippetPageStructure.pas index cce60d219..94cc282a4 100644 --- a/Src/USnippetPageStructure.pas +++ b/Src/USnippetPageStructure.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a set of classes that manage the flexible structure of the detail * pane pages used to display snippets. diff --git a/Src/USnippetSourceGen.pas b/Src/USnippetSourceGen.pas index c65d0ed69..7b66d7bb7 100644 --- a/Src/USnippetSourceGen.pas +++ b/Src/USnippetSourceGen.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that generates source code for code snippet(s) * contained in a routine snippet or category view. diff --git a/Src/USnippetValidator.pas b/Src/USnippetValidator.pas index a5362eca2..f7089d3b9 100644 --- a/Src/USnippetValidator.pas +++ b/Src/USnippetValidator.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that checks a snippet for validity. } diff --git a/Src/USnippetsChkListMgr.pas b/Src/USnippetsChkListMgr.pas index 13c2c8086..264894926 100644 --- a/Src/USnippetsChkListMgr.pas +++ b/Src/USnippetsChkListMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that manages and draws check list box controls that display * lists of snippets. diff --git a/Src/USnippetsTVDraw.pas b/Src/USnippetsTVDraw.pas index 0ad831192..a778ff98f 100644 --- a/Src/USnippetsTVDraw.pas +++ b/Src/USnippetsTVDraw.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides an abstract base class that can render tree nodes representing * snippets in a tree view. diff --git a/Src/USourceFileInfo.pas b/Src/USourceFileInfo.pas index 6fb0502d4..36acb2f7f 100644 --- a/Src/USourceFileInfo.pas +++ b/Src/USourceFileInfo.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that provides information about types of source code output * that are supported. diff --git a/Src/USourceGen.pas b/Src/USourceGen.pas index 52ccd6b0a..c8ee1b49d 100644 --- a/Src/USourceGen.pas +++ b/Src/USourceGen.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that is used to generate Pascal source code containing * specified database snippets. diff --git a/Src/UStartUp.pas b/Src/UStartUp.pas index 1d53e600d..572b7ce6e 100644 --- a/Src/UStartUp.pas +++ b/Src/UStartUp.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Performs start-up processing that must be performed before the rest of the * program is run. diff --git a/Src/UStatusBarMgr.pas b/Src/UStatusBarMgr.pas index 613a2bc44..8c2244249 100644 --- a/Src/UStatusBarMgr.pas +++ b/Src/UStatusBarMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that manages display of status information and hints in a * status bar. diff --git a/Src/UStrUtils.pas b/Src/UStrUtils.pas index ffaed681d..218dffe3c 100644 --- a/Src/UStrUtils.pas +++ b/Src/UStrUtils.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Unicode string utility routines. * diff --git a/Src/UStringReader.pas b/Src/UStringReader.pas index f89da9ccb..d076099cc 100644 --- a/Src/UStringReader.pas +++ b/Src/UStringReader.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a class that performs character based access to a string. } diff --git a/Src/UStructs.pas b/Src/UStructs.pas index c3a2ddd93..8225a32f9 100644 --- a/Src/UStructs.pas +++ b/Src/UStructs.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Various structures. Some are extension of existing structures with added * functionality. diff --git a/Src/USystemID.pas b/Src/USystemID.pas index 7eff5c6b5..a26a56bd4 100644 --- a/Src/USystemID.pas +++ b/Src/USystemID.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Exposes a routine that creates a serial number from system properties. } diff --git a/Src/USystemInfo.pas b/Src/USystemInfo.pas index d9683ccc7..233854197 100644 --- a/Src/USystemInfo.pas +++ b/Src/USystemInfo.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Static classes that provide information about the host system. * diff --git a/Src/UTVCheckBoxes.pas b/Src/UTVCheckBoxes.pas index 1000aa973..737528fa8 100644 --- a/Src/UTVCheckBoxes.pas +++ b/Src/UTVCheckBoxes.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that is used to manage image lists containing check box * images for display in tree views. diff --git a/Src/UTaggedTextLexer.pas b/Src/UTaggedTextLexer.pas index df23ec25c..af2d53bbe 100644 --- a/Src/UTaggedTextLexer.pas +++ b/Src/UTaggedTextLexer.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a main lexical analyser and subsdiary classes that can tokenise * code in a SGML like format. The lexer is customisable, the user providing the diff --git a/Src/UTestCompile.pas b/Src/UTestCompile.pas index acbd14c23..4a8df22be 100644 --- a/Src/UTestCompile.pas +++ b/Src/UTestCompile.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Class that performs a test compilation of a snippet using all supported and * installed versions of Delphi and returns details of success or failure. diff --git a/Src/UTestCompileUI.pas b/Src/UTestCompileUI.pas index 9210edb7b..458b214cb 100644 --- a/Src/UTestCompileUI.pas +++ b/Src/UTestCompileUI.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines a static class that test compiles a snippet in a thread and displays * a wait dialog if the compilation is taking more than a specified amount of diff --git a/Src/UTestUnit.pas b/Src/UTestUnit.pas index 38e6dcd9d..cab06676c 100644 --- a/Src/UTestUnit.pas +++ b/Src/UTestUnit.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that generates Pascal units for use in test compiling * snippets. diff --git a/Src/UTestUnitDlgMgr.pas b/Src/UTestUnitDlgMgr.pas index 5c20106bf..5907ced0a 100644 --- a/Src/UTestUnitDlgMgr.pas +++ b/Src/UTestUnitDlgMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that manages and displays a test unit in a dialog * box. diff --git a/Src/UTextSnippetDoc.pas b/Src/UTextSnippetDoc.pas index 4046e19cc..c7f87bc98 100644 --- a/Src/UTextSnippetDoc.pas +++ b/Src/UTextSnippetDoc.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that renders a document that describes a snippet as plain * text. diff --git a/Src/UThemesEx.pas b/Src/UThemesEx.pas index 62ff9e2c8..f6716b125 100644 --- a/Src/UThemesEx.pas +++ b/Src/UThemesEx.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that extends TThemeServices with new methods and adds * support for multiple event handlers for the OnThemeChange event. diff --git a/Src/UToolButtonEx.pas b/Src/UToolButtonEx.pas index 3454ec479..c10c8117c 100644 --- a/Src/UToolButtonEx.pas +++ b/Src/UToolButtonEx.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that extends TToolButton to permit new tool buttons and * separators to be added dynamically to a toolbar. diff --git a/Src/UUIWidgetImages.pas b/Src/UUIWidgetImages.pas index c68c52c4a..6b786a0c2 100644 --- a/Src/UUIWidgetImages.pas +++ b/Src/UUIWidgetImages.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements an abstract base class that provides a framework for classes that * manage image lists containing images that are displayed in GUI widgets. diff --git a/Src/UURIEncode.pas b/Src/UURIEncode.pas index 6bffc3060..3f0fe9ebb 100644 --- a/Src/UURIEncode.pas +++ b/Src/UURIEncode.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Routines that can encode and decode URIs according to RFC 3986. } diff --git a/Src/UUniqueID.pas b/Src/UUniqueID.pas index 63ee0fa8a..b98cc91e2 100644 --- a/Src/UUniqueID.pas +++ b/Src/UUniqueID.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that generates globally unique id strings. } diff --git a/Src/UUnitAnalyser.pas b/Src/UUnitAnalyser.pas index fcdbbe062..2724022ef 100644 --- a/Src/UUnitAnalyser.pas +++ b/Src/UUnitAnalyser.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Static class that analyses and provides information about unit source code. } diff --git a/Src/UUnitsChkListMgr.pas b/Src/UUnitsChkListMgr.pas index bb0e5dcf7..999541545 100644 --- a/Src/UUnitsChkListMgr.pas +++ b/Src/UUnitsChkListMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that manages check list box controls that display lists of * Delphi units. Builds expandable list, sets check marks for specified units diff --git a/Src/UUrlMonEx.pas b/Src/UUrlMonEx.pas index 4ecb85107..ae24efd5b 100644 --- a/Src/UUrlMonEx.pas +++ b/Src/UUrlMonEx.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). * * Imports a function from UrlMon.dll that is only present on later versions of * Windows. diff --git a/Src/UUserDBBackup.pas b/Src/UUserDBBackup.pas index 486a80466..9eec5e73c 100644 --- a/Src/UUserDBBackup.pas +++ b/Src/UUserDBBackup.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that can create and restore backups of the user database. } diff --git a/Src/UUserDBMgr.pas b/Src/UUserDBMgr.pas index 0a2563027..2c0ba4add 100644 --- a/Src/UUserDBMgr.pas +++ b/Src/UUserDBMgr.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that manages user's interaction with user database. } diff --git a/Src/UUserDBMove.pas b/Src/UUserDBMove.pas index f5c790a84..7fc641311 100644 --- a/Src/UUserDBMove.pas +++ b/Src/UUserDBMove.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that moves the user defined database to a new location. } diff --git a/Src/UUserDetails.pas b/Src/UUserDetails.pas index 4196f59c7..0f8e9e443 100644 --- a/Src/UUserDetails.pas +++ b/Src/UUserDetails.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a record that encapsulates information a program user. } diff --git a/Src/UUserDetailsPersist.pas b/Src/UUserDetailsPersist.pas index b68e63bd5..dd1f2e3ec 100644 --- a/Src/UUserDetailsPersist.pas +++ b/Src/UUserDetailsPersist.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2011-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2011-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that can save and load user details to and from * persistent settings. diff --git a/Src/UUtils.pas b/Src/UUtils.pas index ed7a34077..1b4fb72d3 100644 --- a/Src/UUtils.pas +++ b/Src/UUtils.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * General utility routines. } diff --git a/Src/UVersionInfo.pas b/Src/UVersionInfo.pas index 1cabc7dae..f83c61249 100644 --- a/Src/UVersionInfo.pas +++ b/Src/UVersionInfo.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides details of the application's version information and provides a * record used to manipulate version numbers. diff --git a/Src/UView.pas b/Src/UView.pas index 9c3a64a36..538671b36 100644 --- a/Src/UView.pas +++ b/Src/UView.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Classes that encapsulate and provide information about "views" that are * displayed in the user interface. diff --git a/Src/UViewItemAction.pas b/Src/UViewItemAction.pas index cfb653f09..e387b9af1 100644 --- a/Src/UViewItemAction.pas +++ b/Src/UViewItemAction.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Custom action used to request display of a view item. } diff --git a/Src/UViewItemTreeNode.pas b/Src/UViewItemTreeNode.pas index 01ad0a444..de4e8abc9 100644 --- a/Src/UViewItemTreeNode.pas +++ b/Src/UViewItemTreeNode.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements class that extends TTreeNode by adding a property that references * a view item. diff --git a/Src/UWBCommandBars.pas b/Src/UWBCommandBars.pas index 9c1612ff1..34bdfdeb0 100644 --- a/Src/UWBCommandBars.pas +++ b/Src/UWBCommandBars.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Defines various classes used to configure one or more command bars owned by * a web browser container. Command bars are UI elements used to issue commands, diff --git a/Src/UWBExternal.pas b/Src/UWBExternal.pas index f27a82808..a07eaf4c1 100644 --- a/Src/UWBExternal.pas +++ b/Src/UWBExternal.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2005-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2005-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a COM object that extends a browser control's "external" object * enabling application code to be called from JavaScript. diff --git a/Src/UWBPopupMenus.pas b/Src/UWBPopupMenus.pas index ac88fb725..bc22c71cf 100644 --- a/Src/UWBPopupMenus.pas +++ b/Src/UWBPopupMenus.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2007-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2007-2020, Peter Johnson (gravatar.com/delphidabbler). * * Classes that manage and display popup menus associated with web browser * controls. diff --git a/Src/UWaitForThreadUI.pas b/Src/UWaitForThreadUI.pas index 4936cd802..f93a327ee 100644 --- a/Src/UWaitForThreadUI.pas +++ b/Src/UWaitForThreadUI.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that executes a thread and displays a dialog box if thread * takes more than a specified time to complete. diff --git a/Src/UWarnings.pas b/Src/UWarnings.pas index 6d73a7d0f..39f112e2e 100644 --- a/Src/UWarnings.pas +++ b/Src/UWarnings.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2014, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Classes and interfaces that encapsulate Delphi $WARN directives used to * switch off unwanted compiler warnings. diff --git a/Src/UWindowSettings.pas b/Src/UWindowSettings.pas index bedb614e5..c150f7c17 100644 --- a/Src/UWindowSettings.pas +++ b/Src/UWindowSettings.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2006-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2006-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements classes that can save and record position of a window along with * information about any window widgets. diff --git a/Src/UXMLDocConsts.pas b/Src/UXMLDocConsts.pas index f8b96a050..97110c409 100644 --- a/Src/UXMLDocConsts.pas +++ b/Src/UXMLDocConsts.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Constants defined node names and attributes used in the various XML documents * used by CodeSnip. diff --git a/Src/UXMLDocHelper.pas b/Src/UXMLDocHelper.pas index e4899bcf3..6999ff6a4 100644 --- a/Src/UXMLDocHelper.pas +++ b/Src/UXMLDocHelper.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2013, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a static class that helps with input and output to CodeSnip XML * documents. diff --git a/Src/UXMLDocumentEx.pas b/Src/UXMLDocumentEx.pas index f620f2803..6e600a0f0 100644 --- a/Src/UXMLDocumentEx.pas +++ b/Src/UXMLDocumentEx.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2008-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements extensions to TXMLDocument and IXMLDocument that provide some * helper methods. Also provides a simple list object that can contain XML diff --git a/Src/VCodeSnip.vi b/Src/VCodeSnip.vi index 5db77d489..810957539 100644 --- a/Src/VCodeSnip.vi +++ b/Src/VCodeSnip.vi @@ -2,10 +2,7 @@ ; v. 2.0. If a copy of the MPL was not distributed with this file, You can ; obtain one at http://mozilla.org/MPL/2.0/ ; -; Copyright (C) 2008-2016, Peter Johnson (www.delphidabbler.com). -; -; $Rev$ -; $Date$ +; Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). ; ; Version information description file for CodeSnip. diff --git a/Src/VCodeSnipPortable.vi b/Src/VCodeSnipPortable.vi index 94a312f9f..f8992f57e 100644 --- a/Src/VCodeSnipPortable.vi +++ b/Src/VCodeSnipPortable.vi @@ -2,10 +2,7 @@ ; v. 2.0. If a copy of the MPL was not distributed with this file, You can ; obtain one at http://mozilla.org/MPL/2.0/ ; -; Copyright (C) 2012-2016, Peter Johnson (www.delphidabbler.com). -; -; $Rev$ -; $Date$ +; Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). ; ; Version information description file for the portable edition of CodeSnip diff --git a/Src/Web.UCharEncodings.pas b/Src/Web.UCharEncodings.pas index 89eb1bcde..6e7366514 100644 --- a/Src/Web.UCharEncodings.pas +++ b/Src/Web.UCharEncodings.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2012, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that defines and provides access to character sets and * encodings supported when accessing web services. diff --git a/Src/Web.UInfo.pas b/Src/Web.UInfo.pas index 58209afab..1f43fed53 100644 --- a/Src/Web.UInfo.pas +++ b/Src/Web.UInfo.pas @@ -3,10 +3,7 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2009-2016, Peter Johnson (www.delphidabbler.com). - * - * $Rev$ - * $Date$ + * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). * * Provides records and static that provide information about URLs, web services * and proxy servers. From 5e83ae9be31876f2466b7ea6a36ebf07be12fe9b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 17:47:20 +0000 Subject: [PATCH 110/714] Updated CSS applied to body tag in HTML frames. This commit was somehow left over from the previous feature branch. --- Src/FrHTMLDlg.pas | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/FrHTMLDlg.pas b/Src/FrHTMLDlg.pas index fc1e17039..6d9cce905 100644 --- a/Src/FrHTMLDlg.pas +++ b/Src/FrHTMLDlg.pas @@ -85,6 +85,7 @@ procedure THTMLDlgFrame.BuildCSS(const CSSBuilder: TCSSBuilder); AddProperty(TCSS.BackgroundColorProp(fOwner.Color)); AddProperty(TCSS.FontProps(fOwner.Font)); AddProperty(TCSS.MarginProp(0)); + AddProperty(TCSS.LineHeightProp(120)); end; // Sets heading margins, padding and font size with CSSBuilder.AddSelector('h1') do From 4f10ebf78f534de2c287fe6c1960e1576a57e3be Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 17:49:18 +0000 Subject: [PATCH 111/714] Added TODOs --- Src/CodeSnip.todo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index 67b1270c0..27acc78a8 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,3 +1,5 @@ +{TODO -cDocs : Remove remaining $Rev$ and $Date$ SVN placeholders} +{TODO -cRefactor : Remove dlg-codesubmit-intro.html and dlg-codesubmit-finished.html from resources} {TODO -cDocs : Update License.html to replace references to SVN with Git} {TODO -cDocs : Update Build.html to replace references to SVN with Git} {TODO -cFirstRun : Delete UpdateChecks section from Config file on first run} From ba33f6ee2f83f8121b0a054de9ed07b5c1e4ee2f Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 20:57:46 +0000 Subject: [PATCH 112/714] Deleted reference to SWAG viewer on DelphiDabbler.com --- Src/Help/HTML/about_swag.htm | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Src/Help/HTML/about_swag.htm b/Src/Help/HTML/about_swag.htm index fab8aeb0c..6df6d4807 100644 --- a/Src/Help/HTML/about_swag.htm +++ b/Src/Help/HTML/about_swag.htm @@ -40,12 +40,5 @@

      browse the SWAG database and import any of its snippets into your own snippets database.

      -

      - You can browse the archive online using the DelphiDabbler SWAG Viewer. -

      From bf38f692835475467ac1546544f994143ae4b9b7 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:00:21 +0000 Subject: [PATCH 113/714] Updated links to required DelphiDabbler build tools. Links modified to access releases on GitHub --- Build.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Build.html b/Build.html index 36969e6fc..dfa13d9fb 100644 --- a/Build.html +++ b/Build.html @@ -198,8 +198,8 @@

      or later is required. Version Information Editor can be obtained from http://www.delphidabbler.com/software/vied. + href="https://github.com/delphidabbler/vied/releases" + >https://github.com/delphidabbler/vied/releases.

      From b1eebb595ee6c554314c72063d420754aac24b79 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:20:27 +0000 Subject: [PATCH 114/714] Changed bug report URL Changed from a DelphiDabbler redirect URL to direct link to CodeSnip's GitHub issues page --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index b46349156..9074c751d 100644 --- a/LICENSE +++ b/LICENSE @@ -14,7 +14,7 @@ There are two ways that license information can be found: do not have human-readable content. If any information is missing or incorrect please inform the author by filling -in a bug report at http://delphidabbler.com/url/codesnip-bugs +in a bug report at https://github.com/delphidabbler/codesnip/issues If you are planning on re-using any of the CodeSnip source, detailed licensing information will be found in Docs/License.html. \ No newline at end of file From cebe57ec698a553e2f065dde70902e10627f86a0 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:21:33 +0000 Subject: [PATCH 115/714] Changed copyright date and hyperlink --- Src/Install/Assets/License.rtf | Bin 1183 -> 1189 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Src/Install/Assets/License.rtf b/Src/Install/Assets/License.rtf index 7df5a967a780b4c381830b841766fafb3ba11218..28e3ecd94593d2e7f719cc3ad9eb4679db31eeae 100644 GIT binary patch delta 110 zcmbQwxs-FlA{Gl{Goy*i;+c#LCQCD#2NzrE>!;@Fr57cZC6*)>=_Tjq>ZhdU6l7$k jBqk;0q!uaE)>g-)<)jo9=af`ul#~<@)UmmnQG^))SAZv! delta 104 zcmZ3=IiGXFA{GNv3$uyK;>8SOauV~>jSNi970kd)Ljz-Dg~{xU=9X6a`YEY71sRzs niAhO0sYQCp`MC Date: Tue, 25 Feb 2020 21:22:53 +0000 Subject: [PATCH 116/714] Changed means of requesting new features to link to CodeSnip's GitHub issue tracker --- Docs/ReadMe.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt index 3c12914f8..941f5484f 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe.txt @@ -374,10 +374,8 @@ Feedback ================================================================================ If you want to suggest new features please use the feature request tracker -accessed from http://delphidabbler.com/url/codesnip-featurereq. - -Any other comments can be sent using the contact page at -http://delphidabbler.com/contact. +accessed from https://github.com/delphidabbler/codesnip/issues (GitHub account +required). FAQs From e9e6fa7e1f83bf253141e26031098911ca94e854 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:35:48 +0000 Subject: [PATCH 117/714] Replaced delphidabbler.com example urls with example.com --- Tests/Src/DUnit/TestUUtils.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/Src/DUnit/TestUUtils.pas b/Tests/Src/DUnit/TestUUtils.pas index df13320c0..749c44bb0 100644 --- a/Tests/Src/DUnit/TestUUtils.pas +++ b/Tests/Src/DUnit/TestUUtils.pas @@ -147,13 +147,13 @@ procedure TTestUtilsRoutines.TestURIBaseName; CheckEquals('', URIBaseName('foo/'), 'Test 3'); CheckEquals('bar', URIBaseName('foo/bar'), 'Test 4'); CheckEquals( - 'swag.php', - URIBaseName('http://www.delphidabbler.com/swag.php'), + 'foo.php', + URIBaseName('http://example.com/foo.php'), 'Test 5' ); CheckEquals( 'bar', - URIBaseName('http://www.delphidabbler.com/foo/bar'), + URIBaseName('http://example.com/foo/bar'), 'Test 6' ); end; From e652badb587d4fc3cf25a34360beda555acacff9 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:36:44 +0000 Subject: [PATCH 118/714] Replaced example url of delphidabbler.com with example.com --- Src/Help/HTML/reml.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Help/HTML/reml.htm b/Src/Help/HTML/reml.htm index b7d4fd0e2..3f669a608 100644 --- a/Src/Help/HTML/reml.htm +++ b/Src/Help/HTML/reml.htm @@ -181,8 +181,8 @@

      only work on the recipient's system if the specified file exists in the same location.
      Example: <p><a - href="http://www.delphidabbler.com">Visit - DelphiDabbler.com</a></p>.. + href="http://example.com">Visit + example.com</a></p>..

      From 7ff8a88df5f909cc6760252243354c6b91774fab Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:42:10 +0000 Subject: [PATCH 119/714] Removed reference to contributors on snippets.codesnip.com Also added TODO to remind to get license info from database meta data. --- Src/USaveUnitMgr.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Src/USaveUnitMgr.pas b/Src/USaveUnitMgr.pas index 98e360f04..cb0505e88 100644 --- a/Src/USaveUnitMgr.pas +++ b/Src/USaveUnitMgr.pas @@ -98,6 +98,7 @@ implementation // Project UAppInfo, UUtils, Web.UInfo; +// TODO -cDatabase: get license info from database rather than use literal text. resourcestring // Dialog box title @@ -112,9 +113,8 @@ implementation // Error message sErrorMsg = 'Filename is not valid for a Pascal unit'; // Unit header comments - sLicense = 'This unit is copyright � %0:s by the Code Snippets Database ' - + 'Contributors (http://snippets.delphidabbler.com/contributors) and ' - + 'is licensed under the MIT license ' + sLicense = 'This unit is copyright � %0:s by the Peter Johnson and Code ' + + 'Snippets Database contributors and is licensed under the MIT license ' + '(http://opensource.org/licenses/MIT).'; sMainDescription = 'The unit was generated automatically and incorporates a ' + 'selection of source code taken from the Code Snippets Database at %0:s.'; From d9ef2deab8cfa9306ee683c82a9053110f4e7b5a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:42:56 +0000 Subject: [PATCH 120/714] Changed url of changelog from delphidabbler.com to github --- Src/Help/HTML/new.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Help/HTML/new.htm b/Src/Help/HTML/new.htm index 17e2a6404..87f2143be 100644 --- a/Src/Help/HTML/new.htm +++ b/Src/Help/HTML/new.htm @@ -279,7 +279,7 @@

    For other features of v4 please read the change log for this release and all preceding v4 releases, including From 23b015ca4aeaec3d302864c3afb1a87670fb12c9 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:45:47 +0000 Subject: [PATCH 121/714] Replaced reference to SWAG from delphidabbler.com to SWAG GitHub project --- Src/SWAG.UImporter.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Src/SWAG.UImporter.pas b/Src/SWAG.UImporter.pas index 048655341..8046a7de4 100644 --- a/Src/SWAG.UImporter.pas +++ b/Src/SWAG.UImporter.pas @@ -9,6 +9,7 @@ * CodeSnip format and adds them to the database. } +// TODO -cDatabase: check BSD3URI const has valid license info unit SWAG.UImporter; @@ -166,7 +167,7 @@ function TSWAGImporter.ExtraBoilerplate: IActiveText; sLicensePostfix = '.'; const // URLs of web pages referenced from links in boilerplate - SWAGDBURI = 'http://swag.delphidabbler.com/'; + SWAGDBURI = 'https://github.com/delphidabbler/swag'; BSD3URI = 'http://opensource.org/licenses/BSD-3-Clause'; var // Active text attributes for links included in boilerplate From 815b81294761acbdc9662ccf1f18c725b04008d3 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:48:03 +0000 Subject: [PATCH 122/714] Changed app URLs from delphidabbler.com to GitHub --- Src/Install/CodeSnip.iss | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Src/Install/CodeSnip.iss b/Src/Install/CodeSnip.iss index d2e4dd904..f01c01f66 100644 --- a/Src/Install/CodeSnip.iss +++ b/Src/Install/CodeSnip.iss @@ -17,7 +17,7 @@ /* assumes S begins with "Release " followed by version as x.x.x */ \ Local[0] = Copy(S, Len("Release ") + 1, 99), \ Local[0] - + #define AppPublisher "DelphiDabbler" #define AppName "CodeSnip" #define ExeFile AppName + ".exe" @@ -34,10 +34,10 @@ #define ExeProg SrcExePath + ExeFile #define AppVersion DeleteToVerStart(GetFileProductVersion(ExeProg)) #define Copyright GetStringFileInfo(ExeProg, LEGAL_COPYRIGHT) -#define Company "DelphiDabbler.com" -#define WebAddress "www.delphidabbler.com" -#define WebURL "https://" + WebAddress + "/" -#define AppURL WebURL + "software/codesnip" +#define Company "DelphiDabbler" +#define WebAddress "github.com/delphidabbler" +#define WebURL "https://" + WebAddress + "/" +#define AppURL WebURL + "/codesnip" #define InstUninstDir "Uninst" ; Creates name of setup file from app name, version and any special build string From c7cfc54238a0783364463b8f684dd92a7edb1b56 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:51:02 +0000 Subject: [PATCH 123/714] Fixed URLs and deleted sections on information passes to web services --- Docs/Privacy.txt | 91 ++--------------- Src/Help/HTML/privacy_statement.htm | 148 ++-------------------------- 2 files changed, 15 insertions(+), 224 deletions(-) diff --git a/Docs/Privacy.txt b/Docs/Privacy.txt index c570a5b2f..caa3092fb 100644 --- a/Docs/Privacy.txt +++ b/Docs/Privacy.txt @@ -50,8 +50,9 @@ Spyware No spyware or other software that threatens your privacy has been deliberately or knowingly included with CodeSnip or its installer. If the program is found to contain spyware it will have been added by third parties without permission. -Please inform the author of any such occurrence or any suspicious behaviour via -http://delphidabbler.com/contact. +Please inform the author of any such occurrence or any suspicious behaviour by +creating an issue on the CodeSnip GitHub repository at +https://github.com/delphidabbler/codesnip. CodeSnip never tries to "phone home" of its own accord. It only goes online in response to user requests. Should you notice any unauthorised activity please @@ -62,88 +63,10 @@ hacked by some third party. CodeSnip Online Activity ================================================================================ -CodeSnip may go online for several reasons. They are: - - 1. Updating the database. - 2. Importing snippets from the SWAG database. - 3. Accessing various websites via hyperlinks and menu options. - 4. Accessing the internet using a proxy server. - -Some are performed directly by CodeSnip, which communicates with web services -located on delphidabbler.com using HTTP on port 80. Others simply display web pages in a browser. The last reason passes user information to the proxy server -if configured to do so, - -Personal data will neither be published on the DelphiDabbler website nor -knowingly passed to third parties. Furthermore your data will only be used by -the author for the purposes described below. - - -Updating the Database --------------------------------------------------------------------------------- - -This activity is started by displaying the "Update From Web" dialogue box and -clicking its "Update from Web" button. - -CodeSnip may also check automatically, behind the scenes, to see if database -updates are available. This usually happens just after the program has started. -You can disable this automatic checking by using the "Updates" tab of the -"Preferences" dialogue box which is displayed via the "Tools | Preferences" menu -option. - -When CodeSnip contacts the update web service it sends the following -information: - - * The unique 32 digit program key (see Common.config above for details). - * Program version number. - * Operating system description. - * Internet Explorer version. - -This information is recorded in two places: - - 1. Each transaction is recorded in a log file on the web server. This log - is used for tracking any database errors. - - 2. A database of the program keys is updated with the following data: - - * the number of times that program has updated the database; - * the first and latest version of CodeSnip having that program key; - * the date of the first and latest updates; - * the current operating system being used; - * the current Internet Explorer version being used. - - This database is used to provide usage information and to track the - operating systems and browser control versions currently in use. This - information informs development of CodeSnip. - -None of these records store any information that can be tracked back to an -individual. - - -Importing snippets from the SWAG database ------------------------------------------ - -Snippets are imported from the SWAG database (http://swag.delphidabbler.com) -using the SWAG Import Wizard that is accessed from the "Snippets | Import -Snippets From SWAG" menu item. - -The wizard gets the required snippets from the REST API at -swag.delphidabbler.com. This API is documented at -http://swag.delphidabbler.com/docs/api/. No personal data is sent. - - -Accessing Websites via Links and Menu Options --------------------------------------------------------------------------------- - -CodeSnip's "Help" menu contains several items that cause various web pages from -DelphiDabbler.com to be displayed in your default web browser. - -In addition, various links in the program's main display, some dialogue boxes -and the help file access remote websites which are displayed in your default -browser. You should refer to the relevant website's privacy policies to learn -how they use any data you supply when visiting their pages. - -DelphiDabbler has no control over the content of linked third party websites and -you follow such links at your own risk. +CodeSnip's Help menu and several other parts of the user interface contain menu +items and links that cause various third party web pages to be displayed in your +default web browser. The author takes no responsibility for any data collected by +your web browser or the individual web sites. Accessing the internet using a proxy server diff --git a/Src/Help/HTML/privacy_statement.htm b/Src/Help/HTML/privacy_statement.htm index d58a4d7f7..675637b75 100644 --- a/Src/Help/HTML/privacy_statement.htm +++ b/Src/Help/HTML/privacy_statement.htm @@ -80,11 +80,11 @@

    deliberately or knowingly included with CodeSnip or its installer. If the program is found to contain spyware it will have been added by third parties without permission. Please inform the author of any - such occurrence or any suspicious behaviour via http://delphidabbler.com/contact. + >the CodeSnip GitHub repository (GitHub account required).

    CodeSnip never tries to "phone home" of its own @@ -96,143 +96,11 @@

    CodeSnip Online Activity

    - CodeSnip may go online for several reasons. They are: -

    -
      -
    1. - Updating the database. -
    2. -
    3. - Importing snippets from the SWAG database. -
    4. -
    5. - Accessing various websites via hyperlinks and menu options. -
    6. -
    7. - Accessing the internet using a proxy server. -
    8. -
    -

    - The first two actions are performed directly by CodeSnip, - which communicates with web services located on delphidabbler.com - using HTTP on port 80. The third action simply displays web pages in a - browser. The fourth passes user information to the proxy server. -

    -

    - Personal data will neither be published on the DelphiDabbler website nor - knowingly passed to third parties. Furthermore your data will only be - used by the author for the purposes described below. -

    -

    - Updating the Database -

    -

    - This activity is started by displaying the "Update From Web" - dialogue box and clicking its "Update from Web" button. -

    -

    - CodeSnip may also check automatically, behind the scenes, to see - if database updates are available. This usually happens just after the - program has started. You can disable this automatic checking by using the - "Updates" tab of the "Preferences" dialogue box which - is displayed via the "Tools | Preferences" menu option. -

    -

    - When CodeSnip contacts the update web service it sends the - following information: -

    -
      -
    • - The unique 32 digit program key (see Common.config above for details). -
    • -
    • - Program version number. -
    • -
    • - Operating system description. -
    • -
    • - Internet Explorer version. -
    • -
    -

    - This information is recorded in two places: -

    -
      -
    1. - Each transaction is recorded in a log file on the web server. This log - is used for tracking any database errors. -
    2. -
    3. -
      - A database of the program keys is updated with the following data: -
      -
        -
      • - the number of times that program has updated the database; -
      • -
      • - the first and latest version of CodeSnip having that program key; -
      • -
      • - the date of the first and latest updates; -
      • -
      • - the current operating system being used; -
      • -
      • - the current Internet Explorer version being used. -
      • -
      -
      - This database is used to provide usage information and to track the - operating systems and browser control versions currently in use. This - information informs development of CodeSnip. -
      -
    4. -
    -

    - None of these records store any information that can be tracked back to an - individual. -

    -

    - Importing snippets from the SWAG database -

    -

    - Snippets are imported from the SWAG database (http://swag.delphidabbler.com) using the SWAG Import Wizard - that is accessed from the Snippets | Import Snippets From SWAG - menu item. -

    -

    - The wizard gets the required snippets from the REST API at - swag.delphidabbler.com. This API is documented at http://swag.delphidabbler.com/docs/api/. No personal data is sent. -

    -

    - Accessing Websites via Links and Menu Options -

    -

    - CodeSnip's Help menu contains several items that cause various - web pages from DelphiDabbler.com to be displayed in your default web - browser. -

    -

    - In addition, various links in the program's main display, some dialogue - boxes and the help file access remote websites which are displayed in your - default browser. You should refer to the relevant website's privacy - policies to learn how they use any data you supply when visiting their - pages. -

    -

    - DelphiDabbler has no control over the content of linked third party - websites and you follow such links at your own risk. + CodeSnip's Help menu and several other parts of the user + interface contain menu items and links that cause various third party web + pages to be displayed in your default web browser. The author takes no + responsibility for any data collected by your web browser or the + individual web sites.

    Accessing the internet using a proxy server From 721c7d1c79b373fd31736639243f5ad49ac81146 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:52:34 +0000 Subject: [PATCH 124/714] Fixed old delphidabbler.com and removed information that no longer applies --- README.md | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 1d55db645..44fca9f36 100644 --- a/README.md +++ b/README.md @@ -19,18 +19,12 @@ A code bank designed with Pascal in mind. CodeSnip is an open source code bank for storing and viewing your code snippets. While it can manage snippets in any source language, it is focussed mainly on Pascal and Delphi code for which additional features are available. -CodeSnip also provides offline access to the DelphiDabbler [Code Snippets Database](http://snippets.delphidabbler.com/) -- *deprecated* † ‡. +CodeSnip also provides offline access to the DelphiDabbler [Code Snippets Database](https://github.com/delphidabbler/code-snippets). The program is available in both standard and portable editions. -For more information see [http://codesnip.delphidabbler.com/features](http://codesnip.delphidabbler.com/features) -- *deprecated*. - CodeSnip requires Windows 2000 or later and Internet Explorer 6 or later, although XP and IE 8 and later are preferred. - DelphiDabbler.com is due to close down on 15 June 2020. After this time these links will no longer work. - - The Code Snippets Database has been imported to GitHub: it's a work in progress. [See the repo](https://github.com/delphidabbler/code-snippets). - ## Installation CodeSnip is installed and removed using a standard Windows installer. Administrator privileges are required for installation. @@ -41,9 +35,7 @@ The following support is available for CodeSnip: * A comprehensive help file. * A [read-me file](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/ReadMe.txt) * that discusses installation, configuration, updating and known issues. -* A dedicated set of [web pages](http://codesnip.delphidabbler.com/) -- *deprecated*. * An [FAQ](https://github.com/delphidabbler/codesnip-faq/blob/master/UsingCodeSnip.md) -* An [RSS news feed](http://delphidabbler.com/feeds/site-news-feed?id=codesnip) -- *deprecated*. This can also be accessed via the program. * A [Blog](http://codesnip-app.blogspot.co.uk/). * A [privacy statement](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/Privacy.txt)* that provides information about any personal information stored by the program and what info is transmitted over the net. @@ -51,7 +43,6 @@ There's also plenty of info available on how to compile CodeSnip from source - s * These links take you to the most recent version of the documents -- they can change from release to release. - These features are **deprecated** -- they are dependent on the delphidabbler.com web server which is due to close down on 15th June 2020. ## Source Code @@ -71,7 +62,7 @@ Contributions are no longer accepted for this repo. If you wish to take over dev `master` and each branch will have a file in the root directory named `Build.html` that gives detailed information about how to compile CodeSnip. -There is also an [FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppSource) -- *deprecated* (see [Support](#support) above). +There is also an [FAQ](https://github.com/delphidabbler/codesnip-faq) -- (see [Support](#support) above). ## Change Log @@ -83,7 +74,7 @@ The program's EULA which gives full details of the license applying to the lates Most of the original code is made available under the [Mozilla Public License v2](https://www.mozilla.org/MPL/2.0/). -The [CodeSnip Compiling & Source Code FAQ](http://wiki.delphidabbler.com/index.php/FAQs/CodeSnipAppSource) may be useful if you have any queries about re-using CodeSnip source in other projects. +The [CodeSnip Compiling & Source Code FAQ](https://github.com/delphidabbler/codesnip-faq/blob/master/SourceCode.md) may be useful if you have any queries about re-using CodeSnip source in other projects. ## CodeSnip 5 Development @@ -94,7 +85,4 @@ Unfortunately `pagoda` has also been abandoned now. The branch has been left in The idea behind v5 was to: 1. Generalise CodeSnip to be a code bank for several different languages instead of just Pascal, while still providing some additional support for test-compiling Pascal code. -2. Increase the focus on the user's own code while downplaying the importance of code downloaded from the DelphiDabbler [Code Snippets database](http://snippets.delphidabbler.com/), like [SWAG](http://swag.delphidabbler.com/) is at present. -3. Remove the program's dependency on web services provided by [DelphiDabbler.com](http://delphidabbler.com) given the current uncertainty over that websites future. - - It is hoped to move the Code Snippets database to GitHub before DelphiDabbler closes down on 15 June 2020. +2. Increase the focus on the user's own code while downplaying the importance of code downloaded from the DelphiDabbler [Code Snippets database](https://github.com/delphidabbler/code-snippets), like [SWAG](https://github.com/delphidabbler/swag) is at present. From 9b048d3a3564f5d238a94e4b81a8056a917b84ce Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:54:00 +0000 Subject: [PATCH 125/714] Changed About Box links to delphidabbler.com to Gravatar and Github --- Src/Res/HTML/dlg-about-database-tplt.html | 5 ++--- Src/Res/HTML/dlg-about-program-tplt.html | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Src/Res/HTML/dlg-about-database-tplt.html b/Src/Res/HTML/dlg-about-database-tplt.html index 899886bbc..e0fa3b839 100644 --- a/Src/Res/HTML/dlg-about-database-tplt.html +++ b/Src/Res/HTML/dlg-about-database-tplt.html @@ -45,9 +45,8 @@ The DelphiDabbler Code Snippets Database is an online resource containing numerous fragments of useful Object Pascal code. + href="https://github.com/delphidabbler/code-snippets" + >Code Snippets Database is aresource containing numerous fragments of useful Object Pascal code.

    diff --git a/Src/Res/HTML/dlg-about-program-tplt.html b/Src/Res/HTML/dlg-about-program-tplt.html index 9d0d6b352..02368af13 100644 --- a/Src/Res/HTML/dlg-about-program-tplt.html +++ b/Src/Res/HTML/dlg-about-program-tplt.html @@ -47,11 +47,11 @@

    - DelphiDabbler CodeSnip is copyright © 2005-2016 by Peter D + DelphiDabbler CodeSnip is copyright © 2005-2020 by Peter D Johnson, http://delphidabbler.com. + href="https://en.gravatar.com/delphidabbler" + >https://en.gravatar.com/delphidabbler.

    The program is made available under the terms of the Date: Tue, 25 Feb 2020 21:55:22 +0000 Subject: [PATCH 126/714] Deleted invalid links from Help topics --- Src/Help/HTML/dlg_prefs_codegen.htm | 8 +++----- Src/Help/HTML/dlg_update.htm | 9 --------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Src/Help/HTML/dlg_prefs_codegen.htm b/Src/Help/HTML/dlg_prefs_codegen.htm index 4505c3491..0fbf61d1d 100644 --- a/Src/Help/HTML/dlg_prefs_codegen.htm +++ b/Src/Help/HTML/dlg_prefs_codegen.htm @@ -54,11 +54,9 @@

    have been introduced in different versions of Delphi, the minimum version of the compiler that supports the warning must also be specified. This is shown in the Min. Compiler column of the list view. The version - number is that specified by the Delphi's CompilerVersion constant.. Finally, whether a warning is - switched on or off is shown in the State column. + number is that specified by the Delphi's CompilerVersion + constant. Finally, whether a warning is switched on or off is shown in the + State column.

    The list view can be sorted on the contents of any of the columns by diff --git a/Src/Help/HTML/dlg_update.htm b/Src/Help/HTML/dlg_update.htm index 85bce2ccb..efcb14791 100644 --- a/Src/Help/HTML/dlg_update.htm +++ b/Src/Help/HTML/dlg_update.htm @@ -76,15 +76,6 @@

    and try again. If you receive web server or time out errors this may be due to the server being down or busy so it is worth trying later.

    -

    - If a server or timeout error persists please inform the author via the - DelphiDabbler website's - contact page. -

    Note: By default CodeSnip checks online from time to time to check if any database updates are available. A pop-up From 28b45ae3c1c93043a6d75132fa6750cf34d84451 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:56:06 +0000 Subject: [PATCH 127/714] Replaced delphidabbler.com links with GitHub links --- Src/Help/HTML/welcome.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Help/HTML/welcome.htm b/Src/Help/HTML/welcome.htm index 0e8cecd94..33feb572e 100644 --- a/Src/Help/HTML/welcome.htm +++ b/Src/Help/HTML/welcome.htm @@ -30,7 +30,7 @@

    download and display source code from the DelphiDabbler Code Snippets Database of reusable Pascal source code.

    @@ -45,7 +45,7 @@

    sharing the same copy of the Code Snippets Database. The Standard Edition's program file name is CodeSnip.exe. From 9019730a7f9f72f54c24af397076136ccf0d2f5b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:57:14 +0000 Subject: [PATCH 128/714] Replaced delphidabbler.com url redirect link with direct link to GitHub --- Src/Res/HTML/welcome-tplt.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Res/HTML/welcome-tplt.html b/Src/Res/HTML/welcome-tplt.html index eed51f34f..61fe94369 100644 --- a/Src/Res/HTML/welcome-tplt.html +++ b/Src/Res/HTML/welcome-tplt.html @@ -82,7 +82,7 @@

    The DelphiDabbler Code Snippets Database has not been installed. From 04e001b5a2a22cd64c1bf3cb30c49e43af8a83a1 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:58:58 +0000 Subject: [PATCH 129/714] Replaced links to required tools on delpdabbler.com with links to their GitHub projects --- Build.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Build.html b/Build.html index dfa13d9fb..0deac3f7e 100644 --- a/Build.html +++ b/Build.html @@ -217,8 +217,8 @@

    is required. The HTML Resource Compiler can be obtained from http://www.delphidabbler.com/software/htmlres. + href="https://github.com/delphidabbler/htmlres/releases" + >https://github.com/delphidabbler/htmlres/releases.

    @@ -424,9 +424,9 @@

    >CodeSnip SourceForge Files Page.
  • - Grab the source code of the latest release from DelphiDabbler.com. + Grab the source code of the latest release from the release page of the delphidabbler/codesnip repository on GitHub.
  • From c6ea5a79f28fa5b397d176581e8dee0d14d4d796 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 21:59:53 +0000 Subject: [PATCH 130/714] Replaced links to delphidabbler.com with links to GitHub --- Docs/License.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Docs/License.html b/Docs/License.html index 009f3ea03..5dd637908 100644 --- a/Docs/License.html +++ b/Docs/License.html @@ -250,8 +250,8 @@

    All of CodeSnip's original source code, and some third party code, is available from the CodeSnip Subversion Repository. + href="https://github.com/delphidabbler/codesnip" + >CodeSnip GitHub repository.

    Details of the license applying to a source code file will usually be @@ -322,8 +322,8 @@

    Copies of the images are available in the CodeSnip Subversion Repository in the + href="https://github.com/delphidabbler/codesnip" + >CodeSnip GitHub Repository in the Src/Help/Images and Src/Res/Img directories and sub-directories. These images are licensed as follows:

    @@ -354,8 +354,8 @@

    simply note in your documentation, about box, web page or similar that the icons form part of the image set for DelphiDabbler CodeSnip and provide a link to http://delphidabbler.com/software/codesnip. + href="https://github.com/delphidabbler/codesnip" + >https://github.com/delphidabbler/codesnip.

    These images include modifications and remixes of icons supplied under From b597a7097ba3b2cd7e97966b88467ab6ceb88e29 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 22:43:23 +0000 Subject: [PATCH 131/714] Removed redundant caption informing using test server --- Src/FmMain.pas | 2 -- 1 file changed, 2 deletions(-) diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 32b035f59..410d4d28c 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -1329,8 +1329,6 @@ procedure TMainForm.InitForm; // Set window caption Application.Title := TAppInfo.ProgramCaption; Caption := TAppInfo.ProgramCaption; - if TWebInfo.UsingTestServer then - Caption := Caption + ' [' + TWebInfo.TestServerHost + ']'; // Restore window settings fWindowSettings := TMainWindowSettings.CreateStandAlone(Self); // auto-freed From 0f495e21e492a563c86ac2bc25363935c52ce516 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 22:44:05 +0000 Subject: [PATCH 132/714] Removed unused records and methods --- Src/Web.UInfo.pas | 162 ---------------------------------------------- 1 file changed, 162 deletions(-) diff --git a/Src/Web.UInfo.pas b/Src/Web.UInfo.pas index 1f43fed53..a9b262d46 100644 --- a/Src/Web.UInfo.pas +++ b/Src/Web.UInfo.pas @@ -21,44 +21,6 @@ interface UBaseObjects; -type - /// Record that contains information about a web service. - TWebServiceInfo = record - /// Template for web service's URI. - /// Must contain a single '%s' placeholder for web host - ScriptURI: string; - /// User agent to be used when accessing web service. - UserAgent: string; - /// MIME type of media used by web service. - MediaType: string; - /// Constructs a record with given field values. - /// string [in] Template for web - /// service's URI. Must contain a single '%s' placeholder for web host. - /// - /// string [in] User agent to use when - /// accessing web service. - /// string [in] Optional. Media type used - /// by web service. - constructor Create(const AScriptURLTplt, AUserAgent: string; - const AMediaType: string = 'text/*'); - end; - -type - /// Record that contains informtion about a web proxy server. - /// - TWebProxyInfo = record - /// Whether to use a proxy server. - UseProxy: Boolean; - /// IP address of proxy server. - IPAddress: string; - /// Proxy server port. - Port: Word; - /// User name: optional. - UserName: string; - /// Password: optional. - Password: string; - end; - type /// Static class that provides information about URLs and any proxy /// server used by CodeSnip. @@ -73,15 +35,6 @@ TWebInfo = class(TNoConstructObject) ProductionServerHost = 'delphidabbler.com'; /// URL of DelphiDabbler website. WebsiteURL = 'http://' + ProductionServerHost; - strict private - /// Returns the name of the server that hosts web services that - /// are used by CodeSnip. - /// By default is the production server (as specified by the - /// ProductionServerHost constant). CodeSnip will instead use a - /// test server (as returned by the TestServerHost method) if the - /// name and port of the test server is passed on the command line via the - /// --test-server command line option. - class function Host: string; public const /// URL of CodeSnip's GitHub page. @@ -110,126 +63,11 @@ TWebInfo = class(TNoConstructObject) + 'blob/master/README.md'; /// URL of the the CodeSnip blog. BlogURL = 'http://codesnip-app.blogspot.com/'; - public - /// Returns the name of the server that hosts web services used by - /// CodeSnip when under testing. This server receives updated web services - /// before they are released to the production server. - /// - /// The name of this server must be passed on the command line via - /// the --test-server option. If this option is not specified then - /// TestServerHost returns the empty string. - /// The format of the command line switch is - /// --test-server=server-name or - /// --test-server=server-name:port where server-name is the - /// name of the test server and port is the port number it is - /// operating on, for example --test-server=localhost:8080 or - /// --test-server=test.delphidabbler.com. The - /// port number and its preceding ':' character can be omitted if the - /// server is on port 80. - /// The server must be using the http:// protocol. - /// - class function TestServerHost: string; - /// Builds the URL of a web service. - /// string. [in] Template of URL of web - /// service script. Must contain a '%s' placeholder for host name. - /// string. Required URL. - class function WebServiceURL(const URLTplt: string): string; - /// Gets information about any required web proxy. - /// The web proxy information is read from settings. - class function WebProxyInfo: TWebProxyInfo; - /// Checks if the program is using a test web server. - /// Boolean. True if a test web server is being - /// used, False if the production web server is being used. - /// - /// - /// True is returned iff a valid --test-server command - /// line option was supplied. - /// --test-server should only be specified by developers with - /// access to a suitable test server. - /// - class function UsingTestServer: Boolean; end; implementation -uses - // Delphi - SysUtils, - // Project - USettings, UStrUtils; - - -{ TWebInfo } - -class function TWebInfo.Host: string; -begin - if UsingTestServer then - Result := TestServerHost - else - Result := ProductionServerHost; -end; - -class function TWebInfo.TestServerHost: string; -const - TestServerSwitch = '--test-server'; - Separator = '='; -var - Idx: Integer; - ParamName: string; - ParamValue: string; -begin - for Idx := 1 to ParamCount do - begin - if not StrContainsStr(Separator, ParamStr(Idx)) then - Continue; - StrSplit(ParamStr(Idx), Separator, ParamName, ParamValue); - if not StrSameStr(TestServerSwitch, ParamName) then - Continue; - if ParamValue = EmptyStr then - Continue; - Exit(ParamValue); - end; - Result := EmptyStr; -end; - -class function TWebInfo.UsingTestServer: Boolean; -begin - Result := TestServerHost <> EmptyStr; -end; - -class function TWebInfo.WebProxyInfo: TWebProxyInfo; -var - ProxySection: ISettingsSection; // settings section containing proxy info -begin - ProxySection := Settings.ReadSection(ssProxyServer); - Result.UseProxy := ProxySection.GetBoolean('UseProxy', False); - if Result.UseProxy then - begin - Result.IPAddress := ProxySection.GetString('IPAddress'); - Result.Port := ProxySection.GetInteger('Port', 80); - Result.UserName := ProxySection.GetString('UserName'); - Result.Password := ProxySection.GetEncryptedString('Password'); - end; -end; - -class function TWebInfo.WebServiceURL(const URLTplt: string): string; -begin - Assert(StrContainsText('%s', URLTplt), - ClassName + '.WebServiceURL: URLTplt contains no host placeholder'); - Result := Format(URLTplt, [Host]); -end; - -{ TWebServiceInfo } - -constructor TWebServiceInfo.Create(const AScriptURLTplt, AUserAgent, - AMediaType: string); -begin - ScriptURI := TWebInfo.WebServiceURL(AScriptURLTplt); // URL of script on host - UserAgent := AUserAgent; - MediaType := AMediaType; -end; - end. From 1c6c5f8ae49f95ba4f9344ba0327d81663dad21f Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 23:10:32 +0000 Subject: [PATCH 133/714] Removed unused Web.UCharEncodings unit --- Src/CodeSnip.dpr | 1 - Src/CodeSnip.dproj | 1 - Src/Web.UCharEncodings.pas | 101 ------------------------------------- 3 files changed, 103 deletions(-) delete mode 100644 Src/Web.UCharEncodings.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index c0278db35..eef9262b1 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -376,7 +376,6 @@ uses UXMLDocConsts in 'UXMLDocConsts.pas', UXMLDocHelper in 'UXMLDocHelper.pas', UXMLDocumentEx in 'UXMLDocumentEx.pas', - Web.UCharEncodings in 'Web.UCharEncodings.pas', Web.UInfo in 'Web.UInfo.pas'; // Include resources diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 6071dbaa2..5c4c9ea4e 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -577,7 +577,6 @@ - diff --git a/Src/Web.UCharEncodings.pas b/Src/Web.UCharEncodings.pas deleted file mode 100644 index 6e7366514..000000000 --- a/Src/Web.UCharEncodings.pas +++ /dev/null @@ -1,101 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). - * - * Implements a class that defines and provides access to character sets and - * encodings supported when accessing web services. -} - - -unit Web.UCharEncodings; - - -interface - - -uses - // Project - UEncodings, UIStringList; - - -type - - /// - /// Static class that provies access to character sets and their associated - /// encodings supported when accessing web servers. - /// - TWebCharEncodings = class(TEncodingHelper) - strict private - /// Character set used when none is specified. - const DefaultEncoding = 'ISO-8859-1'; - /// List of supported character sets. - class var fSupportedCharSets: IStringList; - strict protected - /// - /// Checks if a named character set is in the list of supported character - /// sets. - /// - class function IsWantedCharSet(const CharSet: string): Boolean; override; - public - /// - /// Creates list of supported encodings. - /// - class constructor Create; - /// - /// Returns command separated list of accepted character set names suitable - /// for inclusion in HTTP headers. - /// - class function AcceptCharSet: string; - /// - /// Returns name of character set to use by default when empty string is - /// specified as a character set name. - /// - /// Required default character set name. - class function DefaultCharSet: string; override; - end; - - -implementation - - -{ TWebCharEncodings } - -class function TWebCharEncodings.AcceptCharSet: string; -var - CharSet: string; -begin - Result := ''; - for CharSet in CharSets do - begin - if Result <> '' then - Result := Result + ', '; - Result := Result + CharSet; - end; -end; - -class constructor TWebCharEncodings.Create; -begin - fSupportedCharSets := TIStringList.Create( - ['UTF-8', 'UTF-16LE', 'UTF-16BE', 'ISO-8859-1', 'Windows-1252', 'ASCII'] - ); - // NOTE: UTF-16 has been left out because some problems with PHP's - // mb_convert_encoding() with UTF-16 have been found, so it's not safe to - // accept this encoding -end; - -class function TWebCharEncodings.DefaultCharSet: string; -begin - Result := ISO88591CharSetName; -end; - -class function TWebCharEncodings.IsWantedCharSet(const CharSet: string): - Boolean; -begin - Result := fSupportedCharSets.Contains(CharSet); -end; - -end. - From 04482778dd40b2b1cdf74723bf4217d9892fad56 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 23:18:10 +0000 Subject: [PATCH 134/714] Added new TODO --- Src/CodeSnip.todo | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index 27acc78a8..74c2693bc 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,3 +1,4 @@ +{TODO -cWeb : Remove donate box & related notes - problem doing direct link to paypalwith giving away email address} {TODO -cDocs : Remove remaining $Rev$ and $Date$ SVN placeholders} {TODO -cRefactor : Remove dlg-codesubmit-intro.html and dlg-codesubmit-finished.html from resources} {TODO -cDocs : Update License.html to replace references to SVN with Git} From d5477e12eb5284fe71e4b723e3ce231c292419df Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 23:22:51 +0000 Subject: [PATCH 135/714] Renamed Web.UInfo unit as UUrl and TWebInfo as TURL. Changed all affected units. --- Src/CodeSnip.dpr | 4 ++-- Src/CodeSnip.dproj | 2 +- Src/FmBugReportBaseDlg.pas | 4 ++-- Src/FmDBUpdateDlg.pas | 4 ++-- Src/FmMain.pas | 10 +++++----- Src/FmSWAGImportDlg.pas | 6 +++--- Src/UPaypalDonateAction.pas | 4 ++-- Src/USaveUnitMgr.pas | 6 +++--- Src/USnippetDoc.pas | 4 ++-- Src/{Web.UInfo.pas => UUrl.pas} | 13 ++++--------- 10 files changed, 26 insertions(+), 31 deletions(-) rename Src/{Web.UInfo.pas => UUrl.pas} (92%) diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index eef9262b1..9053ec531 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -356,6 +356,7 @@ uses UUnitAnalyser in 'UUnitAnalyser.pas', UUnitsChkListMgr in 'UUnitsChkListMgr.pas', UURIEncode in 'UURIEncode.pas', + UUrl in 'UUrl.pas', UUrlMonEx in 'UUrlMonEx.pas', UUserDBBackup in 'UUserDBBackup.pas', UUserDBMgr in 'UUserDBMgr.pas', @@ -375,8 +376,7 @@ uses UWindowSettings in 'UWindowSettings.pas', UXMLDocConsts in 'UXMLDocConsts.pas', UXMLDocHelper in 'UXMLDocHelper.pas', - UXMLDocumentEx in 'UXMLDocumentEx.pas', - Web.UInfo in 'Web.UInfo.pas'; + UXMLDocumentEx in 'UXMLDocumentEx.pas'; // Include resources {$Resource ExternalObj.tlb} // Type library file diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 5c4c9ea4e..bfc03ce3d 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -557,6 +557,7 @@ + @@ -577,7 +578,6 @@ - Base diff --git a/Src/FmBugReportBaseDlg.pas b/Src/FmBugReportBaseDlg.pas index ec00ab72b..963703fb9 100644 --- a/Src/FmBugReportBaseDlg.pas +++ b/Src/FmBugReportBaseDlg.pas @@ -55,7 +55,7 @@ implementation // Delphi ExtActns, // Project - UColours, UCtrlArranger, UFontHelper, Web.UInfo; + UColours, UCtrlArranger, UFontHelper, UUrl; {$R *.dfm} @@ -100,7 +100,7 @@ procedure TBugReportBaseDlg.GoToTracker; // must be able to override this method. with TBrowseURL.Create(nil) do try - URL := TWebInfo.BugTrackerURL; + URL := TURL.BugTrackerURL; Execute; finally Free; diff --git a/Src/FmDBUpdateDlg.pas b/Src/FmDBUpdateDlg.pas index 1536cad2d..7eef58327 100644 --- a/Src/FmDBUpdateDlg.pas +++ b/Src/FmDBUpdateDlg.pas @@ -173,7 +173,7 @@ implementation UMessageBox, UStructs, UStrUtils, - Web.UInfo; + UUrl; {$R *.dfm} @@ -272,7 +272,7 @@ procedure TDBUpdateDlg.ConfigForm; begin Tplt.ResolvePlaceholderText( 'CSDBReleaseURL', - TWebInfo.CSDBReleaseURL + TURL.CSDBReleaseURL ); end ); diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 410d4d28c..79364d031 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -574,8 +574,8 @@ implementation UCopySourceMgr, UDatabaseLoader, UDatabaseLoaderUI, UDetailTabAction, UEditSnippetAction, UExceptions, UHelpMgr, UHistoryMenus, UKeysHelper, UMessageBox, UNotifier, UNulDropTarget, UPrintMgr, UQuery, USaveSnippetMgr, - USaveUnitMgr, USelectionIOMgr, UShowPrefsPageAction, UUserDBMgr, UView, - UViewItemAction, UWBExternal, Web.UInfo; + USaveUnitMgr, USelectionIOMgr, UShowPrefsPageAction, UUrl, UUserDBMgr, UView, + UViewItemAction, UWBExternal; {$R *.dfm} @@ -1337,9 +1337,9 @@ procedure TMainForm.InitForm; // Initialise actions // Browse actions have to have URLs set dynamically - actGitHubHome.URL := TWebInfo.GitHubURL; - actFAQs.URL := TWebInfo.FAQsURL; - actBlog.URL := TWebInfo.BlogURL; + actGitHubHome.URL := TURL.GitHubURL; + actFAQs.URL := TURL.FAQsURL; + actBlog.URL := TURL.BlogURL; // Tree control actions need shortcuts adding dynamically, and state stored // in Tag property actExpandNode.ShortCut := ShortCut(VK_ADD, [ssCtrl]); diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index 735c64961..c83654ad4 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -260,8 +260,8 @@ implementation UHTMLTemplate, UMessageBox, UStrUtils, - UWaitForThreadUI, - Web.UInfo; + UUrl, + UWaitForThreadUI; {$R *.dfm} @@ -482,7 +482,7 @@ procedure TSWAGImportDlg.ConfigForm; begin Tplt.ResolvePlaceholderText( 'SWAGReleaseURL', - TWebInfo.SWAGReleaseURL + TURL.SWAGReleaseURL ); end ); diff --git a/Src/UPaypalDonateAction.pas b/Src/UPaypalDonateAction.pas index bac2c49bb..a9f4bed33 100644 --- a/Src/UPaypalDonateAction.pas +++ b/Src/UPaypalDonateAction.pas @@ -44,7 +44,7 @@ implementation // Delphi SysUtils, ExtActns, // Project - Web.UInfo; + UUrl; { TPaypalDonateAction } @@ -61,7 +61,7 @@ function TPaypalDonateAction.Execute: Boolean; // use a TBrowseAction to access URL BrowseAction := TBrowseURL.Create(nil); try - BrowseAction.URL := TWebInfo.DonateURL; + BrowseAction.URL := TURL.DonateURL; BrowseAction.Execute; finally FreeAndNil(BrowseAction); diff --git a/Src/USaveUnitMgr.pas b/Src/USaveUnitMgr.pas index cb0505e88..329a0611d 100644 --- a/Src/USaveUnitMgr.pas +++ b/Src/USaveUnitMgr.pas @@ -96,7 +96,7 @@ implementation // Delphi SysUtils, // Project - UAppInfo, UUtils, Web.UInfo; + UAppInfo, UUrl, UUtils; // TODO -cDatabase: get license info from database rather than use literal text. @@ -150,7 +150,7 @@ function TSaveUnitMgr.CreateHeaderComments: IStringList; // Result used for units that contain at snippet(s) from main database Result.Add(Format(sLicense, [FormatDateTime('YYYY', Now)])); Result.Add(''); - Result.Add(Format(sMainDescription, [TWebInfo.DatabaseURL])); + Result.Add(Format(sMainDescription, [TURL.DatabaseURL])); Result.Add(''); Result.Add(Format(sGenerated, [RFC1123DateStamp])); Result.Add( @@ -160,7 +160,7 @@ function TSaveUnitMgr.CreateHeaderComments: IStringList; ); Result.Add(''); Result.Add( - Format(sAdvert, [TAppInfo.ProgramName, TWebInfo.GitHubURL]) + Format(sAdvert, [TAppInfo.ProgramName, TURL.GitHubURL]) ); end else diff --git a/Src/USnippetDoc.pas b/Src/USnippetDoc.pas index dbf796fb2..c2fbb7a16 100644 --- a/Src/USnippetDoc.pas +++ b/Src/USnippetDoc.pas @@ -111,7 +111,7 @@ implementation // Delphi SysUtils, // Project - Compilers.UCompilers, DB.UMain, DB.USnippetKind, UStrUtils, Web.UInfo; + Compilers.UCompilers, DB.UMain, DB.USnippetKind, UStrUtils, UUrl; { TSnippetDoc } @@ -180,7 +180,7 @@ function TSnippetDoc.Generate(const Snippet: TSnippet): TEncodedData; RenderExtra(Snippet.Extra); if not Snippet.UserDefined then // database info written only if snippet is from main database - RenderDBInfo(Format(sMainDatabaseInfo, [TWebInfo.DatabaseURL])); + RenderDBInfo(Format(sMainDatabaseInfo, [TURL.DatabaseURL])); Result := FinaliseDoc; end; diff --git a/Src/Web.UInfo.pas b/Src/UUrl.pas similarity index 92% rename from Src/Web.UInfo.pas rename to Src/UUrl.pas index a9b262d46..6a592d69b 100644 --- a/Src/Web.UInfo.pas +++ b/Src/UUrl.pas @@ -10,21 +10,16 @@ } -unit Web.UInfo; +unit UUrl; interface -uses - // Project - UBaseObjects; - - type - /// Static class that provides information about URLs and any proxy - /// server used by CodeSnip. - TWebInfo = class(TNoConstructObject) + /// Advanced record that provides various URLs used by the program. + /// + TURL = record strict private const /// Name of server that hosts tested and released web services From 60688e4ce8f74ace5cf9fc6bdfb061b957e852fe Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 23:23:07 +0000 Subject: [PATCH 136/714] Added TODO --- Src/USnippetDoc.pas | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/USnippetDoc.pas b/Src/USnippetDoc.pas index c2fbb7a16..6efe45a68 100644 --- a/Src/USnippetDoc.pas +++ b/Src/USnippetDoc.pas @@ -155,6 +155,7 @@ function TSnippetDoc.Generate(const Snippet: TSnippet): TEncodedData; sDependListTitle = 'Required snippets:'; sXRefListTitle = 'See also:'; sCompilers = 'Supported compilers:'; + // TODO -cWeb: Change following to get license info from DB meta data sMainDatabaseInfo = 'A snippet from the DelphiDabbler CodeSnip Database ' + '(%s), licensed under the MIT License ' + '(http://opensource.org/licenses/MIT).'; From 07e8f991263b33f285ea432389ae776911e392b9 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 23:52:22 +0000 Subject: [PATCH 137/714] Renamed & re-arranged TURL constants Updated all affected code. --- Src/FmBugReportBaseDlg.pas | 2 +- Src/FmDBUpdateDlg.pas | 2 +- Src/FmMain.pas | 6 ++--- Src/FmSWAGImportDlg.pas | 2 +- Src/UPaypalDonateAction.pas | 2 +- Src/USaveUnitMgr.pas | 4 +-- Src/USnippetDoc.pas | 2 +- Src/UUrl.pas | 54 ++++++++++++++++++++----------------- 8 files changed, 39 insertions(+), 35 deletions(-) diff --git a/Src/FmBugReportBaseDlg.pas b/Src/FmBugReportBaseDlg.pas index 963703fb9..6cbc80721 100644 --- a/Src/FmBugReportBaseDlg.pas +++ b/Src/FmBugReportBaseDlg.pas @@ -100,7 +100,7 @@ procedure TBugReportBaseDlg.GoToTracker; // must be able to override this method. with TBrowseURL.Create(nil) do try - URL := TURL.BugTrackerURL; + URL := TURL.CodeSnipBugTracker; Execute; finally Free; diff --git a/Src/FmDBUpdateDlg.pas b/Src/FmDBUpdateDlg.pas index 7eef58327..b22a87f3e 100644 --- a/Src/FmDBUpdateDlg.pas +++ b/Src/FmDBUpdateDlg.pas @@ -272,7 +272,7 @@ procedure TDBUpdateDlg.ConfigForm; begin Tplt.ResolvePlaceholderText( 'CSDBReleaseURL', - TURL.CSDBReleaseURL + TURL.CodeSnippetsDBReleases ); end ); diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 79364d031..ad6e161c0 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -1337,9 +1337,9 @@ procedure TMainForm.InitForm; // Initialise actions // Browse actions have to have URLs set dynamically - actGitHubHome.URL := TURL.GitHubURL; - actFAQs.URL := TURL.FAQsURL; - actBlog.URL := TURL.BlogURL; + actGitHubHome.URL := TURL.CodeSnip; + actFAQs.URL := TURL.CodeSnipFAQReadMe; + actBlog.URL := TURL.CodeSnipBlog; // Tree control actions need shortcuts adding dynamically, and state stored // in Tag property actExpandNode.ShortCut := ShortCut(VK_ADD, [ssCtrl]); diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index c83654ad4..3c702ba64 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -482,7 +482,7 @@ procedure TSWAGImportDlg.ConfigForm; begin Tplt.ResolvePlaceholderText( 'SWAGReleaseURL', - TURL.SWAGReleaseURL + TURL.SWAGReleases ); end ); diff --git a/Src/UPaypalDonateAction.pas b/Src/UPaypalDonateAction.pas index a9f4bed33..53ffd8438 100644 --- a/Src/UPaypalDonateAction.pas +++ b/Src/UPaypalDonateAction.pas @@ -61,7 +61,7 @@ function TPaypalDonateAction.Execute: Boolean; // use a TBrowseAction to access URL BrowseAction := TBrowseURL.Create(nil); try - BrowseAction.URL := TURL.DonateURL; + BrowseAction.URL := TURL.PaypalDonate; BrowseAction.Execute; finally FreeAndNil(BrowseAction); diff --git a/Src/USaveUnitMgr.pas b/Src/USaveUnitMgr.pas index 329a0611d..3e4f9e7d9 100644 --- a/Src/USaveUnitMgr.pas +++ b/Src/USaveUnitMgr.pas @@ -150,7 +150,7 @@ function TSaveUnitMgr.CreateHeaderComments: IStringList; // Result used for units that contain at snippet(s) from main database Result.Add(Format(sLicense, [FormatDateTime('YYYY', Now)])); Result.Add(''); - Result.Add(Format(sMainDescription, [TURL.DatabaseURL])); + Result.Add(Format(sMainDescription, [TURL.CodeSnip])); Result.Add(''); Result.Add(Format(sGenerated, [RFC1123DateStamp])); Result.Add( @@ -160,7 +160,7 @@ function TSaveUnitMgr.CreateHeaderComments: IStringList; ); Result.Add(''); Result.Add( - Format(sAdvert, [TAppInfo.ProgramName, TURL.GitHubURL]) + Format(sAdvert, [TAppInfo.ProgramName, TURL.CodeSnip]) ); end else diff --git a/Src/USnippetDoc.pas b/Src/USnippetDoc.pas index 6efe45a68..2a7cbde20 100644 --- a/Src/USnippetDoc.pas +++ b/Src/USnippetDoc.pas @@ -181,7 +181,7 @@ function TSnippetDoc.Generate(const Snippet: TSnippet): TEncodedData; RenderExtra(Snippet.Extra); if not Snippet.UserDefined then // database info written only if snippet is from main database - RenderDBInfo(Format(sMainDatabaseInfo, [TURL.DatabaseURL])); + RenderDBInfo(Format(sMainDatabaseInfo, [TURL.CodeSnip])); Result := FinaliseDoc; end; diff --git a/Src/UUrl.pas b/Src/UUrl.pas index 6a592d69b..e2fb25288 100644 --- a/Src/UUrl.pas +++ b/Src/UUrl.pas @@ -22,42 +22,46 @@ interface TURL = record strict private const - /// Name of server that hosts tested and released web services - /// that are used by CodeSnip. - /// There is also a test server that can be used by CodeSnip - /// where new and updated web services are tested - see - /// TestServerHost below. - ProductionServerHost = 'delphidabbler.com'; - /// URL of DelphiDabbler website. - WebsiteURL = 'http://' + ProductionServerHost; + /// URL of DelphiDabbler's account on GitHub repository. + /// + DDabGitHub = 'https://github.com/delphidabbler'; + /// URL of the Code Snippet database's GitHub repository. + /// + CodeSnippetsDB = DDabGitHub + '/code-snippets'; + /// URL of the SWAG database's GitHub repository. + SWAG = DDabGitHub + '/swag'; + /// URL of the CodeSnip FAQ's GitHub repository. + CodeSnipFAQ = DDabGitHub + '/codesnip-faq'; public const - /// URL of CodeSnip's GitHub page. - GitHubURL = 'https://github.com/delphidabbler/codesnip'; + /// URL of CodeSnip's GitHub repository. + CodeSnip = DDabGitHub + '/codesnip'; + + /// URL used to view and report CodeSnip bugs on GitHub. + /// + CodeSnipBugTracker = CodeSnip + '/issues'; + + /// URL of CodeSnip's FAQ web page. + /// This is the CodeSnip FAQ project on GitHub. + CodeSnipFAQReadMe = CodeSnipFAQ + '/blob/master/README.md'; + /// URL of the GitHub page where DelphiDabbler Code Snippets /// database releases are hosted. - CSDBReleaseURL = 'https://github.com/' - + 'delphidabbler/code-snippets/releases'; + CodeSnippetsDBReleases = CodeSnippetsDB + '/releases'; + /// URL of the GitHub page where SWAG database releases are /// hosted. - SWAGReleaseURL = 'https://github.com/delphidabbler/swag/releases'; - /// URL of the online Code Snippets database. - DatabaseURL = WebsiteURL + '/url/csdb'; + SWAGReleases = SWAG + '/releases'; + /// URL used to make donations towards the CodeSnip project. /// - /// This URL redirects to the correct page on PayPal. - DonateURL = 'https://www.paypal.com/donate/?' + PaypalDonate = 'https://www.paypal.com/donate/?' + 'token=LYnh7_DXV-YqTmX3Bilr9rCPN89oANmBTZmRCdNHu_qFSk2jo_' + 'WzTYTXCE165U9hXEmwq0&country.x=GB&locale.x=GB'; - /// URL used to view and report CodeSnip bugs on GitHub. - /// - BugTrackerURL = GitHubURL + '/issues'; - /// URL of CodeSnip's FAQ web page. - /// This is the CodeSnip FAQ project on GitHub. - FAQsURL = 'https://github.com/delphidabbler/codesnip-faq/' - + 'blob/master/README.md'; + /// URL of the the CodeSnip blog. - BlogURL = 'http://codesnip-app.blogspot.com/'; + CodeSnipBlog = 'http://codesnip-app.blogspot.com/'; + end; From 1b2868e6b88eca8716f8995751a8906639a42009 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 25 Feb 2020 23:52:44 +0000 Subject: [PATCH 138/714] Added new TODO --- Src/USaveUnitMgr.pas | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/USaveUnitMgr.pas b/Src/USaveUnitMgr.pas index 3e4f9e7d9..a6f68f578 100644 --- a/Src/USaveUnitMgr.pas +++ b/Src/USaveUnitMgr.pas @@ -113,6 +113,7 @@ implementation // Error message sErrorMsg = 'Filename is not valid for a Pascal unit'; // Unit header comments + // TODO -cWeb: Change following to get license from database meta data sLicense = 'This unit is copyright � %0:s by the Peter Johnson and Code ' + 'Snippets Database contributors and is licensed under the MIT license ' + '(http://opensource.org/licenses/MIT).'; From d7f5f43216014f4ab166707033b6db569c4b8543 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 26 Feb 2020 00:16:17 +0000 Subject: [PATCH 139/714] Revert "Updated CSS applied to body tag in HTML frames." This reverts commit 5e83ae9be31876f2466b7ea6a36ebf07be12fe9b. --- Src/FrHTMLDlg.pas | 1 - 1 file changed, 1 deletion(-) diff --git a/Src/FrHTMLDlg.pas b/Src/FrHTMLDlg.pas index 6d9cce905..fc1e17039 100644 --- a/Src/FrHTMLDlg.pas +++ b/Src/FrHTMLDlg.pas @@ -85,7 +85,6 @@ procedure THTMLDlgFrame.BuildCSS(const CSSBuilder: TCSSBuilder); AddProperty(TCSS.BackgroundColorProp(fOwner.Color)); AddProperty(TCSS.FontProps(fOwner.Font)); AddProperty(TCSS.MarginProp(0)); - AddProperty(TCSS.LineHeightProp(120)); end; // Sets heading margins, padding and font size with CSSBuilder.AddSelector('h1') do From 9d29f3e97431314594f8c88ff7e6a791252f1df7 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 26 Feb 2020 00:22:49 +0000 Subject: [PATCH 140/714] Removed unused dlg-codesubmit-*.html files from resources. Also deleted related TODO. --- Src/CodeSnip.todo | 2 +- Src/HTML.hrc | 6 --- Src/Res/HTML/dlg-codesubmit-finished.html | 42 ---------------- Src/Res/HTML/dlg-codesubmit-intro.html | 50 ------------------- Src/Res/HTML/dlg-codesubmit-license.html | 59 ----------------------- Src/Res/HTML/dlg-codesubmit-submit.html | 46 ------------------ 6 files changed, 1 insertion(+), 204 deletions(-) delete mode 100644 Src/Res/HTML/dlg-codesubmit-finished.html delete mode 100644 Src/Res/HTML/dlg-codesubmit-intro.html delete mode 100644 Src/Res/HTML/dlg-codesubmit-license.html delete mode 100644 Src/Res/HTML/dlg-codesubmit-submit.html diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index 74c2693bc..1bfae1ac9 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,6 +1,6 @@ {TODO -cWeb : Remove donate box & related notes - problem doing direct link to paypalwith giving away email address} {TODO -cDocs : Remove remaining $Rev$ and $Date$ SVN placeholders} -{TODO -cRefactor : Remove dlg-codesubmit-intro.html and dlg-codesubmit-finished.html from resources} + {TODO -cDocs : Update License.html to replace references to SVN with Git} {TODO -cDocs : Update Build.html to replace references to SVN with Git} {TODO -cFirstRun : Delete UpdateChecks section from Config file on first run} diff --git a/Src/HTML.hrc b/Src/HTML.hrc index 9f5cf7ff1..6146b2e1c 100644 --- a/Src/HTML.hrc +++ b/Src/HTML.hrc @@ -41,12 +41,6 @@ Res\HTML\dlg-rssnews.html Res\HTML\dlg-swag-import-intro-tplt.html Res\HTML\dlg-swag-import-outro-tplt.html -# code submission wizard -Res\HTML\dlg-codesubmit-intro.html -Res\HTML\dlg-codesubmit-license.html -Res\HTML\dlg-codesubmit-submit.html -Res\HTML\dlg-codesubmit-finished.html - # get delphidabbler snippets database wizard Res\HTML\dlg-dbupdate-intro-tplt.html Res\HTML\dlg-dbupdate-load.html diff --git a/Src/Res/HTML/dlg-codesubmit-finished.html b/Src/Res/HTML/dlg-codesubmit-finished.html deleted file mode 100644 index bb6898eda..000000000 --- a/Src/Res/HTML/dlg-codesubmit-finished.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - dlg-codesubmit-finished.html - - - - -

    - Thank you. Your submission has been sent successfully. -

    - -

    - The code will be reviewed and, if it is in a suitable format and it works - as advertised, it will be included in the online Code Snippets database in - due course. -

    - -

    - You may be contacted on the email address you provided if there are any - queries. -

    - - - - diff --git a/Src/Res/HTML/dlg-codesubmit-intro.html b/Src/Res/HTML/dlg-codesubmit-intro.html deleted file mode 100644 index 7bc1a88e7..000000000 --- a/Src/Res/HTML/dlg-codesubmit-intro.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - dlg-codesubmit-intro.html - - - - -

    - Thanks for deciding to submit code for inclusion in the Code Snippets - database. -

    - -

    - This wizard collects some information from you then contacts the - DelphiDabbler.com website to submit the code. -

    - -

    - Note: you must have the right to donate this code and - you must be prepared to release the code under the terms of the MIT license. -

    - -

    - Click the Next button below to begin. -

    - - - - diff --git a/Src/Res/HTML/dlg-codesubmit-license.html b/Src/Res/HTML/dlg-codesubmit-license.html deleted file mode 100644 index ada1e428a..000000000 --- a/Src/Res/HTML/dlg-codesubmit-license.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - dlg-codesubmit-license.html - - - - - -

    - Before proceeding please confirm your agreement to the following - statements by ticking the check box below. If you can't agree with the - statements please cancel your submission. -

    - -
      -
    1. - I have the right to donate this code for publication in the Code - Snippets Database. More information -
    2. -
    3. - I agree that the code should be released under the terms of the MIT license. -
    4. -
    - - - - diff --git a/Src/Res/HTML/dlg-codesubmit-submit.html b/Src/Res/HTML/dlg-codesubmit-submit.html deleted file mode 100644 index 8368ac8d1..000000000 --- a/Src/Res/HTML/dlg-codesubmit-submit.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - dlg-codesubmit-submit.html - - - - -

    - Ready to submit the code. -

    - -

    - The data that will be sent contains the selected snippet(s), along with - other data you provided. -

    - -

    - If you want to see the data before sending it, click the Preview Data - button. -

    - -

    - To proceed please ensure you are connected to the internet then click the - Submit button. -

    - - - - From aa2139efacff07d022d8aaaad7deffb2a8a97e90 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 26 Feb 2020 00:44:22 +0000 Subject: [PATCH 141/714] Added TODO --- Src/CodeSnip.todo | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index 1bfae1ac9..8213d7535 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,3 +1,4 @@ +{TODO -cUI : Remove unused tool bar button in main window} {TODO -cWeb : Remove donate box & related notes - problem doing direct link to paypalwith giving away email address} {TODO -cDocs : Remove remaining $Rev$ and $Date$ SVN placeholders} From 3129daebb6cc0da2ea2dc42356cf0d28d27eecd8 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 26 Feb 2020 00:45:00 +0000 Subject: [PATCH 142/714] Removed unused frm-emailprivacy.html HTML resource. --- Src/HTML.hrc | 3 --- Src/Res/HTML/frm-emailprivacy.html | 36 ------------------------------ 2 files changed, 39 deletions(-) delete mode 100644 Src/Res/HTML/frm-emailprivacy.html diff --git a/Src/HTML.hrc b/Src/HTML.hrc index 6146b2e1c..8b86e545d 100644 --- a/Src/HTML.hrc +++ b/Src/HTML.hrc @@ -28,9 +28,6 @@ Res\HTML\dlg-comperror-tplt.html # donate dialogue Res\HTML\dlg-donate.html -# email privacy information for display in frames -Res\HTML\frm-emailprivacy.html - # active text preview dialogueue Res\HTML\dlg-activetext-preview-tplt.html diff --git a/Src/Res/HTML/frm-emailprivacy.html b/Src/Res/HTML/frm-emailprivacy.html deleted file mode 100644 index db7d98fa8..000000000 --- a/Src/Res/HTML/frm-emailprivacy.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - frm-emailprivacy.html - - - - -
    - Your email address will not be abused. See the - privacy statement for details. -
    - - - - From 3d14c48ff7980abfecf62a72993ceacc37a7961d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 26 Feb 2020 01:00:54 +0000 Subject: [PATCH 143/714] Fixed typo --- Src/Res/HTML/dlg-about-database-tplt.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Res/HTML/dlg-about-database-tplt.html b/Src/Res/HTML/dlg-about-database-tplt.html index e0fa3b839..e2585e2d4 100644 --- a/Src/Res/HTML/dlg-about-database-tplt.html +++ b/Src/Res/HTML/dlg-about-database-tplt.html @@ -46,7 +46,7 @@ Code Snippets Database is aresource containing numerous fragments of useful Object Pascal code. + >Code Snippets Database is a resource containing numerous fragments of useful Object Pascal code.

    From 5b32c75b71d9ea4251af742e3403ee12d92f76ac Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 26 Feb 2020 01:02:14 +0000 Subject: [PATCH 144/714] Removed broken links & some restyling --- Src/Res/HTML/dlg-about-program-tplt.html | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/Src/Res/HTML/dlg-about-program-tplt.html b/Src/Res/HTML/dlg-about-program-tplt.html index 02368af13..b661464ec 100644 --- a/Src/Res/HTML/dlg-about-program-tplt.html +++ b/Src/Res/HTML/dlg-about-program-tplt.html @@ -21,7 +21,7 @@ - - - - - -
    -
    - DelphiDabbler CodeSnip -
    -
    - File Format Documentation -
    -
    - -

    - Main Database Update Data Stream -

    - -

    - Introduction -

    - -

    - The Database Update Data Stream is a stream of data received from the CodeSnip - Database Update web service that is used to update the local copy of the main - database. -

    - -

    - The stream is plain text and consists of a concatenation of text files from - the online database along with some housekeeping information. The text files - are recreated in the main database directory. -

    - -

    - Encoding -

    - -

    - The data stream is received from the web server as single- or multi-byte ANSI - encoded text. The encoding must be such that characters from the ASCII - character set occupy one byte each. Therefore encodings that use two bytes for - such characters, such as UTF-16, cannot be used. -

    - -

    - The actual encoding used is determined by the web server should be specified - in HTTP header. If the HTTP headers do not specify the encoding then - ISO-8859-1 is assumed. -

    - -

    - The encoding used for the files recreated in the main database directory is - UTF-8 with byte order mark. -

    - -

    - Data is converted between several formats on its journey from the web server - to the final database file. See the appendix for - details. -

    - -

    - Stream Format -

    - -

    - The stream contains structured plain text comprising both numeric and string - information. Variable length strings are preceded by numeric values that - indicate the length of the following string in bytes. Numeric values are - encoded as hexadecimal characters. The format is as follows: -

    - -
    -
    - FileCount -
    -
    - Number of files encoded in the data stream. 16 bit integer encoded as four - hex digits. Maximum number of files is 32,767. -
    -
    - -

    - Followed by FileCount file records of: -

    - -
    -
    - Name -
    -
    - Name of file without path information. AnsiString preceded by its size in - bytes as a 16 bit integer encoded as four hex digits. -
    -
    - UnixDate -
    -
    - File's modification date (GMT) in Unix format. Int64 encoded as 16 hex - digits. -
    -
    - Content -
    -
    -
    - File contents. -
    -
    - For web service version 5 this is an AnsiString preceded by its - size in bytes as a 16 bit integer encoded as four hex digits. File size is - limited to 32kB. -
    -
    - For web service version 6 this is an AnsiString preceded by its - size in bytes as a 32 bit integer encoded as eight hex digits. File size - limit is raised to 2 Gb. -
    -
    -
    - -

    - Appendix: Description of Data Encoding Conversions -

    - -

    - The following flowchart show the various encodings used for downloaded data on - its journey from web server to main database file. -

    - -
    - -
    - Text sent from web server using a single or multi-byte ANSI encoding.
    - Encoding used sent in HTTP header. -
    - -
    - ↓ -
    - -
    - ANSI text stream -
    - -
    - ↓ -
    - -
    - CodeSnip's HTTP handling code automatically converts ANSI text stream into - Unicode string using encoding specified in HTTP header. -
    - -
    - ↓ -
    - -
    - Unicode string -
    - -
    - ↓ -
    - -
    - Database download manager code converts Unicode string back into ANSI text - stream with same encoding in which it was sent from web server. -
    - -
    - ↓ -
    - -
    - ANSI text stream -
    - -
    - ↓ -
    - -
    - File updater interprets information stored in formatted ANSI text stream and - get contents of each file, converting them to Unicode. -
    - -
    - ↓ -
    - -
    - Unicode string -
    - -
    - ↓ -
    - -
    - File writer finally writes each file as UTF-8 with a BOM. -
    - -
    - ↓ -
    - -
    - UTF-8 stream -
    - -
    - ↓ -
    - -
    - UTF-8 text files. -
    - -
    - - - - From 12764d00d43c54f1aff702844b55372fa7a5d9de Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 26 Mar 2020 02:48:05 +0000 Subject: [PATCH 198/714] Minor corrections and tweaked --- Docs/Design/FileFormats/saved.html | 2 +- Docs/Design/FileFormats/test-unit.html | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Docs/Design/FileFormats/saved.html b/Docs/Design/FileFormats/saved.html index aac8c9156..ffe9ba419 100644 --- a/Docs/Design/FileFormats/saved.html +++ b/Docs/Design/FileFormats/saved.html @@ -78,7 +78,7 @@

    - There is no specific file format for these files, other than XHTML and RTF + There is no specific file format for these files, except that XHTML and RTF files conform to published specifications.

    diff --git a/Docs/Design/FileFormats/test-unit.html b/Docs/Design/FileFormats/test-unit.html index 0620d0c85..0a9e4a09b 100644 --- a/Docs/Design/FileFormats/test-unit.html +++ b/Docs/Design/FileFormats/test-unit.html @@ -46,7 +46,7 @@

    - CodeSnip saves temporary test units that are valid Pascal unit. These units + CodeSnip saves temporary test units that are valid Pascal units. These units are used to perform test compiles.

    @@ -65,8 +65,7 @@

    If the unit's source code contains only characters that are supported by the - system default ANSI code page the file is saved using the default ANSI - encoding. + system default ANSI code page then the file is saved using that encoding.

    @@ -83,7 +82,7 @@

    - Unit filenames are limited to ANSI characters again for reasons of + Unit filenames are limited to ANSI characters also for reasons of compatibility with earlier Delphis because they will report Unicode file names as "not found".

    From 21de63b1788fd42d5ccaa1c3667d76914a674efd Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 26 Mar 2020 03:12:27 +0000 Subject: [PATCH 199/714] Update re export file v7, fix errors and make clarifications --- Docs/Design/FileFormats/export.html | 80 +++++++++++++++++++++++------ 1 file changed, 63 insertions(+), 17 deletions(-) diff --git a/Docs/Design/FileFormats/export.html b/Docs/Design/FileFormats/export.html index 6e1596b43..08e0d5778 100644 --- a/Docs/Design/FileFormats/export.html +++ b/Docs/Design/FileFormats/export.html @@ -60,9 +60,11 @@

    - XML export files use UTF-8 encoding without a byte order mark. (In earlier - versions XML generated for submission to the online database is also encoded - in UTF-8. Code submission is no longer supported.) + XML export files use UTF-8 encoding without a byte order mark. +

    + +

    + In earlier versions of CodeSnip, XML files generated for submission to the online database were also encoded in UTF-8. Support for code submission was removed from CodeSnip v4.16.0.

    @@ -76,8 +78,8 @@

    - There have been six different versions of the XML file format – v1 to - v6. Tags from all six versions are explained below with notes describing + There have been seven different versions of the XML export file format – v1 to + v7. Tags used by all versions are explained below, with notes describing which versions a tag applies to. Where there is no note the tag is valid in all versions.

    @@ -138,7 +140,7 @@

    Identifies version of file. Determines which tags are valid and - establishes rules concerning content. Valid versions are 1..6. + establishes rules concerning content. Valid versions are 1..7.
    @@ -155,30 +157,56 @@

    codesnip-export/user-info
    - Contains information about user who created the file (omitted for normal - exports – (In earlier versions this was included with submissions to - the online database. Submission to the database is no longer supported.) +
      +
    • + versions 1..6: Contains information about user who created the file   used for submissions to the online database, omitted for other exports. +
    • +
    • + version 7: Not supported. Ignored if present. +
    • +
    codesnip-export/user-info/name
    - User's name or nickname. +
      +
    • + versions 1..6: User's name or nickname. +
    • +
    • + version 7: Not supported. Ignored if present. +
    • +
    codesnip-export/user-info/email
    - User's email address. +
      +
    • + versions 1..6: User's email address. +
    • +
    • + version 7: Not supported. Ignored if present. +
    • +
    codesnip-export/user-info/comments
    - Any comments provided by user. +
      +
    • + versions 1..6: Any comments provided by user. +
    • +
    • + version 7: Not supported. Ignored if present. +
    • +
    @@ -232,8 +260,8 @@

    of plain text.
  • - version 6: Content is formatted text - encoded in REML markup. REML v3 is supported. + version 6 and later: Content is formatted text + encoded in REML markup. REML v4 is supported.
  • @@ -255,7 +283,7 @@

  • - version 6: + version 6 and later:
    @@ -288,7 +316,7 @@

    versions 1..5: Not supported.

  • - version 6: Display name of snippet. Can + version 6 and later: Display name of snippet. Can contain any characters and need not be unique. Present only if snippet has a display name that is different to the value of the name attribute of the codesnip-data/routines/routine tag. @@ -376,6 +404,10 @@

    versions 4 and 5: indicates REML v3.

  • +
  • + versions 6 and later: indicates REML + v4. +
  • @@ -718,6 +750,9 @@

    A snippet's description is now stored as formatted text using REML markup. Previously the description was plain text.

    +
    + The supported version of REML was updated to v4. +
    The following tags were introduced:
    @@ -730,6 +765,12 @@

    +
    + Version 7 +
    +
    + The codesnip-export/user-info tag and sub-tags were no longer supported. +

    @@ -755,7 +796,8 @@

    Readers of v1 to v5 files must:

    -
      + +
      • Convert the plain text snippet description read from codesnip-data/routines/routine/description into the formatted text @@ -767,6 +809,10 @@

      +

      + Readers of v1 to v6 files must ignore the codesnip-export/user-info tag and sub-tags, where present. +

      + From 0320b6a44e4951422403240a745ddf47f7fb95d2 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 26 Mar 2020 03:12:56 +0000 Subject: [PATCH 200/714] Fix errors a make clarifications --- Docs/Design/FileFormats/user-db.html | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Docs/Design/FileFormats/user-db.html b/Docs/Design/FileFormats/user-db.html index 6b3fd97d3..ed654c5a9 100644 --- a/Docs/Design/FileFormats/user-db.html +++ b/Docs/Design/FileFormats/user-db.html @@ -58,9 +58,7 @@

      - The source code for each snippet is stored in separate sequentially numbered - .dat data files – one per snippet. Each source code file is referenced - by the XML file. + The source code for each snippet is stored in separate, sequentially numbered, .dat data files – one per snippet. Each source code file is referenced by the XML file.

      @@ -86,7 +84,7 @@

      - CodeSnip v4 must be able to work with all these encoding because it may + CodeSnip v4 must be able to work with all these encodings because it may inherit a copy of a user database in an earlier format.

      @@ -283,7 +281,7 @@

    1. version 6: Content is formatted text - encoded in REML markup. REML v3 is supported. + encoded in REML markup. REML v4 is supported.
    2. @@ -423,7 +421,10 @@

      version 3: indicates REML v2
    3. - versions 4..6: indicates REML v3. + versions 4..5: indicates REML v3. +
    4. +
    5. + version 6: indicates REML v4.
    6. @@ -673,8 +674,8 @@

      Source code is stored separately from the main XML file. The source code of - each snippet has its file. Files are numbered sequentially and have a .dat - extension, for example 6.dat. + each snippet has its own file. Files are numbered sequentially and have a + .dat extension, for example 6.dat.

      @@ -789,7 +790,10 @@

      Previously the description was plain text.

    - The following tag was introduced: + The supported version of REML was updated to v4. +
    +
    + The following tags were introduced:
    • @@ -810,7 +814,7 @@

      Readers of version 1 files must convert the contents of the codesnip-data/routines/routine/comments, codesnip-data/routines/routine/credits and - codesnip-data/routines/routine/credits-url tags into formatted text + codesnip-data/routines/routine/credits-url tags into valid REML code that simulates the parsed content of the codesnip-data/routines/routine/extra tag.

      @@ -828,7 +832,7 @@

      1. Convert the plain text snippet description read from - codesnip-data/routines/routine/description into the formatted text + codesnip-data/routines/routine/description into the REML equivalent of a single paragraph containing the description.
      2. From 0123877e8631dbdccc6bbdf0d1ac13d3e88f1801 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 27 Mar 2020 04:31:39 +0000 Subject: [PATCH 201/714] Add CSS styles --- Docs/Design/FileFormats/main.css | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Docs/Design/FileFormats/main.css b/Docs/Design/FileFormats/main.css index a105d5932..396a08f6a 100644 --- a/Docs/Design/FileFormats/main.css +++ b/Docs/Design/FileFormats/main.css @@ -114,6 +114,17 @@ code { font-family: "Courier New", Courier, monospace; } +code.key { + font-weight: bold; + font-style: none; +} + +code.value { + padding: 1px 2px; + background-color: #f5f5f5; + font-style: normal; +} + del { text-decoration: line-through; color: gray; @@ -167,3 +178,8 @@ acronym { text-decoration: line-through; color: gray; } + +.very-strong{ + font-variant: small-caps; + font-weight: bold; +} From 0627b14c344a58cf697afc444e7ea08f16a14687 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 27 Mar 2020 04:32:53 +0000 Subject: [PATCH 202/714] Rewrite to document Code Snippets Database v2 in addition to v1 --- Docs/Design/FileFormats/main-db.html | 882 +++++++++++++++++---------- 1 file changed, 549 insertions(+), 333 deletions(-) diff --git a/Docs/Design/FileFormats/main-db.html b/Docs/Design/FileFormats/main-db.html index 8f7e1108f..57bd53643 100644 --- a/Docs/Design/FileFormats/main-db.html +++ b/Docs/Design/FileFormats/main-db.html @@ -45,45 +45,48 @@

        Introduction

        +

        + The are two versions of the Code Snippets Database: v1 and v2. Both versions are similar and both are described here. Where one version differs from another the differences will be noted. Where there is no such note there is no difference between the versions. +

        +

        - The Code Snippets database is stored in a set of .ini files with associated - data files located in the main database directory. Two subsidiary text files - containing credits are also included. + The database is organised as a set of categories, each of which contains one or more code snippets.

        - The master data file is named categories.ini. This lists the - database categories. There is another .ini file for each category which stores - information about all the snippets in the category. + Meta data describing the categories and snippets is stored in a set of .ini files. In addition there are numerous .dat files, each of which contains the source code of a snippet.

        - The source code for each snippet is stored in separate data files – one - or more per snippet. This snippet file is referenced in the relevant category - .ini file. + There are additional files containing further information.

        - The credits text files contain lists of names. + All the files are plain text, encoded in UTF-8 format with UTF-8 preamble (BOM).

        Encoding

        +

        + Version 1 +

        +

        - CodeSnip v4 stores all main database files, including the subsidiary text - files, using UTF-8 encoding. Files are saved with the UTF-8 preamble (BOM). + With CodeSnip v4 all the files are plain text, encoded in UTF-8 format with UTF-8 preamble (BOM). Prior to CodeSnip v4 local database files were encoded using the system default ANSI code page.

        - Prior to CodeSnip v4 local database files were encoded using the system - default ANSI code page. + CodeSnip v4 must be able to work with both encodings because it may need to use a database installed by CodeSnip v3 or earlier.

        +

        + Version 2 +

        +

        - CodeSnip v4 must be able to work with both encodings because it may inherit or - have to use a database downloaded by a v3 or earlier version of the program. + All the files are plain text, encoded in UTF-8 format with UTF-8 preamble (BOM).

        @@ -91,33 +94,71 @@

        - Master Data File + Meta Data Files

        - This file has a simple format. Each section is named after a category id, i.e. - the id by which the category is referred to in the database. Each section of - the .ini file has a value containing the description of the category and - another that names the category's .ini file. Here is the format of a - section: + There are two kinds of meta data files: +

        + +
          +
        1. + categories.ini lists the categories contained in the collection. +
        2. +
        3. + A set of further .ini files, one for each category specified in categories.ini. Each of these files contains numerous details of each snippet along with the name of the file containing the source code. +
        4. +
        + +

        + Format Of categories.ini +

        + +

        + Each section in this file defines a category and has the following format:

        -
        [cat-id]
        -Desc=Category description
        -Ini=ini-file-name
        +
        [<cat-id>]
        +Desc=<category-description>
        +Ini=<ini-file-name>
        + +

        + The sections in these files are named with a unique identifier that identifies a category within the collection. The section names must be alphanumeric characters. The values have the following purpose: +

        + +
        + +
        + Desc +
        +
        +

        + A brief, human readable, description of the category. Any valid UTF-8 text is permitted. +

        +
        + +
        + Ini +
        +
        +

        + The name of the .ini file that contains information about each snippet in the category. Must be a valid file name, without path. The files must be stored in the same directory as category.ini. +

        +
        + +

        - and here is an example (this is a copy of the "Date and Time" - category's entry): + Here is an example (this is a copy of the "Date and Time" category's entry):

        [date]
         Desc=Date and Time
         Ini=date.ini
        -

        - Category ini files -

        +

        + Format Of Individual Category .ini Files +

        Each section in these files defines a snippet and has the following content: @@ -163,505 +204,500 @@

        MinVer=<version-number>

        - The sections in these files are named with a unique name that identifies a - snippet. This must be a valid Unicode Pascal identifier. The values have the - following purpose: + The sections in these files are named with identifiers that uniquely identify a snippet. This must be a valid Unicode Pascal identifier. The keys in a section have the following purpose:

        -
        +
        +
        - DisplayName + DisplayName
        -
        - Display name of snippet. If present this value is used in the program GUI - as the snippet's name. The value is optional. If not present the name of - the section is used as the display name. There are no restriction on the - characters used. -
        -
        - Supported from CodeSnip v4.0 beta 1 and ignored by earlier versions which - always use the section name as display name. -
        +

        + Human readable name of snippet. The value is optional. If not present then the snippet identifier that names the section is used as the human readable name. +

        +
          +
        • + v1: There are no restriction on the characters used. +
        • +
        • + v2: May be any valid UTF-8 string of up to 64 characters. +
        • +
        +
        - Desc + Desc
        - Description of the snippet as plain text. Ignored by versions of CodeSnip - that recognise DescEx if that field is present. +

        + Description of the snippet as plain text. Ignored if a non-empty DescEx key is present. +

        +
        - DescEx + DescEx
        -
        - Formatted description of the snippet using REML code. May be empty, in which case the Desc field - is used. The Desc field is ignored if DescEx has a - value. -
        -
        - Supported from CodeSnip v4.0 beta 1. -
        +

        + Formatted description of the snippet using REML1 code. May be empty, in which case the Desc key is used. Desc is ignored if DescEx has a non-empty value. +

        +
        - Snip + Snip
        - Name of file containing source code. Contains no file path information. +

        + Name of the file containing this snippet's source code. The file name must: +

        +
          +
        • + be a valid file name; +
        • +
        • + contain no path information; +
        • +
        • + exist in the same directory as the .ini file; +
        • +
        • + be unique within the directory. +
        • +
        +
        - Units + Units
        - Comma separated list of units required by the snippet. May be empty if no - units are required. The System unit is assumed and does not need to be - specified. +

        + Comma separated list of units required to compile the snippet. May be omitted or empty if no units are required. The System unit is assumed and does not need to be specified. Unit names must be valid Pascal identifiers. +

        +
        - Depends + Depends
        - Comma separated list of snippets that are required to compile this snippet. - May be empty if there are no dependencies. Must not cause a circular - reference back to this snippet. +

        + Comma separated list of the identifiers of snippets that are required to compile this snippet. May be omitted or empty if there are no such dependencies. Snippet identifiers must exist within the collection and must not cause a circular reference back to this snippet. +

        +
        - SeeAlso + SeeAlso
        - Comma separated list of cross-referenced snippets. May be empty. +

        + Comma separated list of the identifiers of cross-referenced snippets. May be omitted or empty. Snippet identifiers should exist in the collection. +

        +
        - Credits + Credits2
        -
        - Text string that notes any credits / acknowledgements. May be empty. -
        -
        - Credits may optionally contain one (and only one) section of text - delimited by "[" and "]" characters that indicate the - presence of a hyperlink. The text enclosed by "[" and - "]" is used for the text of the hyperlink. If present the - Credits_URL field must contain the URL of the hyperlink. -
        -
        - Credits is ignored by versions of CodeSnip that recognise the - Extra field unless the Extra field is empty. -
        +

        + Text string that notes any credits / acknowledgements. May be omitted or empty. Credits may optionally contain one (and only one) section of text delimited by [ and ] characters that indicate the presence of a hyperlink. The enclosed text is used as the text of a hyperlink whose URL must be specified in the Credits_URL key. +

        +

        + Credits is ignored if a non-empty Extra key is present. +

        +
        - Credits_URL + Credits_URL2
        - The URL used in any hyperlink present in the Credits field. Should - be empty if Credits contains no hyperlink section. +

        + The URL used in any hyperlink present in the Credits key. Must be present if Credits specifies a hyperlink. +

        +

        + Ignored if Credits contains no hyperlink section or if a non-empty Extra key is present. +

        +

          +
        • + v1: Should be empty if Credits contains no hyperlink. +
        • +
        +
        - Comments + Comments
        -
        - Text string containing any additional comments about the snippet. May be - empty. -
        -
        - Ignored by versions of CodeSnip that recognise the Extra field - unless the Extra field is empty. -
        +

        + Text string containing any additional comments about the snippet. Optional. Ignored if a non-empty Extra key is present. +

        +
        - DelphiXXX & FPC + DelphiXXX & FPC
        -
        - This related group of values describe compilation results for the snippets - on various compilers. Valid value names are: -
        +

        + This related group of keys describe compilation results for the snippets on various compilers. Valid key names are: +

        • - Delphi2 – Delphi 2 compiler + Delphi2 – Delphi 2 compiler
        • - Delphi3 – Delphi 3 compiler + Delphi3 – Delphi 3 compiler
        • - Delphi4 – Delphi 4 compiler + Delphi4 – Delphi 4 compiler
        • - Delphi5 – Delphi 5 compiler + Delphi5 – Delphi 5 compiler
        • - Delphi6 – Delphi 6 compiler + Delphi6 – Delphi 6 compiler
        • - Delphi7 – Delphi 7 compiler + Delphi7 – Delphi 7 compiler
        • - Delphi2005Win32 – Win32 personality of Delphi 2005 - compiler + Delphi2005Win32 – Win32 personality of Delphi 2005 compiler
        • - Delphi2006Win32 – Win32 personality of Delphi 2006 - compiler + Delphi2006Win32 – Win32 personality of Delphi 2006 compiler
        • - Delphi2007 – Delphi 2007 compiler + Delphi2007 – Delphi 2007 compiler
        • - Delphi2009Win32 – Win32 personality of Delphi 2009 - compiler + Delphi2009Win32 – Win32 personality of Delphi 2009 compiler
        • - Delphi2010 – Delphi 2010 compiler + Delphi2010 – Delphi 2010 compiler
        • - DelphiXE – Delphi XE compiler + DelphiXE – Delphi XE compiler
        • - DelphiXE2 – Delphi XE2 compiler + DelphiXE2 – Delphi XE2 compiler
        • - DelphiXE3 – Delphi XE3 compiler + DelphiXE3 – Delphi XE3 compiler
        • - DelphiXE4 – Delphi XE4 compiler + DelphiXE4 – Delphi XE4 compiler
        • - DelphiXE5 – Delphi XE5 compiler + DelphiXE5 – Delphi XE5 compiler
        • - DelphiXE6 – Delphi XE6 compiler + DelphiXE6 – Delphi XE6 compiler
        • - DelphiXE7 – Delphi XE7 compiler + DelphiXE7 – Delphi XE7 compiler
        • - DelphiXE8 – Delphi XE8 compiler + DelphiXE8 – Delphi XE8 compiler
        • - Delphi10S – Delphi 10 Seattle compiler + Delphi10S – Delphi 10 Seattle compiler
        • - Delphi101B – Delphi 10.1 Berlin compiler + Delphi101B – Delphi 10.1 Berlin compiler
        • - FPC – Free Pascal compiler + FPC – Free Pascal compiler
        -
        - Valid values for these fields are: -
        +

        + Valid values for these keys are: +

        • - "Y" – compiles on the compiler + Y – compiles on the compiler
        • - "N" – does not compile on the compiler + N – does not compile on the compiler
        • - "W" – compiles with warnings on the compiler + W – compiles with warnings on the compiler
        • - "Q" – compilation result unknown + Q – compilation result unknown
        -
        - If not present, the compile result is assumed to be "Q" -
        -
        - From CodeSnip v3.8.9 a compile result of "W" is treated as if it - were "Y". -
        -
        +

        + If any of the above compilers is not present, the compile result is assumed to be Q. A compile result of W is obsolete and treated as if it were Y. +

        +

        Any compiler not recognised by a given version of CodeSnip is ignored. -

        +

        +
        + +
        + Extra +
        +
        +

        + Optional. Provides extra information about the snippet. When present the value must be a valid string of REML1 code. +

        +

        + If omitted the extra information is generated from the values of any Comments, Credits and Credits_URL keys. +

        +

        + When Extra has a non-empty value the Comments, Credits and Credits_URL keys are ignored. +

        +
        - Extra + StandardFormat
        -
        - Provides extra information about the snippet. Can be empty or be a string - of REML code. -
        -
        - If empty the extra information is generated from any Comments and - Credits / Credits_URL values. -
        -
        - This value was supported from CodeSnip v2.2.5. -
        +
          +
        • +

          + v1: Flag indicating if a snippet is in "standard format". Valid values are: +

          +
            +
          • + 0 – no. +
          • +
          • + 1 – yes. +
          • +
          +

          + Ignored if the Kind key is present. +

          +
        • +
        • + v2: not supported. +
        • +
        +
        - StandardFormat + Kind
        -
        - Flag indicating if a snippet is in "standard format". Valid - values are: -
        +

        + The kind (or type) of this code snippet. Valid values are: +

        • - "0" – no + freeform – a freeform snippet that doesn't conform to any other other supported type.
        • - "1" – yes. + routine – a Pascal routine (function or procedure).
        • -
        -
        - If not present then StandardFormat = "1" is assumed. -
        -
        - This value was supported from CodeSnip v2.0. -
        -
        - From CodeSnip v3.0 StandardFormat is ignored if the Kind - value is present. If Kind is not present then - StandardFormat = "0" is read as Kind = - "freeform" and StandardFormat = "1" is read - as Kind = "routine". -
        -
        -
        - Kind -
        -
        -
        - Kind of code snippet. Valid values are: -
        -
        • - "freeform" – a freeform snippet that doesn't conform to - any type other supported type + type – a simple Pascal type definition.
        • - "routine" – a Pascal routine (function or procedure) + const – a Pascal constant definition.
        • - "type" – a simple Pascal type definition + class – a Pascal class or advanced record definition and implementation.
        • - "const" – a Pascal constant definition + unit – a complete Pascal unit.
        • +
        +

        + If Kind is omitted or has no value then: +

        +
        • - "class" – a Pascal class or advanced record definition - and implementation. + v1: If the StandardFormat key has value 0 then Kind defaults to freeform. If StandardFormat has value 1 or is not present then Kind defaults to routine.
        • - "unit" – a complete Pascal unit + v2: If Kind is not present then its value defaults to freeform.
        -
        - If Kind is not present and StandardFormat is then - StandardFormat = "1" implies Kind = - "routine" and StandardFormat = "0" implies - Kind = "freeform". If neither Kind nor - StandardFormat are present then Kind defaults to - "routine". -
        -
        - This value was supported from CodeSnip v3.0. -
        +
        - TestInfo + TestInfo
        -
        - Testing information for snippets. Valid values are: -
        +

        + Testing information for the snippet. Valid values are: +

        • - "none" – the snippet has not been tested + none – the snippet has not been tested.
        • - "basic" – the snippet has passed some simple testing + basic – the snippet has passed some simple testing.
        • - "advanced" – the snippet has passed more advanced - testing, usually unit tests + advanced – the snippet has passed more advanced testing, usually unit tests.
        -
        - If TestInfo is not present then its value defaults to - "basic". This is because, until the release of CodeSnip v4.0, - all snippets had undergone at least basic testing. -
        -
        - This value was supported from CodeSnip v4.0. -
        +

        + If TestInfo is not present then its value defaults to basic. +

        +
        - MinVer + MinVer
        -
        - Ignored. -
        -
        - This value was used by a now defunct version of the online Code Snippets - Database, but is no longer used. -
        +

        + Redundant key left over from an earlier, and now unsupported version of CodeSnip. +

        +
          +
        • + v1: Ignored. +
        • +
        • + v2: Not supported. +
        • +
        +

        - Each value should occur only once. If more than one value of the same type is - present the result is not defined and may change between program versions. + Each key should occur only once. If more than one value of the same type is present the result is not defined and may change between program versions. +

        + +

        + This file format is quite messy, with several keys having similar or overlapping purposes. This has happened because new features have been added over time while preserving backward compatibility.

        Pre-processor directives

        +

        + Pre-processor directives are supported only in v1 of the database. +

        +

        - A simple pre-processor was added to CodeSnip v3 and later that can process - special pre-processor instructions contained in .ini files. The pre-processor - symbols are ignored by CodeSnip versions earlier than v3. These symbols allow - the program's version number to be tested and different parts of the file to - be read or ignored accordingly. + A simple pre-processor was added to CodeSnip v3 and later that can process special pre-processor instructions contained in .ini files. The pre-processor symbols ignored by CodeSnip versions earlier than v3. These symbols allow the program's version number to be tested and different parts of the file to be read or ignored accordingly.

        - Pre-processor instructions all begin with ";", the .ini file comment - character, followed by a "#" and then the instruction name. Valid - instructions are: + Pre-processor instructions all begin with ;, the .ini file comment character, followed by a # and then the instruction name. Valid instructions are:

        -
        +
        +
        - if-ver-eq <version> + if-ver-eq <version>
        Checks if application version is equal to <version>.
        +
        - if-ver-neq <version> + if-ver-neq <version>
        - Checks if application version is not equal to <version>. + Checks if the application version is not equal to <version>.
        +
        - if-ver-lt <version> + if-ver-lt <version>
        - Checks if application version is less than <version>. + Checks if the application version is less than <version>.
        +
        - if-ver-lte <version> + if-ver-lte <version>
        - Checks if application version is less than or equal to - <version>. † + Checks if the application version is less than or equal to + <version>. 3
        +
        - if-ver-gt <version> + if-ver-gt <version>
        - Checks if application version is greater than <version>. + Checks if the application version is greater than <version>.
        +
        - if-ver-gte <version> + if-ver-gte <version>
        - Checks if application version is greater than or equal to - <version>. † + Checks if the application version is greater than or equal to + <version>. 3
        +
        - if-ver-inrange <version-lo> <version-hi> + if-ver-inrange <version-lo> <version-hi>
        - Checks if application version is in the range of versions specified from + Checks if the application version is in the range of versions specified from <version-lo> to <version-hi>, inclusive.
        +
        - end-if + end-if
        - Ends a block started by any of the if-xxx instructions above. The block of - text is only evaluated if the if-xxx instruction evaluates true. + Ends a block started by any of the if-xxx instructions above. The block of text is only evaluated if the if-xxx instruction evaluates true.
        +

        - † Due to a bug going back to CodeSnip v3.0 if-ver-gte - and if-ver-lte have never worked correctly: they have always been - interpreted as if-ver-gt and if-ver-lt respectively. A fix - to this could now cause more problems than it solves in older version of - CodeSnip, so the implementation of the problematic directives has - been removed from later versions of the program and all occurrences of the - directives in the database have been replaced by suitable - if-ver-inrange directives. + In all cases version numbers are dotted quads of the form X.X.X.X where X is a sequence of digits. All except the first digit can be left out: omitted digits are assumed to be zero, so that 1.0.0.0, 1.0.0, 1.0 and 1 are all equivalent.

        - In all cases version numbers are dotted quads of the form X.X.X.X where X is - a sequence of digits. All except the first digit can be left out: omitted - digits are assumed to be zero, so that 1.0.0.0, 1.0.0, 1.0 and 1 are all - equivalent. + if-ver-lt 3 can be used to ignore a whole snippet definition in a normal .ini file, leaving the possibility of having a duplicate definition for CodeSnip v3 or later stored in a matching .3.ini file. E.g.:

        -

        - if-ver-lt 3 can be used to ignore a whole snippet definition in a - normal .ini file, leaving the possibility of having a duplicate definition for - CodeSnip v3 or later stored in a matching .3.ini file. E.g. -

        +
        -

        - date.ini: -

        +

        + date.ini: +

        -
        -;#if-ver-lt 3
        -[Snippet1]
        -Desc="My description"
        -Snip=044.dat
        -...
        -;#end-if
        +
        +  ;#if-ver-lt 3
        +  [Snippet1]
        +  Desc="My description"
        +  Snip=044.dat
        +  ...
        +  ;#end-if
        -

        - date.3.ini: -

        +

        + date.3.ini: +

        -
        [Snippet1]
        -Desc="My second description"
        -Snip=044.3.dat
        -...
        +
        [Snippet1]
        +  Desc="My second description"
        +  Snip=044.3.dat
        +  ...
        + +

        - Additional .ini Files For CodeSnip v3 and v4 + Additional .ini Files For CodeSnip v3 and v4

        +

        + Additional .ini files are supported only in v1 of the database. +

        +

        - From CodeSnip v3 additional .ini files with .3 interposed between the file - name and extension are supported (e.g. category.3.ini and - date.3.ini are valid names). + From CodeSnip v3 additional .ini files with .3 interposed between the file name and extension are supported (e.g. category.3.ini and date.3.ini are valid names).

        - From v4 similar files using the interposed .4 extension are supported in - addition to the .3 files (e.g winsys.4.ini). + From CodeSnip v4 similar files using the interposed .4 extension are supported in addition to the .3 files (e.g winsys.4.ini).

        - CodeSnip concatenates all .ini files with the same base name before analysing - the file. For example if date.ini, date.3.ini and - date.4.ini all exist then date.3.ini and - date.4.ini are appended to date.ini before the files - are analysed. + CodeSnip concatenates all .ini files with the same base name before analysing the file. For example if date.ini, date.3.ini and date.4.ini all exist then date.3.ini and date.4.ini are appended to date.ini before the files are analysed.

        - The .3 "inner" extension was provided for category files so that - constant and type definition snippets could be hidden from CodeSnip versions - below v3 but be visible to CodeSnip v3 and later. The new style constant and - type definition snippets are only recorded in .3 style files. + The .3 "inner" extension was provided for category files so that constant and type definition snippets could be hidden from CodeSnip versions below v3 but be visible to CodeSnip v3 and later. The new style constant and type definition snippets are only recorded in .3 style files.

        @@ -671,57 +707,237 @@

        - .4 "inner" extensions are there to support any CodeSnip v4 specific - features that can't be hidden from earlier versions. + .4 "inner" extensions are there to support any CodeSnip v4 specific features that can't be hidden from earlier versions.

        - Finally, it is possible that a name.3.ini or - name.4.ini file will exist with no matching - name.ini. In this case categories.ini (or - categories.3.ini) must still refer to name.ini, not - name.3.ini or name.4.ini. The program works out - which files to load. + Finally, it is possible that a name.3.ini or name.4.ini file will exist with no matching name.ini. In this case categories.ini (or categories.3.ini) must still refer to name.ini, not name.3.ini or name.4.ini. The program works out which files to load.

        +

        Source Code Files

        - Source code is stored separately from the category .ini files. Each snippet - has its own uniquely named file. Files can have any name providing it doesn't - clash with the master file name or the names of the category files. By - convention, source code files are named numerically in sequence and have a - .dat file extension. So 102.dat is a typical source code file - name. Sometimes there is a separate file for later versions of CodeSnip, so - an occasional file named, for example, 102.3.dat may be found. + There is a separate source code file for each snippet. These file names must be named exactly as specified in the related category .ini file's Snip key. They are usually numbered from 001 and have a .dat extension, but this is not a requirement. +

        + +

        + For example 102.dat is a typical source code file name. +

        + +

        + v1 only: Sometimes there is a separate file for later versions of CodeSnip, so an occasional file named, for example, 102.3.dat may be found. +

        + +

        + Credits Files +

        + +

        + There are two credits files that list the people who have contributed code to the database or helped to test the code, respectively. +

        + +

        + The files are named, respectively: +

        + +
          +
        • + v1: contrib.txt and testers.txt. +
        • +
        • + v2: CONTRIBUTORS and TESTERS. +
        • +
        + +

        + Each file is simply a list of names, in plain text format, with each name on a separate line. No blank lines are permitted.

        - Source code files are referenced by the Snip field in category .ini - files. + The files may be empty if there are no contributors and/or testers, but they must be present. +

        + +

        + The credits files are not referenced by, and do not reference, any of the other files in the database.

        - Subsidiary "Credits" Text Files + License Files

        +

        + License files are supported only in v2 of the database. +

        + +

        + There are two files relating to license (and copyright) information: the full text of the license in human readable format and a file providing machine readable meta data about the license and copyright. +

        + +

        + Full License Text +

        + +

        + This is a plain UTF-8 text file named LICENSE that contains the license that applies to the source code in the collection. +

        - There are two credits files, contrib.txt and - testers.txt that list the people who have contributed code to the - main database or helped to test the code, respectively. + This file must be present and non-empty. +

        +

        + The LICENSE file is not referenced by, and does not reference, any of the other files in the collection.

        +

        + License Meta Information +

        +

        - Each file is simply a list of names, each name on a separate line. + A file named LICENSE-INFO is provided that contains information about the license in machine readable form. Information is in Key=Value format as follows:

        +
        LicenseName=<human-readable-name>
        +LicenseSPDX=<code>
        +LicenseURL=<url>
        +CopyrightDate=<date-range>
        +CopyrightHolder=<name>
        +CopyrightHolderURL=<url>
        +

        - The credits files stand alone from the other files in the database in that - they are not referenced by, and do not reference, any of the other files. + The keys have the following meaning:

        +
        + +
        + LicenseName +
        +
        +

        + The name of the license as plain text. E.g. MIT License or Mozilla Public License 2.0. +

        +
        + +
        + LicenseSPDX +
        +
        +

        + The Open Source Initiative (OSI) SPDX short identifier of the license, if any. E.g. MIT or MPL-2.0. If the license does not have a SPDX identifier this key must either be omitted or be empty. +

        +

        + For a list of OSI licenses with their SPDXs see https://opensource.org/licenses/alphabetical. +

        +
        + +
        + LicenseURL +
        +
        +

        + The URL of an online copy of the license. E.g. https://opensource.org/licenses/MIT. If the license has no URL then this key must be omitted or be empty. +

        +
        + +
        + CopyrightDate +
        +
        +

        + The date of the copyright or range of copyright dates as plain text. E.g. 2020 or 2005-2020. +

        +
        + +
        + CopyrightHolder +
        +
        +

        + The name of the copyright holder as plain text. Where there are contributors either list them all or append and contributors4 to the primary copyright holder's name. E.g. Joe Bloggs or Annie Smith, Joe Bloggs and Jessie Sharp or Annie Smith and Contributors. +

        +
        + +
        + CopyrightHolderURL +
        +
        +

        + The URL of a web page where details of the copyright holder(s) or primary copyright holder can be found. E.g. https://example.com/joe-blogs-bio. This key is optional. +

        +
        + +
        + +

        + The LICENSE-INFO file is not referenced by, and does not reference, any of the other files in the collection. +

        + +

        + Version Information File +

        + +

        + The version information file is supported only in v2 of the database. +

        + +

        + There is a plain UTF-8 text file named VERSION that contains the version number of the database in the form vX.X.X. where X represents a non-negative integer. The file is required and must be non-empty. +

        + +

        + Version numbers must be incremented according to to the principles of semantic versioning. +

        + +

        + The current major version is v25. +

        + +

        + The VERSION file is not referenced by, and does not reference, any of the other files in the collection. +

        + +

        + Footnotes +

        + +
          +
        1. +

          + REML is a text markup language used to format text. REML version 4 is supported. The REML format is documented here. +

          +
        2. +
        3. +

          + Here is an example of how the Credits and Credits_URL key work together. +

          +

          + If Credits="See [example]" and Credits_URL="http://example.com" and the Extra key is empty or missing then the extra text generated will be See <a href="example.com">example 1</a>. +

          +
        4. +
        5. +

          + Due to a bug going back to CodeSnip v3.0 if-ver-gte and if-ver-lte have never worked correctly: they have always been interpreted as if-ver-gt and if-ver-lt respectively. +

          +

          + A fix to this could now cause more problems than it solves in older version of CodeSnip, so the implementation of the problematic directives has been removed from later versions of the program and all occurrences of the directives in the database have been replaced by suitable if-ver-inrange directives. +

          +
        6. +
        7. +

          + If "contributors" is specified as part of the CopyrightHolder key value in LICENSE-INFO then the CONTRIBUTORS file must contain a list of all the contributors. +

          +
        8. +
        9. +

          + Version tracking was not done before v2.0.0. However it is safe to assume, using semantic versioning, that the current format is the second major release. This is because all previous database versions were backwards compatible and therefore all belonged to the same major version, which, logically, must have been v1. The fact that this version of the database breaks that backward compatibility means the major version must be bumped. +

          +
        10. +
        + + From 8d343c03bc2396a2165ac835d56b586cf1dbb7d4 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 27 Mar 2020 04:33:23 +0000 Subject: [PATCH 203/714] Add documentation of REML file format --- Docs/Design/reml.html | 389 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 389 insertions(+) create mode 100644 Docs/Design/reml.html diff --git a/Docs/Design/reml.html b/Docs/Design/reml.html new file mode 100644 index 000000000..7fc043b6c --- /dev/null +++ b/Docs/Design/reml.html @@ -0,0 +1,389 @@ + + + + + + + + + + + + + + + + + REML Documentation + + + + + + +
        + +
        +

        + REML Markup Language +

        +
        + + + +
        + +
        + +

        + Introduction +

        + +

        + REML is a little markup language that can be used to style text. It is used in Code Snippets collection meta data for certain properties of a snippet. +

        +

        + 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. +

        + + +
        + +
        + +

        + Tags +

        + +

        + There are two types of tags: block level and in-line. +

        + +

        + If an unrecognised tag is encountered an REML code the interpreter should report an error. However, providing start and end tags are matched, the interpreter may choose to simply ignore the tags. +

        + +

        + Block Level Tags +

        + +

        + Block level tags separate the enclosed text into paragraphs of some description. The supported tags are: +

        +
          +
        • + <p>...</p> – Renders the enclosed markup as a simple paragraph. +
        • +
        • + <heading>...</heading> – Renders the enclosed markup as a heading. +
        • +
        +

        + The following rules apply to the use of block level tags: +

        +
          +
        • + The tags must not be nested. +
        • +
        • + The tags must be matched, e.g. <p> must have a matching </p>. +
        • +
        • + All text should be embedded within block level tags, e.g. <heading>heading</heading><p>text</p> or simply <p>text</p>. +
        • +
        • + White space between blocks must be ignored. +
        • +
        +

        + Here is a valid example: +

        +
        <p>Hello World</p>
        +<heading>Hello</heading>
        +<p>Hello World</p>
        +

        + Strictly speaking, the following example is invalid code – all occurrences of wrong are in error because they are not contained within block tags. +

        +
        wrong <heading>blah</heading> wrong <p>blah</p> wrong
        +

        + However interpreting code may interpret this permissively. If this is done the text outside blocks must be interpreted as if it was enclosed in <p> and </p> tags. Therefore the above code would be interpreted as: +

        +
        <p>wrong </p><heading>blah</heading><p>wrong </p><p>blah</p><p>wrong</p>
        + + +

        + Inline Tags +

        + +

        + In-line tags format the text enclosed between the start and end tags. +

        +

        + Here are the available in-line tags: +

        +
          +
        • + <strong>...</strong> – Renders the enclosed markup with strong emphasis. +
        • +
        • + <em>...</em> – Emphasises the enclosed markup. +
        • +
        • + <var>...</var> – Used to indicate the enclosed markup is a variable. +
        • +
        • + <warning>...</warning> – Used for warning text. +
        • +
        • + <mono>...</mono> – Renders markup in a mono-spaced font. +
        • +
        • + <a href="url">...</a> – Creates a hyper-link. The href attribute must specify the required URL, which must use one of the http, https or file protocols; others are not permitted. If you use the file protocol it must reference a valid local or network file. +
        • +
        +

        + The following rules apply to the use of in-line tags: +

        +
          +
        • + In-line tags must be embedded inside a block level tag. E.g. <p>one<strong>two</strong>three</p>. +
        • +
        • + Tags must match. E.g. <em> must be matched with </em>. +
        • +
        • + Tags may be nested, providing the tags match. E.g. <em>blah <var>blah</var></em> is valid but <em>blah <var>blah</em></var> is not. +
        • +
        +

        + Examples: +

        +
        <p>Make stuff <strong>stand out</strong>.</p>
        +<p><em>Emphasised <warning>warning!</warning></em></p>
        +<p>Refer to a function <var>parameter</var>.</p>
        +<p>Use the: <mono>Windows</mono> unit.</p>
        +<p>See this <a href="http://example.com">example</a>.</p>
        + +
        + +
        + +

        + Character Entities +

        + +

        + A few symbolic character entities are supported in REML. Here is the complete list: +

        +
          +
        • + &lt; for < +
        • +
        • + &gt; for > +
        • +
        • + &quot; for " +
        • +
        • + &amp; for & +
        • +
        • + &copy; for © +
        • +
        + + + +

        + To express other special symbols for which there is no symbolic character entity, numeric character entities can be used. For example to display the '¶' character (Unicode pilcrow sign) use &#182;. +

        + + + +
        + + + + From 56a9343b35facf8f72eac4fa87db303a9d6eafee Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 05:58:26 +0100 Subject: [PATCH 204/714] Major overhaul of config file documentation Updated, corrected & clarified. Left redundant sections in place for now, struck through, to document changes needed to settings code. --- Docs/Design/FileFormats/config.html | 689 +++++++++++----------------- 1 file changed, 267 insertions(+), 422 deletions(-) diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index 412d37ae8..773b3f79b 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -46,15 +46,11 @@

        - CodeSnip uses two config files – one system wide application file named - Common.config and another per-user file named - User.config. There will be a different one of the latter for each - user account on the system where CodeSnip is used. + CodeSnip uses two config files – one system wide application file named Common.config and another user file named User.config. The standard version of CodeSnip maintains separate user config file for each user account that uses CodeSnip, while the portable version has just one such file.

        - Config files use the standard .ini file format and are written and read using - Windows API calls. + Config files use the standard INI file format and are written and read using Windows API calls.

        @@ -63,27 +59,19 @@

        • - String – stored as a sequence of characters, optionally - enclosed in double quotes. + String – stored as a sequence of characters, optionally enclosed in double quotes.
        • - Boolean – stored as the text False and - True (although 0, No and - N are all read as false. + Boolean – stored as the text False and True (although 0, No and N are all read as false).
        • - Integer – stored as positive or negative whole numbers or - zero. + Integer – stored as positive or negative whole numbers or zero.
        • - Float – stored as positive or negative floating point numbers - or zero. Floating point representations of whole numbers are stored as - integers. + Float – stored as positive or negative floating point numbers or zero. Floating point representations of whole numbers are stored as integers.
        • - Date-Time – stored in the YYYY-MM-DD hh:mm:ss - format in all locales (i.e. the date and time separators are always '-' and - ':' respectively. + Date-Time – stored in the YYYY-MM-DD hh:mm:ss format in all locales (i.e. the date and time separators are always - and : respectively.
        @@ -92,16 +80,11 @@

        - From CodeSnip v4 config files are little endian Unicode text files with a byte - order mark. This encoding is used because the international support is - required and because the Windows API, which is used to read and write the - files, understands this file format. + From CodeSnip v4 config files are little endian Unicode text files with a byte order mark. This encoding is used because the international support is required and because the Windows API, which is used to read and write the files, understands this file format.

        - On earlier versions of CodeSnip the config files were ANSI text files using - the system's default encoding. The installer takes care of converting the - older files to Unicode. + On earlier versions of CodeSnip the config files were ANSI text files using the system's default encoding. The installer takes care of converting the older ANSI files to Unicode.

        @@ -113,18 +96,15 @@

        - This file stores information about CodeSnip that is common to all users. There - is just one file named Common.config that is stored in the - %ProgramData%\DelphiDabbler\CodeSnip.4 directory. + This file stores information about CodeSnip that is common to all users. The file is named Common.config. The standard version of CodeSnip stores this file in the %ProgramData%\DelphiDabbler\CodeSnip.4 directory, while the portable version stores it in the AppDir sub-directory of the folder where CodeSnip is installed.

        - There have been several versions of this file. The current one is version 7. - The change to version 7 came with CodeSnip v4.### and the removal of DelphiDabbler web service support. + There have been several versions of this file. The current one is version 7. The change to version 7 came with CodeSnip v4.16.0 and the removal of DelphiDabbler web service support.

        - The file is in INI file format. It has the following sections. + The file has the following sections.

        @@ -140,17 +120,17 @@

        -
        - Key (String) +
        + Key (String)
        -
        +
        Unique application ID. String of 32 hex digits.
        - Version (String) + Version (String)
        - Version of installed program as dotted quad string. + Internal version number of the installed version of CodeSnip as a dotted quad string.
        @@ -168,39 +148,32 @@

        - Version (Integer) + Version (Integer)
        - Version number of file. Incremented whenever the config file format - changes. If this section or this value is missing then the default value - is 1. The installer takes care of converting earlier file versions and - stamping config file with the correct version number. + Version number of the config file. Incremented whenever the file format changes. If this section or this value is missing then the default value is 1.
        - Current value is 6. + The current value is 7.

        - Per User Config File + User Config File

        - This file records configuration information that is unique to each user of the - application. Some sections correspond to user preferences while others record - details of previous operations or the layout of the GUI. The file is named - User.config and is stored in the logged on user's - %AppData%\DelphiDabbler\CodeSnip.4 directory. + This file records configuration information that is unique users of the application. Some sections correspond to user preferences while others record details of previous operations or the layout of the GUI. The file is named User.config. The standard edition of CodeSnip stores the file in the logged on user's %AppData%\DelphiDabbler\CodeSnip.4 directory, while the portable version stores it in the AppDir sub-directory of the folder where CodeSnip is installed.

        - There have been several versions of this file. The current one is version 16. The change to version 16 came with CodeSnip v4.### and the removal of DelphiDabbler web service support. + There have been several versions of this file. The current one is version 16. The change to version 16 came with CodeSnip v4.16.0 and the removal of DelphiDabbler web service support.

        - The file is in INI file format. It has the following sections. + The file has the following sections.

        @@ -208,14 +181,11 @@

        - There is one of these section for each compiler known to CodeSnip. Each - section describes how CodeSnip should use the compiler, or indicates that the - compiler is not available. + There is one of these sections for each compiler known to CodeSnip. Each section describes how CodeSnip should use the compiler, or indicates that the compiler is not available.

        - The actual name of a section is found by replacing XXX with one of - the following values: + The actual name of a section is found by replacing XXX with one of the following values:

          @@ -225,7 +195,7 @@

        • D3 – Delphi 3
        • -
        • +
        • D4 – Delphi 4
        • @@ -290,73 +260,64 @@

          - ExePath (String) + ExePath (String)
          - Path to compiler. Empty string if compiler not configured. + Path to the compiler's executable file. Empty string if the compiler not configured.
          - Displayable (Boolean) + Displayable (Boolean)
          - Indicates whether compiler's compilation results for a snippet can be - displayed in detail pane. + Indicates whether the compiler's compilation results for a snippet should be displayed in the UI.
          - Namespaces (String) + Namespaces (String)
          - Space separated list of namespaces containing Delphi RTL units. Missing or - empty string value ⇒ use default RTL namespaces for compiler. + Space separated list of the namespaces containing Delphi's RTL units. A missing or empty string value ⇒ use the default RTL namespaces for the compiler.
          - Relates to the Delphi XE2 and later compilers. If the value present, it is - ignored for earlier compilers and Free Pascal. + Relates to the Delphi XE2 and later compilers. If the value is present, it is ignored for earlier compilers and Free Pascal.
          - Prefix0 (String) + Prefix0 (String)
          - Double quoted prefix to text output by the compiler to indicate fatal - compiler errors. If not present the default is "Fatal: ". + Double quoted prefix to the text output by the compiler to indicate fatal compiler errors. If not present the default is Fatal: .
          - Prefix1 (String) + Prefix1 (String)
          - Double quoted prefix to text output by the compiler to indicate standard - compiler errors. If not present the default is "Error: ". + Double quoted prefix to the text output by the compiler to indicate standard compiler errors. If not present the default is Error: .
          - Prefix2 (String) + Prefix2 (String)
          - Double quoted prefix to text output by the compiler to indicate warnings. If - not present the default is "Warning: ". + Double quoted prefix to the text output by the compiler to indicate warnings. If not present the default is Warning: .
          - Switches (String) + Switches (String)
          - Comma separated list of compiler switches. Empty string value ⇒ use - default switches for compiler. A missing value is the same as an empty - string value. + Comma separated list of compiler switches. A missing or empty string value ⇒ use default switches for the compiler.
          - SearchDirCount (Integer) + SearchDirCount (Integer)
          - Count of number of search directories configured for compiler. + Count of the number of search directories configured for the compiler.
          - SearchDirXXX (String) + SearchDirXXX (String)
          - Once entry for each search directory configured for compiler where - XXX ranges from 0 to SearchDirCount - 1. + Once entry for each search directory configured for the compiler where XXX ranges from 0 to SearchDirCount - 1.
          Each entry contains a fully specified directory path. @@ -378,17 +339,14 @@

          - UserDataDir (String) + UserDataDir (String)
          - Specifies the directory that contains the user database. This value is - only present if the user has moved the database from its default - location. + Specifies the directory that contains the user database. This value is only present if the user has moved the database from its default location.
          - Note: The value is ignored in the portable version of - CodeSnip. + Note: The value is ignored in the portable version of CodeSnip.
          @@ -398,7 +356,7 @@

          - Persists state of controls in Duplicate Snippet dialogue box. + Persists the state of controls in the Duplicate Snippet dialogue box.

          @@ -407,10 +365,10 @@

          - EditSnippetOnClose (Boolean) + EditSnippetOnClose (Boolean)
          - Stores state of Edit in Snippets Editor check box. + Stores the state of the Edit in Snippets Editor check box.
          @@ -419,7 +377,7 @@

          - Persists state of controls in Favourites dialogue box. + Persists the state of controls in Favourites dialogue box.

          @@ -428,17 +386,16 @@

          - DisplayInNewTabs (Boolean) + DisplayInNewTabs (Boolean)
          - Stores state of Open favourites in new tabs check box. + Stores the state of the Open favourites in new tabs check box.
          - InactiveAlphaBlendValue (Integer) + InactiveAlphaBlendValue (Integer)
          - Stores alpha blend value (i.e. degree of transparency) of Favourites - dialogue box when it is not active. Values should be in range 128 to 255. + Stores the alpha blend value (i.e. the degree of transparency) of the Favourites dialogue box when it is not active. Values should be in the range 128 to 255.
          @@ -456,157 +413,149 @@

          - D2 (Boolean) + D2 (Boolean)
          - Indicates whether Delphi 2 was included in search. + Indicates whether Delphi 2 was included in the search.
          - D3 (Boolean) + D3 (Boolean)
          - Indicates whether Delphi 3 was included in search. + Indicates whether Delphi 3 was included in the search.
          - D4 (Boolean) + D4 (Boolean)
          - Indicates whether Delphi 4 was included in search. + Indicates whether Delphi 4 was included in the search.
          - D5 (Boolean) + D5 (Boolean)
          - Indicates whether Delphi 5 was included in search. + Indicates whether Delphi 5 was included in the search.
          - D6 (Boolean) + D6 (Boolean)
          - Indicates whether Delphi 6 was included in search. + Indicates whether Delphi 6 was included in the search.
          - D7 (Boolean) + D7 (Boolean)
          - Indicates whether Delphi 7 was included in search. + Indicates whether Delphi 7 was included in the search.
          - D2005w32 (Boolean) + D2005w32 (Boolean)
          - Indicates whether the Win32 personality of Delphi 2005 was included in - search. + Indicates whether the Win32 personality of Delphi 2005 was included in the search.
          - D2006w32 (Boolean) + D2006w32 (Boolean)
          - Indicates whether the Win32 personality of Delphi 2006 was included in - search. + Indicates whether the Win32 personality of Delphi 2006 was included in the search.
          - D2007 (Boolean) + D2007 (Boolean)
          - Indicates whether the Win32 personality of Delphi 2007 was included in - search. + Indicates whether the Win32 personality of Delphi 2007 was included in the search.
          - D2009w32 (Boolean) + D2009w32 (Boolean)
          - Indicates whether the Win32 personality of Delphi 2009 was included in - search. + Indicates whether the Win32 personality of Delphi 2009 was included in the search.
          - D2010 (Boolean) + D2010 (Boolean)
          - Indicates whether Delphi 2010 was included in search. + Indicates whether Delphi 2010 was included in the search.
          - DXE (Boolean) + DXE (Boolean)
          - Indicates whether Delphi XE was included in search. + Indicates whether Delphi XE was included in the search.
          - DXE2 (Boolean) + DXE2 (Boolean)
          - Indicates whether Delphi XE2 was included in search. + Indicates whether Delphi XE2 was included in the search.
          - DXE3 (Boolean) + DXE3 (Boolean)
          - Indicates whether Delphi XE3 was included in search. + Indicates whether Delphi XE3 was included in the search.
          - DXE4 (Boolean) + DXE4 (Boolean)
          - Indicates whether Delphi XE4 was included in search. + Indicates whether Delphi XE4 was included in the search.
          - DXE5 (Boolean) + DXE5 (Boolean)
          - Indicates whether Delphi XE5 was included in search. + Indicates whether Delphi XE5 was included in the search.
          - DXE6 (Boolean) + DXE6 (Boolean)
          - Indicates whether Delphi XE6 was included in search. + Indicates whether Delphi XE6 was included in the search.
          - DXE7 (Boolean) + DXE7 (Boolean)
          - Indicates whether Delphi XE7 was included in search. + Indicates whether Delphi XE7 was included in the search.
          - DXE8 (Boolean) + DXE8 (Boolean)
          - Indicates whether Delphi XE8 was included in search. + Indicates whether Delphi XE8 was included in the search.
          - D10S (Boolean) + D10S (Boolean)
          - Indicates whether Delphi 10 Seattle was included in search. + Indicates whether Delphi 10 Seattle was included in the search.
          - D101B (Boolean) + D101B (Boolean)
          - Indicates whether Delphi 10.1 Berlin was included in search. + Indicates whether Delphi 10.1 Berlin was included in the search.
          - FPC (Boolean) + FPC (Boolean)
          - Indicates whether Free Pascal was included in search. + Indicates whether Free Pascal was included in the search.
          - Option (Integer) + Option (Integer)
          - Code that describes the kind of compilation result to be searched for: 0 - ⇒ snippet compiles OK; 1 ⇒ snippet compiles without warnings; 2 - ⇒ snippet compiles with warning(s); 3 ⇒ snippet fails to compile; - 4 ⇒ snippet not tested. + Code that describes the kind of compilation result to be searched for: 0 ⇒ snippet compiles OK; 1 ⇒ snippet compiles without warnings; 2 ⇒ snippet compiles with warning(s); 3 ⇒ snippet fails to compile; 4 ⇒ snippet not tested.
          - Logic (Integer) + Logic (Integer)
          - Code that describes search logic to use: 0 ⇒ "and"; 1 ⇒ - "or". + Code that describes the search logic to use: 0 ⇒ "and"; 1 ⇒ "or".
          @@ -615,8 +564,7 @@

          - Provides information about last the last text search that was run and records - a history of search terms. + Provides information about last the last text search that was run and records a history of search terms.

          @@ -625,42 +573,39 @@

          - HistoryCount (Integer) + HistoryCount (Integer)
          - Count of items in search term history. + Count of items in the search term history.
          - HistoryXXX (String) + HistoryXXX (String)
          - One entry for each search term in history where XXX ranges from 0 - to HistoryCount - 1. + One entry for each search term in the history where XXX ranges from 0 to HistoryCount - 1.
          Each entry contains one or more spaced separated search words.
          - MatchCase (Boolean) + MatchCase (Boolean)
          One of the search options. Indicates whether searches are case sensitive.
          - WholeWord (Boolean) + WholeWord (Boolean)
          - One of the search options. Indicates whether searches match whole words - only. + One of the search options. Indicates whether searches match whole words only.
          - Logic (Integer) + Logic (Integer)
          - Code that describes search logic to use: 0 ⇒ "and"; 1 ⇒ - "or". + Code that describes the search logic to use: 0 ⇒ "and"; 1 ⇒ "or".
          @@ -669,8 +614,7 @@

          - Provides information about the last snippet cross reference search that was - run. + Provides information about the last snippet cross reference search that was run.

          @@ -679,54 +623,46 @@

          - IncludeSnippet (Boolean) + IncludeSnippet (Boolean)
          - Indicates whether to include the snippet for which the search is being - performed in the search result. + Indicates whether to include the snippet for which the search is being performed in the search result.
          - Required (Boolean) + Required (Boolean)
          - Indicates whether to include snippets that are required to compile the - selected snippet are included in search result. + Indicates whether snippets that are required to compile the selected snippet are included in the search results.
          - RequiredRecurse (Boolean) + RequiredRecurse (Boolean)
          - Indicates whether to recurse required snippets to search for required - snippets of each required snippet and so on. Ignored if - Required = False. + Indicates whether the search for required snippets is recursive. Ignored if Required = False.
          - RequiredReverse (Boolean) + RequiredReverse (Boolean)
          - Indicates whether to include snippets that depend on the searched for - snippet. + Indicates whether snippets that depend on the searched-for snippet are included in the search results.
          - SeeAlso (Boolean) + SeeAlso (Boolean)
          - Indicates whether to include snippets that are cross referenced by the - selected snippet in search results. + Indicates whether snippets that are cross referenced by the selected snippet are included in the search results.
          - SeeAlsoRecurse (Boolean) + SeeAlsoRecurse (Boolean)
          - Indicates whether to recurse cross-referenced snippets to search for their - own cross references and so on. Ignored if SeeAlso = False. + Indicates whether the search for cross-referenced snippets is recursive. Ignored if SeeAlso = False.
          - SeeAlsoReverse (Boolean) + SeeAlsoReverse (Boolean)
          - Indicates whether to include snippets that cross-reference searched for - snippet. + Indicates whether snippets that cross-reference the searched-for snippet are included in the search results.
          @@ -735,7 +671,7 @@

          - Provides information about the config file itself. + Provides information about the config file and installed version of CodeSnip.

          @@ -744,24 +680,21 @@

          - Version (Integer) + Version (Integer)
          - Version number of file. Incremented whenever the config file format - changes. If this section or this value is missing then the default value - is 1. The installer takes care of converting earlier file versions and - stamping config file with the correct version number. + The version number of the config file. Incremented whenever the file format changes. If this section or this value is missing then the default value is 1.
          - Current value is 15. + The current value is 16.
          - ProgramVersion (String) + ProgramVersion (String)
          - Internal version number of currently installed program as a dotted quad. + Internal version number of the currently installed version of CodeSnip as a dotted quad.
          @@ -770,8 +703,7 @@

          - Stores source code generation preferences. Used in test compilations or when - generating user defined units. + Stores source code generation preferences. Used in test compilations or when generating user defined units.

          @@ -780,57 +712,48 @@

          - EmitWarnings (Boolean) + EmitWarnings (Boolean)
          - Flag indicating whether directives are emitted to switch specified warnings - on or off. True ⇒ emit directives; False ⇒ do emit directives. + Flag indicating whether directives are emitted to switch specified warnings on or off. True ⇒ emit directives; False ⇒ do not emit directives.
          - WarningCount (Integer) + WarningCount (Integer)
          Number of warning directives supported.
          - WarningXXX.Symbol (String) + WarningXXX.Symbol (String)
          - One entry for each supported warning where XXX ranges from 0 to - WarningCount - 1. + One entry for each supported warning directive, where XXX ranges from 0 to WarningCount - 1.
          - Each entry contains the symbol representing a warning as used in Delphi's - $WARN directive. + Each entry contains the symbol representing a warning as used in Delphi's $WARN directive.
          - WarningXXX.MinCompiler (Float) + WarningXXX.MinCompiler (Float)
          - One entry for each supported warning where XXX ranges from 0 to - WarningCount - 1. + One entry for each supported warning directive, where XXX ranges from 0 to WarningCount - 1.
          - Records the earliest version of Delphi that supports the warning. This - version number is a decimal value containing compiler version number as - specified by Delphi's CompilerVersion constant. Must be 14.0 - (Delphi 6) or higher. + Records the earliest version of Delphi that supports the warning. This version number is a decimal value containing the compiler version number as specified by Delphi's CompilerVersion constant. Must be 14.0 (Delphi 6) or higher.
          - WarningXXX.State (Boolean) + WarningXXX.State (Boolean)
          - One entry for each supported warning where XXX ranges from 0 to - WarningCount - 1. + One entry for each supported warning directive, where XXX ranges from 0 to WarningCount - 1.
          - Indicates whether the warning should be switched on or off. True ⇒ - switch on; False ⇒ switch off. + Indicates whether the warning should be switched on or off. True ⇒ switch on; False ⇒ switch off.
          @@ -840,7 +763,7 @@

          - Stores main display preferences. + Stores preferences for the main display.

          @@ -849,114 +772,90 @@

          - OverviewStartState (Integer) + OverviewStartState (Integer)
          - Code that indicates the desired start state of the overview pane treeview: - 0 ⇒ fully expanded; 1 ⇒ fully collapsed. + Code that indicates the desired start state of the overview pane treeview: 0 ⇒ fully expanded; 1 ⇒ fully collapsed.
          - ShowEmptySections (Boolean) + ShowEmptySections (Boolean)
          - Flag that specifies whether empty sections should be displayed in overview - pane. True ⇒ display empty sections; False ⇒ hide empty - sections. + Flag that specifies whether empty sections should be displayed in the overview pane. True ⇒ display empty sections; False ⇒ hide empty sections.
          - ShowNewSnippetsInNewTabs (Boolean) + ShowNewSnippetsInNewTabs (Boolean)
          - Flag that specifies how newly created snippets and categories are displayed - in detail pane. True ⇒ new tab created for each new item; False ⇒ - new items overwrite item in selected tab. + Flag that specifies how newly created snippets and categories are displayed in the detail pane. True ⇒ a new tab is created for each new item; False ⇒ new items overwrite the current item in the selected tab.
          - MainDBHeadingColour (Integer) + MainDBHeadingColour (Integer)
          - Colour to be used to display headings of items from main database. + Colour to be used to display headings of items from the main database.
          - UserDBHeadingColour (Integer) + UserDBHeadingColour (Integer)
          - Colour to be used to display headings of items from user database. + Colour to be used to display headings of items from the user database.
          - SourceCodeBGColour (Integer) + SourceCodeBGColour (Integer)
          - Colour to be used for background of source code in the main display. + Colour to be used for the background of source code in the main display.
          - MainDBHeadingCustomColourCount (Integer) + MainDBHeadingCustomColourCount (Integer)
          Number of recorded custom colours for main database item headings.
          - MainDBHeadingCustomColourXXX (String) + MainDBHeadingCustomColourXXX (String)
          - One entry for each recorded custom colours for main database item - headings, where XXX ranges from 0 to - MainDBHeadingCustomColourCount - 1. + One entry for each recorded custom colour for main database item headings, where XXX ranges from 0 to MainDBHeadingCustomColourCount - 1.
          - The value is a definition of a custom colour in the format used by the - TColorDialog dialogue box. This format is - ColourID=ColourNum where ColourID is a value - from "ColorA" to "ColorP" and ColourNum is - the hex representation of the colour. + The value is a definition of a custom colour in the format used by the TColorDialog dialogue box. This format is ColourID=ColourNum where ColourID is a value from ColorA to ColorP and ColourNum is the hex representation of the colour.
          - UserDBHeadingCustomColourCount (Integer) + UserDBHeadingCustomColourCount (Integer)
          Number of recorded custom colours for user database item headings.
          - UserDBHeadingCustomColourXXX (String) + UserDBHeadingCustomColourXXX (String)
          - One entry for each recorded custom colours for user database item - headings, where XXX ranges from 0 to - UserDBHeadingCustomColourCount - 1. + One entry for each recorded custom colour for user database item headings, where XXX ranges from 0 to UserDBHeadingCustomColourCount - 1.
          - The value is a definition of a custom colour in the format used by the - TColorDialog dialogue box. This format is - ColourID=ColourNum where ColourID is a value - from "ColorA" to "ColorP" and ColourNum is - the hex representation of the colour. + The value is a definition of a custom colour in the format used by the TColorDialog dialogue box. This format is ColourID=ColourNum where ColourID is a value from ColorA to ColorP and ColourNum is the hex representation of the colour.
          - SourceCodeBGCustomColourCount (Integer) + SourceCodeBGCustomColourCount (Integer)
          - Number of recorded custom colours for source code background in the main - display. + Number of recorded custom colours for the source code background in the main display.
          - SourceCodeBGCustomColourXXX (String) + SourceCodeBGCustomColourXXX (String)
          - One entry for each recorded custom colours for source code background in - the main display, where XXX ranges from 0 to - SourceCodeBGCustomColourCount - 1. + One entry for each recorded custom colour for the source code background in the main display, where XXX ranges from 0 to SourceCodeBGCustomColourCount - 1.
          - The value is a definition of a custom colour in the format used by the - TColorDialog dialogue box. This format is - ColourID=ColourNum where ColourID is a value - from "ColorA" to "ColorP" and ColourNum is - the hex representation of the colour. + The value is a definition of a custom colour in the format used by the TColorDialog dialogue box. This format is ColourID=ColourNum where ColourID is a value from ColorA to ColorP and ColourNum is the hex representation of the colour.
          @@ -966,7 +865,7 @@

          - Stores general (miscellaneous) application preferences. + Stores miscellaneous application preferences.

          @@ -975,11 +874,10 @@

          - Units (Integer) + Units (Integer)
          - A code that records the units of measurement used by the application: 0 - ⇒ inches; 1 ⇒ millimeters. + A code that records the units of measurement used by the application: 0 ⇒ inches; 1 ⇒ millimeters.
          @@ -988,9 +886,7 @@

          - Stores preferences that define the properties of one or more syntax - highlighters. Also records information about the custom colours available when - configuring the highlighters. + Stores preferences that define the properties of one or more syntax highlighters. Also records information about the custom colours available when configuring the highlighters.

          @@ -999,143 +895,115 @@

          - FontSize (Integer) + FontSize (Integer)
          - Size of current highlighter font in points. + Size of the current highlighter font in points.
          - FontName (String) + FontName (String)
          - Name of current highlighter font. + Name of the current highlighter font.
          - ElemXXX.Color (Integer) + ElemXXX.Color (Integer)
          - One entry for each of the 12 source code elements recognised by the - current syntax highlighter. XXX ranges from 0 to 11. + One entry for each of the 12 source code elements recognised by the current syntax highlighter. XXX ranges from 0 to 11.
          - Colour of source code element. Integer representation of a Delphi - TColor value. If the colour is not specified the value is the - integer representation of clNone. + Each value is a colour of a source code element as an integer representation of a Delphi TColor value. If the colour is not specified the value is the integer representation of clNone.
          - ElemXXX.Style (Integer) + ElemXXX.Style (Integer)
          - One entry for each of the 12 source code elements recognised by the - current syntax highlighter. XXX ranges from 0 to 11. + One entry for each of the 12 source code elements recognised by the current syntax highlighter. XXX ranges from 0 to 11.
          - Bitmask representing the font styles used for the source code element. + Each value is a bitmask representing the font styles used for the source code element.
          - NamedHiliterCount (Integer) + NamedHiliterCount (Integer)
          - Number of custom (or "Named") syntax highlighters defined by user. + Number of custom (or "Named") syntax highlighters defined by the user.
          - HilterNameXXX (String). + HilterNameXXX (String)
          - One entry for each custom syntax highlighter, where XXX ranges - from 0 to NamedHiliterCount - 1. + One entry for each custom syntax highlighter, where XXX ranges from 0 to NamedHiliterCount - 1.
          - Each value is the name used to identify the syntax highlighter with the - same index. (See the various NamedHiliterXXX entries below.) + Each value is the name used to identify the syntax highlighter with the same index. (See the various NamedHiliterXXX entries below.)
          - NamedHiliterXXX.FontSize (Integer) + NamedHiliterXXX.FontSize (Integer)
          - One entry for each custom syntax highlighter, where XXX ranges - from 0 to NamedHiliterCount - 1. + One entry for each custom syntax highlighter, where XXX ranges from 0 to NamedHiliterCount - 1.
          - Each value is the size of the corresponding syntax highlighter's font, in - points. + Each value is the size of the corresponding syntax highlighter's font, in points.
          - NamedHiliterXXX.FontName + NamedHiliterXXX.FontName (String)
          - One entry for each custom syntax highlighter, where XXX ranges - from 0 to NamedHiliterCount - 1. + One entry for each custom syntax highlighter, where XXX ranges from 0 to NamedHiliterCount - 1.
          Each value is the name of the corresponding syntax highlighter's font.
          - NamedHiliterXXX.ElemYYY.Color (Integer) + NamedHiliterXXX.ElemYYY.Color (Integer)
          - There is an entry for each source code element of each custom synax - highliter. XXX represents the index of the corresponding syntax - highlighter and ranges from 0 to NamedHiliterCount - 1. - For each value of XXX there are 12 - .ElemYYY values, with YYY ranging from - 0 to 11. + There is an entry for each source code element of each custom synax highliter. XXX represents the index of the corresponding syntax highlighter and ranges from 0 to NamedHiliterCount - 1. For each value of XXX there are 12 .ElemYYY values, with YYY ranging from 0 to 11.
          - Each value specifies the colour of a source code element. The values are - integer representations of a Delphi TColor value. If the colour - is not specified the value is the integer representation of - clNone. + Each value specifies the colour of a source code element as an integer representations of a Delphi TColor value. If the colour is not specified the value is the integer representation of clNone.
          - NamedHiliterXXX.ElemYYY.Style (Integer) + NamedHiliterXXX.ElemYYY.Style (Integer)
          - There is an entry for each source code element of each custom synax - highliter. XXX represents the index of the corresponding syntax - highlighter and ranges from 0 to NamedHiliterCount - 1. - For each value of XXX there are 12 - .ElemYYY values, with YYY ranging from - 0 to 11. + There is an entry for each source code element of each custom synax highliter. XXX represents the index of the corresponding syntax highlighter and ranges from 0 to NamedHiliterCount - 1. For each value of XXX there are 12 .ElemYYY values, with YYY ranging from 0 to 11.
          - Each value contains a bitmask representing the font style of a source code - element. + Each value contains a bitmask representing the font style of a source code element.
          - CustomColourCount (Integer) + CustomColourCount (Integer)
          Number of recorded custom colours available for use by highlighter elements.
          - CustomColourXXX (String) + CustomColourXXX (String)
          - One entry for each recorded custom colour, where XXX ranges from - 0 to CustomColourCount - 1. + One entry for each recorded custom colour, where XXX ranges from 0 to CustomColourCount - 1.
          - The value is a definition of a custom colour in the format used by the - TColorDialog dialogue box. This format is - ColourID=ColourNum where ColourID is a value - from "ColorA" to "ColorP" and ColourNum is - the hex representation of the colour. + The value is a definition of a custom colour in the format used by the TColorDialog dialogue box. This format is ColourID=ColourNum where ColourID is a value from ColorA to ColorP and ColourNum is the hex representation of the colour.
          @@ -1145,7 +1013,7 @@

          - Stores preferences that determine printing defaults. + Stores default printing preferences.

          @@ -1154,41 +1022,40 @@

          - UseColor (Boolean) + UseColor (Boolean)
          - Flag that indicates whether printing is to be in colour. + Flag that indicates whether printing is to be in colour: True ⇒ print in colour; False ⇒ print in black and white.
          - SyntaxPrint (Boolean) + SyntaxPrint (Boolean)
          - Flag that indicates whether source code in printed output is to be syntax - highlighted. + Flag that indicates whether source code in printed output is to be syntax highlighted: True ⇒ use syntax highlighting; False ⇒ do not syntax highlight.
          - LeftMargin (Float) + LeftMargin (Float)
          - Size of printed page's left margin in mm. + Size of a printed page's left margin in mm.
          - TopMargin (Float) + TopMargin (Float)
          - Size of printed page's top margin in mm. + Size of a printed page's top margin in mm.
          - RightMargin (Float) + RightMargin (Float)
          - Size of printed page's right margin in mm. + Size of a printed page's right margin in mm.
          - BottomMargin (Float) + BottomMargin (Float)
          - Size of printed page's bottom margin in mm. + Size of a printed page's bottom margin in mm.
          @@ -1197,8 +1064,7 @@

          - Stores preferences that describes customisations of snippet pages displayed in - details pane. + Stores preferences that describes the customisation of pages displayed in the details pane for different snippet kinds.

          @@ -1207,47 +1073,42 @@

          - PageKindXXX (String) + PageKindXXX (String)
          - One entry for each snippet kind where XXX is the ordinal value of - the snippet kind. + One entry for each snippet kind where XXX is the ordinal value of the snippet kind.
          - Each entry's value describes the structure of the details pane page that - snippets of the kind given by the key name. The value is a comma separated - list of zero or more names, each of which denotes a page component. - Components are displayed in the order they are listed. Valid component - names are: + Each entry's value describes the structure of the details pane page that displays snippets of the related kind. The value is a comma separated list of zero or more names, each of which denotes a page component. Components are displayed in the order they are listed. Valid component names are:
          • - Description + Description
          • - SourceCode + SourceCode
          • - Kind + Kind
          • - Category + Category
          • - Units + Units
          • - Depends + Depends
          • - XRefs + XRefs
          • - CompileResults + CompileResults
          • - ExtraInfo + ExtraInfo
          @@ -1258,8 +1119,7 @@

          - Stores preferences that govern the way source code is stored in exported - documents by default. + Stores preferences that specify how source code is exported by default.

          @@ -1268,33 +1128,28 @@

          - FileType (Integer) + FileType (Integer)
          - Code that determines type of exported files: 0 ⇒ plain text; 1 ⇒ - Pascal; 2 ⇒ HTML; 3 ⇒ rich text (RTF). + A code that determines type of exported files: 0 ⇒ plain text; 1 ⇒ Pascal; 2 ⇒ HTML; 3 ⇒ rich text (RTF).
          - CommentStyle (Integer) + CommentStyle (Integer)
          - Code that determines style of commenting used for documentation of snippets - in output files: 0 ⇒ no documentation comment; 1 ⇒ description of - snippet between prototype and body; 2 ⇒ description of snippet - immediately precedes snippet. + A code that determines the style of documentation comments used for snippets in output files: 0 ⇒ no documentation comment; 1 ⇒ a description of the snippet apperars between the snippet's prototype and the body of the code; 2 ⇒ the description of the snippet immediately precedes it.
          - TruncateComments (Boolean) + TruncateComments (Boolean)
          - Flag indicating whether multi-paragraph snippet descriptions are to be - truncated to first paragraph only in snippet documentation comments. + Flag indicating whether multi-paragraph snippet descriptions are to be truncated to the first paragraph only in documentation comments. True ⇒ truncate the description; False ⇒ use the full description.
          - UseSyntaxHiliting (Boolean) + UseSyntaxHiliting (Boolean)
          - Flag indicating whether source code is to be syntax highlighted. + Flag indicating whether source code is to be syntax highlighted. True ⇒ use syntax highlighting; False ⇒ do not syntax highlight.
          @@ -1304,8 +1159,7 @@

          - Stores preferences relating to updating CodeSnip and the local copy of the - online database. + Stores preferences relating to updating CodeSnip and the local copy of the online database.

          @@ -1317,17 +1171,13 @@

          AutoCheckProgramFrequency (Integer)
          - Specifies frequency, in days, with which CodeSnip automatically checks - online for program updates. A value of 0 indicates that CodeSnip will not - check for program updates automatically. + Specifies frequency, in days, with which CodeSnip automatically checks online for program updates. A value of 0 indicates that CodeSnip will not check for program updates automatically.
          AutoCheckDatabaseFrequency (Integer)
          - Specifies frequency, in days, with which CodeSnip automatically checks - online for database updates. A value of 0 indicates that CodeSnip will not - check for database updates automatically. + Specifies frequency, in days, with which CodeSnip automatically checks online for database updates. A value of 0 indicates that CodeSnip will not check for database updates automatically.

          @@ -1350,8 +1200,7 @@

          UseProxy (Boolean)
          - Flag that indicates whether to use a proxy server or not. If false the - remaining name / value pairs in this section are ignored. + Flag that indicates whether to use a proxy server or not. If false the remaining name / value pairs in this section are ignored.
          IPAddress (String) @@ -1416,6 +1265,7 @@

    +

    [UserInfo] section

    @@ -1442,20 +1292,18 @@

    User's email address. +

    [WindowState:XXX] sections

    - There is one of these section for each window that stores its state and size - in the config file. XXX is a sub-section placeholder and is replaced - by a unique name representing the window whose state is stored. + There is one of these section for each window that stores its state and size in the config file. XXX is a sub-section placeholder and is replaced by a unique name representing the window whose state is stored.

    - Some windows also store custom information in their sub-section that is not - used in all sub-sections. + Some windows also store custom information in their sub-section that is unique to them. Values common to all sub-sections are described first, followed by additional details of any sub-section storing custom information.

    @@ -1472,50 +1320,48 @@
    - Left (Integer) + Left (Integer)
    - Location of left side of window on screen in pixels. + Location of the left side of the window on screen in pixels.
    - Top (Integer) + Top (Integer)
    - Location of top of window on screen in pixels. + Location of the top of the window on screen in pixels.
    - Width (Integer) + Width (Integer)
    - Width of window in pixels. + Width of the window in pixels.
    Not used for fixed size windows.
    - Height (Integer) + Height (Integer)
    - Height of window in pixels. + Height of the window in pixels.
    Not used for fixed size windows.
    - State (Integer) + State (Integer)
    - Value of that describes state of window: 0 ⇒ normal state; 1 ⇒ - minimized; 2 ⇒ maximized. + Value of that describes the state of window: 0 ⇒ normal state; 1 ⇒ minimized; 2 ⇒ maximized.
    - Not used for dialogue boxes and other windows that are always displayed in - the normal state. + Not used for dialogue boxes and other windows that are always displayed in the normal state.
    @@ -1534,17 +1380,16 @@
    - SplitterPos (Integer) + SplitterPos (Integer)
    - Position of vertical splitter control in main window, in pixels from left - of window client area. + Position of the main window's vertical splitter control, in pixels from the left of the window client area.
    - OverviewTab (Integer) + OverviewTab (Integer)
    - Index of selected tab in overview pane. + Index of the selected tab in the overview pane.
    From 8b35ec528064aeeebe26de328bb5464dc13430ef Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 06:03:01 +0100 Subject: [PATCH 205/714] Remove completed TODOs --- Src/CodeSnip.todo | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index adcbcc455..284b74ab7 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -3,12 +3,8 @@ {TODO -cFirstRun : Delete UpdateChecks section from Config file on first run} {TODO -cFirstRun : Delete Prefs:Updating section from Config file on first run} {TODO -cHelp : -Add a Backup Database task help topis that describes how to backup and restore databases. +Add a Backup Database task help topics that describes how to backup and restore databases. Then add help link to Res/HTML/dlg-dbupdate-intro-tplt.html} {TODO -cUI : Rationalise use of TFontHelper.SetDefaultFont(s) and .SetDefaultBaseFont(s) methods.} -{TODO -cSharing : -Decide if to continue to support user info in export files -- update Docs\Design\FileFormats\config.html accordingly} {TODO -cFirstRun : Update config file versions: common to 7 and user to 16} -{TODO -cPreRelease : Add correct CodeSnip version to Docs\Design\FileFormat\Config.html (currently flagged as 4.###)} {TODO -cPreRelease : Remove -[**dev**] from product and file versions in .vi files before bumping release number} From 4ad6606be25bc39dd9bc1be0d8e94a9acb52854b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 08:05:32 +0100 Subject: [PATCH 206/714] Remove unused ProgramKey & GenerateKey methods from TAppInfo. --- Src/UAppInfo.pas | 53 ++++-------------------------------------------- 1 file changed, 4 insertions(+), 49 deletions(-) diff --git a/Src/UAppInfo.pas b/Src/UAppInfo.pas index 77363abbf..e9d1dfa9a 100644 --- a/Src/UAppInfo.pas +++ b/Src/UAppInfo.pas @@ -27,11 +27,6 @@ interface Static class that provides information about the application. } TAppInfo = class(TNoConstructObject) - strict private - class function GenerateKey: string; - {Generates unique program key for application in deterministic way. - @return Required key. - } public const CompanyName = 'DelphiDabbler'; {Name of "company" that owns this program} @@ -109,12 +104,6 @@ TAppInfo = class(TNoConstructObject) {Gets version number of program's executable file. @return Version number as dotted quad. } - // TODO -cTidy: Remove following unused method and may settings ssApplication section - class function ProgramKey: string; - {Gets program's unique identifying key. This key should be different on - each installation. If key does not exist it is created. - @return 32 digit key. - } end; @@ -124,10 +113,11 @@ implementation uses // Delphi SysUtils, - // DelphiDabbler library - PJMD5, // Project - USettings, UStrUtils, USystemID, USystemInfo, UVersionInfo; + USettings, + UStrUtils, + USystemInfo, + UVersionInfo; { TAppInfo } @@ -210,21 +200,6 @@ class function TAppInfo.DefaultUserDataDir: string; {$ENDIF} end; -class function TAppInfo.GenerateKey: string; - {Generates unique program key for application in deterministic way. - @return Required key. - } -begin - Result := StrToUpper( - TPJMD5.Calculate( - USystemID.SystemIDStr, TEncoding.ASCII - ) - ); - {$IFDEF PORTABLE} - Result := 'P:' + StrSliceRight(Result, Length(Result) - 2); - {$ENDIF} -end; - class function TAppInfo.HelpFileName: string; {Returns fully specified name of CodeSnip's help file. @return Name of help file. @@ -241,26 +216,6 @@ class function TAppInfo.ProgramFileVersion: string; Result := TVersionInfo.FileVersionNumberStr; end; -class function TAppInfo.ProgramKey: string; - {Gets program's unique identifying key. This key should be different on each - installation. If key does not exist it is created. - @return 32 digit key. - } -var - Section: ISettingsSection; // persistent storage where key is recorded -begin - // Try to get key from storage - Section := Settings.ReadSection(ssApplication); - Result := Section.GetString('Key'); - if Result = '' then - begin - // Key not present: create and store it - Result := GenerateKey; - Section.SetString('Key', Result); - Section.Save; - end; -end; - class function TAppInfo.ProgramReleaseInfo: string; {Gets information about the current program release. Includes any special build information if present in version information. From 0226e43eeaa5024ab3df72eb3a95b773838158a8 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 08:42:26 +0100 Subject: [PATCH 207/714] Delete unused USystemID unit --- Src/CodeSnip.dpr | 1 - Src/CodeSnip.dproj | 1 - Src/USystemID.pas | 131 --------------------------------------------- 3 files changed, 133 deletions(-) delete mode 100644 Src/USystemID.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 232bd0681..ef97c555e 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -336,7 +336,6 @@ uses UStringReader in 'UStringReader.pas', UStructs in 'UStructs.pas', UStrUtils in 'UStrUtils.pas', - USystemID in 'USystemID.pas', USystemInfo in 'USystemInfo.pas', UTaggedTextLexer in 'UTaggedTextLexer.pas', UTestCompile in 'UTestCompile.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 449f1d5d7..adbd42542 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -533,7 +533,6 @@ - diff --git a/Src/USystemID.pas b/Src/USystemID.pas deleted file mode 100644 index a26a56bd4..000000000 --- a/Src/USystemID.pas +++ /dev/null @@ -1,131 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). - * - * Exposes a routine that creates a serial number from system properties. -} - - -unit USystemID; - - -interface - - -function SystemIDStr: string; - {Builds an ID string from the Windows product id and the serial number of the - first hard disk drive on the system. - @return Required ID string. - } - - -implementation - - -uses - // Delphi - SysUtils, Windows, - // Project - {$IFDEF PORTABLE} - UAppInfo, - {$ENDIF} - USystemInfo; - - -function HardDiskSerial(const Drive: string): DWORD; - {Gets the serial number of a disk disk. - @param Drive [in] Name of drive (e.g. C:\) or network share (e.g. - \\MyServer\MyShare\). A trailing backslash must be provided. - @return Serial number or 0 if serial number can't be found or if drive has - no serial number. - } -var - Unused: DWORD; // unused parameters - PrevErrorMode: UINT; // stores Windows error mode -begin - // Inhibit system dialog appearing on error - PrevErrorMode := SetErrorMode(SEM_FAILCRITICALERRORS); - try - Result := 0; - GetVolumeInformation( - PChar(Drive), nil, 0, @Result, Unused, Unused, nil, 0 - ); - finally - // Restore old error mode - SetErrorMode(PrevErrorMode); - end; -end; - -function DriveTypeFromPath(const Path: string): Integer; - {Determines type of a drive. - @param Path [in] Path containing drive name (e.g. C:\). - @return Code representing drive type. - } -var - Drive: string; // the drive name -begin - Drive := ExtractFileDrive(Path) + '\'; - Result := Integer(GetDriveType(PChar(Drive))); -end; - -function IsValidDriveNum(const DriveNum: Byte): Boolean; - {Checks if a zero-based drive number exists on the system. - @param [in] Drive number in range 0..25. - @return True if drive is valid, false otherwise. - } -begin - if DriveNum in [0..25] then - Result := GetLogicalDrives and (1 shl DriveNum) <> 0 - else - Result := False; -end; - -function DriveRootPath(const DriveNum: Byte): string; - {Gets root drive path for a zero-based drive number. - @param DriveNum [in] Drive number in range 0..25. - @return Drive root (e.g. C:\). - } -begin - if DriveNum in [0..25] then - Result := Char(DriveNum + Ord('A')) + ':\' - else - Result := ''; -end; - -function SystemIDStr: string; - {Builds an ID string from the Windows product id and the serial number of the - first hard disk drive on the system. - @return Required ID string. - } -var - Drive: Byte; // loops through all drive numbers - Serial: DWORD; // serial number of a hard diak -begin - {$IFDEF PORTABLE} - // Get serial for removable disk if possible. Fall thru and get hard disk if - // not. - Serial := HardDiskSerial( - IncludeTrailingPathDelimiter(ExtractFileDrive(TAppInfo.AppExeDir)) - ); - if Serial <> 0 then - Exit(TOSInfo.ProductID + IntToHex(Serial, 8)); - {$ENDIF} - // Append serial number of first fixed hard drive as 8 digit hex string - for Drive := 0 to 25 do - begin - if DriveTypeFromPath(DriveRootPath(Drive)) = DRIVE_FIXED then - begin - Serial := HardDiskSerial(DriveRootPath(Drive)); - if Serial <> 0 then - Exit(TOSInfo.ProductID + IntToHex(Serial, 8)); - end; - end; - // Couldn't find a drive serial number: use 0 - Result := TOSInfo.ProductID + IntToHex(0, 8); -end; - -end. - From fd621ef386230d3caa5559195cb366da2980b28d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 09:09:45 +0100 Subject: [PATCH 208/714] Modify installer to delete common config file instead of copying & updating --- Src/Install/EventHandlers.ps | Bin 7983 -> 7923 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Src/Install/EventHandlers.ps b/Src/Install/EventHandlers.ps index bc278a4db7b79dbaa63a81a3af5dd077e5abc9a6..0a9e9bf8eb0d116618869324fb6b528298d7382d 100644 GIT binary patch delta 162 zcmZ2)_t|#CXX(jOG8I7VIQf^1PP$8KPHIW2LSkN}LP1e#MP_kHW?s5Na(-@Zejbp@ zOUq1GNXyJgwNl8-SIEiFOHVCQC@oG+QAjLS$WK#n&QD1V&dV&|tpw9It3%$!t>g3K_(cuP&|$%!)FlTBpIajG&3 zGX|?FuXoKWE-gw`NCq1Pq(EjVWF!^?nMFmZ$t5tMG@$tkiFqjs1x5MkMTxlzWvNBQ znfZCVTnY;M`U;tOY57IDi6uZ0J%x~rOrZXv)Wnk1Vug|nkm+D!!DeKpDP)!?q~xa- d=c$({$fZ_f7MFkw2`)*@EkO6t=62Z}MgS;>R_*`* From 50f879f38a22d042623f1f074d021db985484cdf Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 09:10:15 +0100 Subject: [PATCH 209/714] Remove redundant installer scripts --- Src/Install/CodeSnip.iss | 2 -- Src/Install/Unicode.ps | Bin 2723 -> 0 bytes Src/Install/UpdateIni.ps | Bin 3804 -> 0 bytes 3 files changed, 2 deletions(-) delete mode 100644 Src/Install/Unicode.ps delete mode 100644 Src/Install/UpdateIni.ps diff --git a/Src/Install/CodeSnip.iss b/Src/Install/CodeSnip.iss index f01c01f66..8dc232070 100644 --- a/Src/Install/CodeSnip.iss +++ b/Src/Install/CodeSnip.iss @@ -114,8 +114,6 @@ Type: filesandordirs; Name: "{commonappdata}\{#AppPublisher}\{#ProgDataSubDir}" // DataLocations.ps must be declared first #include "DataLocations.ps" #include "VersionInfo.ps" -#include "Unicode.ps" -#include "UpdateIni.ps" #include "UpdateDBase.ps" #include "EventHandlers.ps" diff --git a/Src/Install/Unicode.ps b/Src/Install/Unicode.ps deleted file mode 100644 index 77c20881aecb5c1d06cbb8a23b1644539436fa54..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2723 zcmb7GZI9YU5dMDB{fCh*642fON2*pLid5hraSI0mQWQl|wAcgQ#@=;z*GEXz|K6Fk zF>o)HYCZtFv-9%IGtc_(%M17cma(+3(76c_20B6*X_Er2*?j#ch7Ozt7b7?{sRh09 zevlu%BRi=!n@)9a2^c4tmeUT2yfxlPwnD)!@Gm|u(uq3>5W&tj|@wOwfw@xi;*bbja0BpLN5H`48Uu4J1%w}shLi!z+Yi%`Fl zHq%yen>pwx5nJ0+(MukW(c>kiSyE!&h2?vpq69B58r5%#gx`piiYQh)_Gk6$S6aj5 zb*C96L_QZ02a_6Ezl8dVYJ8@(Ff-a|x6cr4hM^RRv@~zbiXELGpuNKb%?j+9vQ?`p z$G%Z9_vtiyp!p`QK|kMY(42KIR~$EjOc;@Jm(_iquF*_4{k=oG)ZX=@ZXCgT5Qcbh zc7zW&R4*P$vMCKpA~Fiwg@G`UWMG*|#|;mEe>xqXVPBQ`zmXp#+G5e!m-&9QDPWv> zVXc6CKBp7U|DBajz7UK=Dv}Noqem@;jnS!>l&yR~RZbZQW5k~IU4WwLi#!`xpqelg zVGQh!ZvvKn!m`rp!F)U-mSjeU807}Rr?Bv&OPwu)Gg<0SCwt5}QtdqsKHU_j8q^MI zIrC&x;qnGfAL=8g25~t?06~|O*5MY-6U#*Fj3F`kS*`5f)9-mMMR}U;E0y=xQpF5D z%BdeoeoT&1!wN4CwMW)Rn@+kU!KIL$9kEWc(0^EtZf<`b4`EGn0ipaoZW~NApLbONz{GC*`dhs=G=|jYhVS=U%|YldrJ}Jl z`0F-4>fZ;dkd{|VG|0ZaBi=aQ9_|6^Rl97r`_hs9HZL0xbBChLAc#Q#P>g(K+Ahp9#jR+t*jOZC^1I`1oNg zQa@H*FuF{i{v2a9=*5tbpgNW@(i;z5w9qLSdWwZTczgy9fOfH4^zNi#UfH}F@j$cD OiPqIeY+qPkUi=HOc{Wo3 diff --git a/Src/Install/UpdateIni.ps b/Src/Install/UpdateIni.ps deleted file mode 100644 index 452dacff13ceb3f0a7b7e953c1fd52a8a3598b7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3804 zcmb_f+iu%N5Pdh`e;A+-k_?5iT_A0pq=4fKpu!g+wi6UV9#-U1+J@X^cbAscAphPo zOHy9RR*V95fJnT|?97=nXGY(4cW94p=gQHIsckCh#AK4rjV%fHTs{3urk=bZKbPdC zEghLWTwI!eR8a_;)YC$xbfHqIog4;-_X!;)`w5M65|o;1xiXqu&_X!U##5%8w`y8@ znbAV|IlSV?TorOif0~+7p@TCs^+IVfT9WWI_r5wBjmqZq#Ms&Ba&j@kaU*^^Se)QQ zt7dag{gVM5?(hHd>Tv&Xe@GLF6zC5#*Uo6_&#br?Uf3ix*;kWpG5fH6`6k>)@50 zq(z;2xd~)Lcvg2Bs|l`$}DNfQc9s+2qDS^ zRV)gcNsppyxuCCd8QfSo<5D+aa>!JQB~2w2#(4zveRqfdjYjlAiVW~*I=;FY$EXbX z0ug%0U%b?TlXqIBOjk~EVHHE`=imtFDuTbe+w)fkuP@F>YJM@J&LRT5;oke}%Y;r1 zJb;>W#!ck};Dc`@6WlR3NsE$82uQdk9IlW8V&B`_L;Qc&%HnZ%&RA;$hWNTl_=Vk_ z%9>PWHLRJW$J(h|)4qHX3UZD!`qxFqpI2}`q$|1TE{=#>M$ZOsc6aWDMFG%vTDl{; zJ+@XXuk)Mm{0$KzD)>?8Jo(@W+{+r01aK3jRUq8%&J^|0>%2l5 z>;a;g%2Sj-^~Ngc`ezRyed_sG-0nwp95iQsV$QY!u4oXVjNTnKC1wk$GyEUeb}7Cx z3(*aYxQZ3!o={srY4aSw0WBu)6P^c$5!ahcpXK>FeV-85t-~8-5i|FHbtPg=SxG9{gOTGtUqctIZ zEqD-*yw=SK89Nq)NC(;}GCn=RK=E>h!E{9LjVU0%V8RN>57Kc{9lh)3&iItxzN1Qg zJpB0cI&oGrC`hy{E5D?5IwQ)6LkZov5I0)Zv2Jlz&GV2+NRT^+o7tKgpCD#vC7xtm zmd)5$7z-GuG8H^Sr?o=Rc!^aqI15UNJ5Z(;6X-q0D1A~oGYgWDDipY%kZImb#Kw?Hf2S9P&XzgfVux-6H})F@V?sPZqhKzDenH~{!U>Y1PSyQ7D+ z|B@JWJ}`>fcsJX_RM0!HqAalpMdV>c7F1bzuT0HLNmz=SMF5~{ED7;FERV>#uCVqn zoA5@9CNDi$bGQMuOr>+eF4wU~Ph)i9_#bxWN7+VNHv9D<812x*@5c6KUw|Y>ja@UX;})CNXmmBf6~- zGblh8Q_Bth0mOZU-3bTvw^k@Be52e?inHA|lmRh}wZio1_wdO__J-8^*!)hw*VixA z5qW$FxW_+Rx@?eM*Y=P5Byr+6tWo8DL$coS Date: Tue, 31 Mar 2020 09:30:47 +0100 Subject: [PATCH 210/714] Revert "Modify installer to delete common config file instead of copying & updating" This reverts commit fd621ef386230d3caa5559195cb366da2980b28d. --- Src/Install/EventHandlers.ps | Bin 7923 -> 7983 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Src/Install/EventHandlers.ps b/Src/Install/EventHandlers.ps index 0a9e9bf8eb0d116618869324fb6b528298d7382d..bc278a4db7b79dbaa63a81a3af5dd077e5abc9a6 100644 GIT binary patch delta 243 zcmextyWVcYXK7jI{DMm7{M_99Jm>tpw9It3%$!t>g3K_(cuP&|$%!)FlTBpIajG&3 zGX|?FuXoKWE-gw`NCq1Pq(EjVWF!^?nMFmZ$t5tMG@$tkiFqjs1x5MkMTxlzWvNBQ znfZCVTnY;M`U;tOY57IDi6uZ0J%x~rOrZXv)Wnk1Vug|nkm+D!!DeKpDP)!?q~xa- d=c$({$fZ_f7MFkw2`)*@EkO6t=62Z}MgS;>R_*`* delta 162 zcmZ2)_t|#CXX(jOG8I7VIQf^1PP$8KPHIW2LSkN}LP1e#MP_kHW?s5Na(-@Zejbp@ zOUq1GNXyJgwNl8-SIEiFOHVCQC@oG+QAjLS$WK#n&QD1V&dV&| Date: Tue, 31 Mar 2020 09:31:17 +0100 Subject: [PATCH 211/714] Revert "Remove redundant installer scripts" This reverts commit 50f879f38a22d042623f1f074d021db985484cdf. --- Src/Install/CodeSnip.iss | 2 ++ Src/Install/Unicode.ps | Bin 0 -> 2723 bytes Src/Install/UpdateIni.ps | Bin 0 -> 3804 bytes 3 files changed, 2 insertions(+) create mode 100644 Src/Install/Unicode.ps create mode 100644 Src/Install/UpdateIni.ps diff --git a/Src/Install/CodeSnip.iss b/Src/Install/CodeSnip.iss index 8dc232070..f01c01f66 100644 --- a/Src/Install/CodeSnip.iss +++ b/Src/Install/CodeSnip.iss @@ -114,6 +114,8 @@ Type: filesandordirs; Name: "{commonappdata}\{#AppPublisher}\{#ProgDataSubDir}" // DataLocations.ps must be declared first #include "DataLocations.ps" #include "VersionInfo.ps" +#include "Unicode.ps" +#include "UpdateIni.ps" #include "UpdateDBase.ps" #include "EventHandlers.ps" diff --git a/Src/Install/Unicode.ps b/Src/Install/Unicode.ps new file mode 100644 index 0000000000000000000000000000000000000000..77c20881aecb5c1d06cbb8a23b1644539436fa54 GIT binary patch literal 2723 zcmb7GZI9YU5dMDB{fCh*642fON2*pLid5hraSI0mQWQl|wAcgQ#@=;z*GEXz|K6Fk zF>o)HYCZtFv-9%IGtc_(%M17cma(+3(76c_20B6*X_Er2*?j#ch7Ozt7b7?{sRh09 zevlu%BRi=!n@)9a2^c4tmeUT2yfxlPwnD)!@Gm|u(uq3>5W&tj|@wOwfw@xi;*bbja0BpLN5H`48Uu4J1%w}shLi!z+Yi%`Fl zHq%yen>pwx5nJ0+(MukW(c>kiSyE!&h2?vpq69B58r5%#gx`piiYQh)_Gk6$S6aj5 zb*C96L_QZ02a_6Ezl8dVYJ8@(Ff-a|x6cr4hM^RRv@~zbiXELGpuNKb%?j+9vQ?`p z$G%Z9_vtiyp!p`QK|kMY(42KIR~$EjOc;@Jm(_iquF*_4{k=oG)ZX=@ZXCgT5Qcbh zc7zW&R4*P$vMCKpA~Fiwg@G`UWMG*|#|;mEe>xqXVPBQ`zmXp#+G5e!m-&9QDPWv> zVXc6CKBp7U|DBajz7UK=Dv}Noqem@;jnS!>l&yR~RZbZQW5k~IU4WwLi#!`xpqelg zVGQh!ZvvKn!m`rp!F)U-mSjeU807}Rr?Bv&OPwu)Gg<0SCwt5}QtdqsKHU_j8q^MI zIrC&x;qnGfAL=8g25~t?06~|O*5MY-6U#*Fj3F`kS*`5f)9-mMMR}U;E0y=xQpF5D z%BdeoeoT&1!wN4CwMW)Rn@+kU!KIL$9kEWc(0^EtZf<`b4`EGn0ipaoZW~NApLbONz{GC*`dhs=G=|jYhVS=U%|YldrJ}Jl z`0F-4>fZ;dkd{|VG|0ZaBi=aQ9_|6^Rl97r`_hs9HZL0xbBChLAc#Q#P>g(K+Ahp9#jR+t*jOZC^1I`1oNg zQa@H*FuF{i{v2a9=*5tbpgNW@(i;z5w9qLSdWwZTczgy9fOfH4^zNi#UfH}F@j$cD OiPqIeY+qPkUi=HOc{Wo3 literal 0 HcmV?d00001 diff --git a/Src/Install/UpdateIni.ps b/Src/Install/UpdateIni.ps new file mode 100644 index 0000000000000000000000000000000000000000..452dacff13ceb3f0a7b7e953c1fd52a8a3598b7c GIT binary patch literal 3804 zcmb_f+iu%N5Pdh`e;A+-k_?5iT_A0pq=4fKpu!g+wi6UV9#-U1+J@X^cbAscAphPo zOHy9RR*V95fJnT|?97=nXGY(4cW94p=gQHIsckCh#AK4rjV%fHTs{3urk=bZKbPdC zEghLWTwI!eR8a_;)YC$xbfHqIog4;-_X!;)`w5M65|o;1xiXqu&_X!U##5%8w`y8@ znbAV|IlSV?TorOif0~+7p@TCs^+IVfT9WWI_r5wBjmqZq#Ms&Ba&j@kaU*^^Se)QQ zt7dag{gVM5?(hHd>Tv&Xe@GLF6zC5#*Uo6_&#br?Uf3ix*;kWpG5fH6`6k>)@50 zq(z;2xd~)Lcvg2Bs|l`$}DNfQc9s+2qDS^ zRV)gcNsppyxuCCd8QfSo<5D+aa>!JQB~2w2#(4zveRqfdjYjlAiVW~*I=;FY$EXbX z0ug%0U%b?TlXqIBOjk~EVHHE`=imtFDuTbe+w)fkuP@F>YJM@J&LRT5;oke}%Y;r1 zJb;>W#!ck};Dc`@6WlR3NsE$82uQdk9IlW8V&B`_L;Qc&%HnZ%&RA;$hWNTl_=Vk_ z%9>PWHLRJW$J(h|)4qHX3UZD!`qxFqpI2}`q$|1TE{=#>M$ZOsc6aWDMFG%vTDl{; zJ+@XXuk)Mm{0$KzD)>?8Jo(@W+{+r01aK3jRUq8%&J^|0>%2l5 z>;a;g%2Sj-^~Ngc`ezRyed_sG-0nwp95iQsV$QY!u4oXVjNTnKC1wk$GyEUeb}7Cx z3(*aYxQZ3!o={srY4aSw0WBu)6P^c$5!ahcpXK>FeV-85t-~8-5i|FHbtPg=SxG9{gOTGtUqctIZ zEqD-*yw=SK89Nq)NC(;}GCn=RK=E>h!E{9LjVU0%V8RN>57Kc{9lh)3&iItxzN1Qg zJpB0cI&oGrC`hy{E5D?5IwQ)6LkZov5I0)Zv2Jlz&GV2+NRT^+o7tKgpCD#vC7xtm zmd)5$7z-GuG8H^Sr?o=Rc!^aqI15UNJ5Z(;6X-q0D1A~oGYgWDDipY%kZImb#Kw?Hf2S9P&XzgfVux-6H})F@V?sPZqhKzDenH~{!U>Y1PSyQ7D+ z|B@JWJ}`>fcsJX_RM0!HqAalpMdV>c7F1bzuT0HLNmz=SMF5~{ED7;FERV>#uCVqn zoA5@9CNDi$bGQMuOr>+eF4wU~Ph)i9_#bxWN7+VNHv9D<812x*@5c6KUw|Y>ja@UX;})CNXmmBf6~- zGblh8Q_Bth0mOZU-3bTvw^k@Be52e?inHA|lmRh}wZio1_wdO__J-8^*!)hw*VixA z5qW$FxW_+Rx@?eM*Y=P5Byr+6tWo8DL$coS Date: Tue, 31 Mar 2020 09:35:17 +0100 Subject: [PATCH 212/714] Add code to delete program key from common config file --- Src/FirstRun.UConfigFile.pas | 9 +++++++++ Src/FirstRun.UMain.pas | 3 +++ 2 files changed, 12 insertions(+) diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index 9bbeb8046..c37cafb6c 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -137,6 +137,8 @@ TCommonConfigFileUpdater = class(TConfigFileUpdater) /// Deletes program registration information from application /// section. procedure DeleteRegistrationInfo; + /// Deletes program key from application section. + procedure DeleteProgramKey; end; @@ -486,6 +488,13 @@ procedure TUserConfigFileUpdater.UpdateNamespaces; { TCommonConfigFileUpdater } +procedure TCommonConfigFileUpdater.DeleteProgramKey; +begin + if not TFile.Exists(CfgFileName, False) then + CreateNewFile; + DeleteIniKey('Application', 'Key', CfgFileName); +end; + procedure TCommonConfigFileUpdater.DeleteRegistrationInfo; begin if not TFile.Exists(CfgFileName, False) then diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index 207598baa..69d9536ff 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -245,7 +245,10 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); end; if fCommonConfigFile.FileVer < 7 then + begin fCommonConfigFile.DeleteRegistrationInfo; + fCommonConfigFile.DeleteProgramKey; + end; fUserConfigFile.Stamp; // NOTE: strictly speaking we only need to stamp common config file in From cbea8485f78245a565bc45b1598852f14c295f44 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 09:36:33 +0100 Subject: [PATCH 213/714] Update installer script to stamp common config file with version 7. --- Src/Install/UpdateIni.ps | Bin 3804 -> 3804 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Src/Install/UpdateIni.ps b/Src/Install/UpdateIni.ps index 452dacff13ceb3f0a7b7e953c1fd52a8a3598b7c..8faf54e27997b93a85825b9b48f819b88ad1f4be 100644 GIT binary patch delta 17 Ycmca3dq;Ky6Cb1bWNRLU$;x~?0W~=VVgLXD delta 17 Ycmca3dq;Ky6Cb15WNRLU$;x~?0W~lMVE_OC From b3760282201eb3b913277540960d2a1c7240509f Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 09:41:02 +0100 Subject: [PATCH 214/714] Remove completed TODO --- Src/CodeSnip.todo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index 284b74ab7..d5fe7607d 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -6,5 +6,5 @@ Add a Backup Database task help topics that describes how to backup and restore databases. Then add help link to Res/HTML/dlg-dbupdate-intro-tplt.html} {TODO -cUI : Rationalise use of TFontHelper.SetDefaultFont(s) and .SetDefaultBaseFont(s) methods.} -{TODO -cFirstRun : Update config file versions: common to 7 and user to 16} + {TODO -cPreRelease : Remove -[**dev**] from product and file versions in .vi files before bumping release number} From 18d49e1361815e2565ab9a18135d07d5d4f84cde Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 09:52:00 +0100 Subject: [PATCH 215/714] Updated re removal of program key and change to usage of common config file --- Docs/Design/FileFormats/config.html | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index 773b3f79b..7060014e4 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -84,7 +84,7 @@

    - On earlier versions of CodeSnip the config files were ANSI text files using the system's default encoding. The installer takes care of converting the older ANSI files to Unicode. + On earlier versions of CodeSnip the config files were ANSI text files using the system's default encoding. CodeSnip v4 and the standard edition's installer convert the older ANSI files to Unicode.

    @@ -95,8 +95,12 @@

    Common Config File

    +

    + Note: From CodeSnip v4.16 this file is used only by the installer of the standard edition. The portable edition does not use the file and does not create it. +

    +

    - This file stores information about CodeSnip that is common to all users. The file is named Common.config. The standard version of CodeSnip stores this file in the %ProgramData%\DelphiDabbler\CodeSnip.4 directory, while the portable version stores it in the AppDir sub-directory of the folder where CodeSnip is installed. + The file stores information about the current version of the program. It is named Common.config. The file is stored in the standard edition's %ProgramData%\DelphiDabbler\CodeSnip.4 directory.

    @@ -120,12 +124,6 @@

    -
    - Key (String) -
    -
    - Unique application ID. String of 32 hex digits. -
    Version (String)
    From 9b1bb9e5f71863ba80ae8df0093630972c0eda65 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 10:09:17 +0100 Subject: [PATCH 216/714] Add conditional compilation for how common config file is processed with different program editions Standard version performs as before, but portable version simply deletes common config file if present. --- Src/FirstRun.UConfigFile.pas | 29 +++++++++++++++++++++++++++-- Src/FirstRun.UMain.pas | 7 +++++++ 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index c37cafb6c..2684473c6 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -130,15 +130,26 @@ TCommonConfigFileUpdater = class(TConfigFileUpdater) public /// Stamps config file with current program and file versions. /// - /// Note that the user config file has program version written to + /// + /// Note that the user config file has program version written to /// a different section to common config file, hence need for overridden - /// methods. + /// methods. + /// Does nothing in portable edition. + /// procedure Stamp; override; + {$IFNDEF PORTABLE} /// Deletes program registration information from application /// section. + /// Standard edition only. procedure DeleteRegistrationInfo; /// Deletes program key from application section. + /// Standard edition only. procedure DeleteProgramKey; + {$ELSE} + /// Deletes and common config file + /// Portable edition only + procedure DeleteCfgFile; + {$ENDIF} end; @@ -488,13 +499,24 @@ procedure TUserConfigFileUpdater.UpdateNamespaces; { TCommonConfigFileUpdater } +{$IFDEF PORTABLE} +procedure TCommonConfigFileUpdater.DeleteCfgFile; +begin + if TFile.Exists(CfgFileName, False) then + TFile.Delete(CfgFileName); +end; +{$ENDIF} + +{$IFNDEF PORTABLE} procedure TCommonConfigFileUpdater.DeleteProgramKey; begin if not TFile.Exists(CfgFileName, False) then CreateNewFile; DeleteIniKey('Application', 'Key', CfgFileName); end; +{$ENDIF} +{$IFNDEF PORTABLE} procedure TCommonConfigFileUpdater.DeleteRegistrationInfo; begin if not TFile.Exists(CfgFileName, False) then @@ -502,6 +524,7 @@ procedure TCommonConfigFileUpdater.DeleteRegistrationInfo; DeleteIniKey('Application', 'RegCode', CfgFileName); DeleteIniKey('Application', 'RegName', CfgFileName); end; +{$ENDIF} class function TCommonConfigFileUpdater.GetFileVersion: Integer; begin @@ -510,10 +533,12 @@ class function TCommonConfigFileUpdater.GetFileVersion: Integer; procedure TCommonConfigFileUpdater.Stamp; begin + {$IFNDEF PORTABLE} inherited; SetIniString( 'Application', 'Version', TAppInfo.ProgramReleaseVersion, CfgFileName ); + {$ENDIF} end; end. diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index 69d9536ff..abc0c930b 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -246,15 +246,22 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); if fCommonConfigFile.FileVer < 7 then begin + {$IFNDEF PORTABLE} fCommonConfigFile.DeleteRegistrationInfo; fCommonConfigFile.DeleteProgramKey; + {$ENDIF} end; fUserConfigFile.Stamp; + + {$IFNDEF PORTABLE} // NOTE: strictly speaking we only need to stamp common config file in // portable version. Installer does this in normal version. However, it does // no harm to stamp this file twice - belt and braces! fCommonConfigFile.Stamp; + {$ELSE} + fCommonConfigFile.DeleteCfgFile; + {$ENDIF} end; { TFirstRunMgr } From 44b827d647a14690f30af5cea62104920f369d36 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 10:10:33 +0100 Subject: [PATCH 217/714] Changed position of some conditional compile directives --- Src/FirstRun.UMain.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index abc0c930b..24995329b 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -244,13 +244,13 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); fUserConfigFile.DeleteProxyServerSection; end; + {$IFNDEF PORTABLE} if fCommonConfigFile.FileVer < 7 then begin - {$IFNDEF PORTABLE} fCommonConfigFile.DeleteRegistrationInfo; fCommonConfigFile.DeleteProgramKey; - {$ENDIF} end; + {$ENDIF} fUserConfigFile.Stamp; From 4c74dc1a1af1d008f6b9fa9146b757bbd4c76daa Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 11:00:49 +0100 Subject: [PATCH 218/714] Remove support for multiple config files - only use per user config file now --- Src/USettings.pas | 115 +++++++++------------------------------------- 1 file changed, 22 insertions(+), 93 deletions(-) diff --git a/Src/USettings.pas b/Src/USettings.pas index a7e828b39..ae2e2e5ca 100644 --- a/Src/USettings.pas +++ b/Src/USettings.pas @@ -160,19 +160,8 @@ interface property ItemCount: Integer read GetItemCount; end; -type - /// - /// Enumeration of the different storage locations that can store - /// settings. - /// - ssUser - Storage for per-user settings. - /// - ssCommon - Storage for common (application-wde) settings. - /// - TSettingsStorageId = (ssUser, ssCommon); - type - { TODO -cSettings: Investigate why ssApplication section no longer used. - Update below and in docs once found out. } /// /// Enumeration of recognised sections within persistent storage. /// @@ -180,7 +169,6 @@ interface /// -ssFindCompiler - info about last compiler search /// -ssFindXRefs - info about last XRef search /// -ssCompilerInfo - info about each supported compiler - /// -ssApplication - info about the application /// -ssPreferences - info about program preferences /// -ssUserInfo - info about user /// -ssUnits - list of default units @@ -193,7 +181,7 @@ interface /// -ssUpdateChecks - info about update checks /// TSettingsSectionId = ( - ssFindText, ssFindCompiler, ssFindXRefs, ssCompilerInfo, ssApplication, + ssFindText, ssFindCompiler, ssFindXRefs, ssCompilerInfo, ssPreferences, ssUserInfo, ssUnits, ssDuplicateSnippet, ssFavourites, ssWindowState, ssDatabase ); @@ -241,42 +229,32 @@ implementation uses // Delphi - Classes, IniFiles, IOUtils, + Classes, + IniFiles, + IOUtils, // Project - UAppInfo, UEncryptor, UExceptions, UHexUtils, UIOUtils, UStrUtils; + UAppInfo, + UEncryptor, + UHexUtils, + UIOUtils, + UStrUtils; var // Private global variable: stores reference to settings singleton object pvtSettings: ISettings = nil; - type - /// Base class for all settings classes, regardless of storage - /// medium used. - TSettingsBase = class(TInterfacedObject) - strict protected - /// Determines and returns identifier of the storage entity on - /// which a section is stored. - /// TSettingsSectionId [in] Id of section. - /// Id of required storage. - function SectionStorage(const Section: TSettingsSectionId): - TSettingsStorageId; - end; - -type - /// Base class for all settings classes that use ini files for - /// persisent storage. + /// Base class for all settings classes that use setting ini file + /// for persisent storage. /// Implements core ini file functionality. - TIniSettingsBase = class(TSettingsBase) + TIniSettingsBase = class(TInterfacedObject) strict protected - /// Maps the given storage id to the storage file name. - function StorageName(const Storage: TSettingsStorageId): string; - /// Creates and returns a TIniFile instance onto the ini file - /// for the given storage id. + /// Creates and returns a TIniFile instance onto the settings ini + /// file. /// The caller is responsible for freeing the returned instance. /// - function CreateIniFile(const Storage: TSettingsStorageId): TIniFile; + function CreateIniFile: TIniFile; public /// Constructs new object instance. constructor Create; @@ -348,8 +326,6 @@ TIniSettingsSection = class(TIniSettingsBase, ISettingsSection) var /// Name of section. fSectionName: string; - /// Id of storage to be used. - fStorage: TSettingsStorageId; /// Stores section's data as name=value pairs. fValues: TStringList; @@ -374,10 +350,7 @@ TIniSettingsSection = class(TIniSettingsBase, ISettingsSection) /// Construct a new object instance that encapsulates an empty /// section. /// string [in] Name of section in ini file. - /// TSettingsStorageId [in] Identifies the storage - /// (i.e. ini file) to be used. - constructor Create(const Section: string; - const Storage: TSettingsStorageId); + constructor Create(const Section: string); /// Destroys object instance. destructor Destroy; override; @@ -541,30 +514,6 @@ function Settings: ISettings; Result := pvtSettings; end; -{ TSettingsBase } - -function TSettingsBase.SectionStorage( - const Section: TSettingsSectionId): TSettingsStorageId; -const - // Map of known sections onto storage that contains them - cSectionStorageMap: array[TSettingsSectionId] of TSettingsStorageId = ( - ssUser, // ssFindText - ssUser, // ssFindCompiler - ssUser, // ssFindXRefs - ssUser, // ssCompilerInfo - ssCommon, // ssApplication - ssUser, // ssPreferences - ssUser, // ssUserInfo - ssUser, // ssUnits - ssUser, // ssDuplicateSnippet - ssUser, // ssFavourites - ssUser, // ssWindowState - ssUser // ssDatabase - ); -begin - Result := cSectionStorageMap[Section]; -end; - { TIniSettingsBase } constructor TIniSettingsBase.Create; @@ -575,40 +524,23 @@ constructor TIniSettingsBase.Create; TDirectory.CreateDirectory(TAppInfo.CommonAppDir); end; -function TIniSettingsBase.CreateIniFile( - const Storage: TSettingsStorageId): TIniFile; +function TIniSettingsBase.CreateIniFile: TIniFile; var FileName: string; // name if ini file begin - FileName := StorageName(Storage); + FileName := TAppInfo.UserConfigFileName; if not TFile.Exists(FileName, False) then // create empty Unicode text file with BOM to force Win API to write Unicode TFileIO.WriteAllText(FileName, '', TEncoding.Unicode, True); Result := TIniFile.Create(FileName); end; -function TIniSettingsBase.StorageName( - const Storage: TSettingsStorageId): string; -begin - case Storage of - ssUser: - Result := TAppInfo.UserConfigFileName; - ssCommon: - Result := TAppInfo.AppConfigFileName; - else - raise EBug.Create(ClassName + '.StorageName: unknown storage type'); - end; -end; - { TIniSettings } function TIniSettings.CreateSection(const SectionID: TSettingsSectionId; const SubSection: string): ISettingsSection; begin - Result := TIniSettingsSection.Create( - SectionName(SectionID, SubSection), - SectionStorage(SectionID) - ); + Result := TIniSettingsSection.Create(SectionName(SectionID, SubSection)); end; function TIniSettings.EmptySection(const Section: TSettingsSectionId; @@ -633,7 +565,6 @@ function TIniSettings.SectionName(const Id: TSettingsSectionId; 'FindCompiler', // ssFindCompiler 'FindXRefs', // ssFindXRefs 'Cmp', // ssCompilerInfo - 'Application', // ssApplication 'Prefs', // ssPreferences 'UserInfo', // ssUserInfo 'UnitList', // ssUnits @@ -655,13 +586,11 @@ procedure TIniSettingsSection.ClearItems; fValues.Clear; end; -constructor TIniSettingsSection.Create(const Section: string; - const Storage: TSettingsStorageId); +constructor TIniSettingsSection.Create(const Section: string); begin inherited Create; fValues := TStringList.Create; fSectionName := Section; - fStorage := Storage; end; procedure TIniSettingsSection.DeleteItem(const Name: string); @@ -759,7 +688,7 @@ function TIniSettingsSection.ItemExists(const Name: string): Boolean; procedure TIniSettingsSection.Load; begin // Read all values from section in app's ini file to data item storage - with CreateIniFile(fStorage) do + with CreateIniFile do try ReadSectionValues(fSectionName, fValues); finally @@ -788,7 +717,7 @@ procedure TIniSettingsSection.Save; Idx: Integer; // loops thru all data items in section begin // Open application's ini file - with CreateIniFile(fStorage) do + with CreateIniFile do try // Delete any existing section with same name EraseSection(fSectionName); From 65a52845f3045147d6534bbef0078ea0a26e191c Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 11:11:47 +0100 Subject: [PATCH 219/714] Remove support for reading and writing encrypted strings in settings --- Src/USettings.pas | 53 ----------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/Src/USettings.pas b/Src/USettings.pas index ae2e2e5ca..f5e3d1e73 100644 --- a/Src/USettings.pas +++ b/Src/USettings.pas @@ -119,19 +119,6 @@ interface /// regardless of locale. procedure SetDateTime(const Name: string; const Value: TDateTime); - /// Gets a named encrypted string value from settings and - /// unencrypts it. - /// string [in] Name of value. - /// string. The unencrypted string. - function GetEncryptedString(const Name: string): string; - - /// Encrypts and records a named string value in settings. - /// - /// string [in] Name of value. - /// string [in] Value to be encrypted and recored. - /// - procedure SetEncryptedString(const Name, Value: string); - /// Gets a list of related string values from the section. /// /// string [in] Name of an integer value that @@ -234,7 +221,6 @@ implementation IOUtils, // Project UAppInfo, - UEncryptor, UHexUtils, UIOUtils, UStrUtils; @@ -465,21 +451,6 @@ TIniSettingsSection = class(TIniSettingsBase, ISettingsSection) /// procedure SetDateTime(const Name: string; const Value: TDateTime); - /// Gets a named encrypted string value from settings and - /// unencrypts it. - /// string [in] Name of value. - /// string. The unencrypted string. - /// Method of ISettingsSection. - function GetEncryptedString(const Name: string): string; - - /// Encrypts and records a named string value in settings. - /// - /// string [in] Name of value. - /// string [in] Value to be encrypted and recored. - /// - /// Method of ISettingsSection. - procedure SetEncryptedString(const Name, Value: string); - /// Gets a list of related string values from the section. /// /// string [in] Name of an integer value that @@ -608,17 +579,6 @@ destructor TIniSettingsSection.Destroy; inherited; end; -function TIniSettingsSection.GetEncryptedString(const Name: string): string; -var - EncryptedBytes: TBytes; // encrypted value as array of bytes -begin - // NOTE: - // See SetEncryptedString for details of how encrypted values are stored. - if not TryHexToBytes(GetItemValue(Name), EncryptedBytes) then - Exit(''); - Result := TEncoding.UTF8.GetString(TEncryptor.Decrypt(EncryptedBytes)); -end; - function TIniSettingsSection.GetBoolean(const Name: string; const Default: Boolean): Boolean; var @@ -746,19 +706,6 @@ procedure TIniSettingsSection.SetDateTime(const Name: string; SetItemValue(Name, FormatDateTime('yyyy"-"mm"-"dd" "hh":"nn":"ss', Value)); end; -procedure TIniSettingsSection.SetEncryptedString(const Name, Value: string); -begin - // NOTE: - // Encrypted values are stored as follows: - // 1: Unicode Value string is converted to an array of UTF-8 encoded bytes - // 2: The UTF-8 byte array is encrypted into another array of bytes - // 3: The encrypted byte array is converted to hexadecimal - // 4: The hexadecimal character string is stored in storage - SetItemValue( - Name, BytesToHex(TEncryptor.Encrypt(TEncoding.UTF8.GetBytes(Value))) - ); -end; - procedure TIniSettingsSection.SetFloat(const Name: string; const Value: Double); begin SetItemValue(Name, FloatToStr(Value)); From ff3728e93a9a0abe637d236f887f53869e296526 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 11:14:26 +0100 Subject: [PATCH 220/714] Remove redundant UEncryptor and 3rd party UEncrypt units from project --- Src/3rdParty/UEncrypt.pas | 158 -------------------------------------- Src/CodeSnip.dpr | 2 - Src/CodeSnip.dproj | 2 - Src/UEncryptor.pas | 122 ----------------------------- 4 files changed, 284 deletions(-) delete mode 100644 Src/3rdParty/UEncrypt.pas delete mode 100644 Src/UEncryptor.pas diff --git a/Src/3rdParty/UEncrypt.pas b/Src/3rdParty/UEncrypt.pas deleted file mode 100644 index dab3f3f0e..000000000 --- a/Src/3rdParty/UEncrypt.pas +++ /dev/null @@ -1,158 +0,0 @@ -{ - * Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ - * - * Sourced from: http://www.swissdelphicenter.ch/torry/showcode.php?id=1243 - * Author: Steve Schafer - * Homepage: http://www.teamb.com - * - * Added to CodeSnip project SVN Repo on 11 Aug 2009 at r165 and since modified. - * See logs in SVN repository for details. - * - * $Rev$ - * $Date$ -} - -unit UEncrypt; - -interface - -function Decrypt(const S: RawByteString; Key: Word): RawByteString; -function Encrypt(const S: RawByteString; Key: Word): RawByteString; - -implementation - -const - C1 = 52845; - C2 = 22719; - -function Decode(const S: RawByteString): RawByteString; -const - Map: array[AnsiChar] of Byte = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 63, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0); -var - I: LongInt; -begin - case Length(S) of - 2: - begin - I := Map[S[1]] + (Map[S[2]] shl 6); - SetLength(Result, 1); - Move(I, Result[1], Length(Result)) - end; - 3: - begin - I := Map[S[1]] + (Map[S[2]] shl 6) + (Map[S[3]] shl 12); - SetLength(Result, 2); - Move(I, Result[1], Length(Result)) - end; - 4: - begin - I := Map[S[1]] + (Map[S[2]] shl 6) + (Map[S[3]] shl 12) + - (Map[S[4]] shl 18); - SetLength(Result, 3); - Move(I, Result[1], Length(Result)) - end - end -end; - -function PreProcess(const S: RawByteString): RawByteString; -var - SS: RawByteString; -begin - SS := S; - Result := ''; - while SS <> '' do - begin - Result := Result + Decode(Copy(SS, 1, 4)); - Delete(SS, 1, 4) - end -end; - -function InternalDecrypt(const S: RawByteString; Key: Word): RawByteString; -var - I: Word; - Seed: Word; -begin - Result := S; - Seed := Key; - for I := 1 to Length(Result) do - begin - Result[I] := AnsiChar(Byte(Result[I]) xor (Seed shr 8)); - Seed := (Byte(S[I]) + Seed) * Word(C1) + Word(C2) - end -end; - -function Decrypt(const S: RawByteString; Key: Word): RawByteString; -begin - Result := InternalDecrypt(PreProcess(S), Key) -end; - -function Encode(const S: RawByteString): RawByteString; -const - Map: array[0..63] of AnsiChar = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + - 'abcdefghijklmnopqrstuvwxyz0123456789+/'; -var - I: LongInt; -begin - I := 0; - Move(S[1], I, Length(S)); - case Length(S) of - 1: - Result := Map[I mod 64] + Map[(I shr 6) mod 64]; - 2: - Result := Map[I mod 64] + Map[(I shr 6) mod 64] + - Map[(I shr 12) mod 64]; - 3: - Result := Map[I mod 64] + Map[(I shr 6) mod 64] + - Map[(I shr 12) mod 64] + Map[(I shr 18) mod 64] - end -end; - -function PostProcess(const S: RawByteString): RawByteString; -var - SS: RawByteString; -begin - SS := S; - Result := ''; - while SS <> '' do - begin - Result := Result + Encode(Copy(SS, 1, 3)); - Delete(SS, 1, 3) - end -end; - -function InternalEncrypt(const S: RawByteString; Key: Word): RawByteString; -var - I: Word; - Seed: Word; -begin - Result := S; - Seed := Key; - for I := 1 to Length(Result) do - begin - Result[I] := AnsiChar(Byte(Result[I]) xor (Seed shr 8)); - Seed := (Byte(Result[I]) + Seed) * Word(C1) + Word(C2) - end -end; - -function Encrypt(const S: RawByteString; Key: Word): RawByteString; -begin - Result := PostProcess(InternalEncrypt(S, Key)) -end; - -end. - diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index ef97c555e..b7bca9c88 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -41,7 +41,6 @@ uses PJSysInfo in '3rdParty\PJSysInfo.pas', PJVersionInfo in '3rdParty\PJVersionInfo.pas', PJWdwState in '3rdParty\PJWdwState.pas', - UEncrypt in '3rdParty\UEncrypt.pas', IntfExternalObj in 'AutoGen\IntfExternalObj.pas', ActiveText.UHTMLRenderer in 'ActiveText.UHTMLRenderer.pas', ActiveText.UMain in 'ActiveText.UMain.pas', @@ -232,7 +231,6 @@ uses UEditSnippetAction in 'UEditSnippetAction.pas', UEmailHelper in 'UEmailHelper.pas', UEncodings in 'UEncodings.pas', - UEncryptor in 'UEncryptor.pas', UExceptions in 'UExceptions.pas', UExeFileType in 'UExeFileType.pas', UFileProtocol in 'UFileProtocol.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index adbd42542..6f7b40643 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -44,7 +44,6 @@ - @@ -429,7 +428,6 @@ - diff --git a/Src/UEncryptor.pas b/Src/UEncryptor.pas deleted file mode 100644 index 5cb711e7a..000000000 --- a/Src/UEncryptor.pas +++ /dev/null @@ -1,122 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2010-2020, Peter Johnson (gravatar.com/delphidabbler). - * - * Static class that encrypts and decrypts binary data. Acts as a facade to the - * actual encryption engine. - * - * All code that requires encryption should use this class rather than making - * calls the the actual the encryption engine. -} - - -unit UEncryptor; - - -interface - - -uses - // Delphi - SysUtils, - // Project - UBaseObjects; - - -type - - { - TEncryptor: - Static class that encrypts and decrypts binary data. Acts as a facade to the - actual encryption engine. - } - TEncryptor = class(TNoConstructObject) - strict private - const cEncryptKey = 46723; // Key used for encryption / decryption - class function BytesToRawString(const Bytes: TBytes): RawByteString; - {Copies the bytes from a byte array into a raw byte string. - @param Bytes [in] Bytes to be copied. - @return Raw byte string containing bytes. - } - class function RawStringToBytes(const Str: RawByteString): TBytes; - {Copies the bytes from a raw byte string into a byte array. - @param Str [in] Raw byte string to be copied. - @return Byte array containing bytes from string. - } - public - class function Encrypt(const Bytes: TBytes): TBytes; - {Encrypts data from a byte array. - @param Bytes [in] Array of bytes to be encrypted. - @return Byte array containing encrypted data. - } - class function Decrypt(const Bytes: TBytes): TBytes; - {Decrypts data from a byte array. - @param Bytes [in] Array of encrypted bytes to be decrypted. - @return Byte array containing decrypted data. - } - end; - - -implementation - - -uses - // 3rd party - UEncrypt; - - -{ TEncryptor } - -class function TEncryptor.BytesToRawString(const Bytes: TBytes): RawByteString; - {Copies the bytes from a byte array into a raw byte string. - @param Bytes [in] Bytes to be copied. - @return Raw byte string containing bytes. - } -begin - SetLength(Result, Length(Bytes)); - if Length(Bytes) > 0 then - Move(Bytes[0], Result[1], Length(Bytes)); -end; - -class function TEncryptor.Decrypt(const Bytes: TBytes): TBytes; - {Decrypts data from a byte array. - @param Bytes [in] Array of encrypted bytes to be decrypted. - @return Byte array containing decrypted data. - } -begin - Result := RawStringToBytes( - UEncrypt.Decrypt( - BytesToRawString(Bytes), cEncryptKey - ) - ); -end; - -class function TEncryptor.Encrypt(const Bytes: TBytes): TBytes; - {Encrypts data from a byte array. - @param Bytes [in] Array of bytes to be encrypted. - @return Byte array containing encrypted data. - } -begin - Result := RawStringToBytes( - UEncrypt.Encrypt( - BytesToRawString(Bytes), cEncryptKey - ) - ); -end; - -class function TEncryptor.RawStringToBytes(const Str: RawByteString): TBytes; - {Copies the bytes from a raw byte string into a byte array. - @param Str [in] Raw byte string to be copied. - @return Byte array containing bytes from string. - } -begin - SetLength(Result, Length(Str)); - if Length(Str) > 0 then - Move(Str[1], Result[0], Length(Str)); -end; - -end. - From 880704b7f567a1b16fc41f13481d8404eb63cfbb Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 11:14:57 +0100 Subject: [PATCH 221/714] Remove credit for encryption code from About box --- Src/Res/HTML/dlg-about-program-tplt.html | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Src/Res/HTML/dlg-about-program-tplt.html b/Src/Res/HTML/dlg-about-program-tplt.html index b661464ec..c26bc3091 100644 --- a/Src/Res/HTML/dlg-about-program-tplt.html +++ b/Src/Res/HTML/dlg-about-program-tplt.html @@ -119,13 +119,6 @@ -
  • - Thanks to Steve Schafer of TeamB for the code on which the program's encryption support is - based. -
  • CodeSnip was developed and built using Embarcadero Delphi® XE. From c2c412a1dcf1438d78adccd19a468de9601ad854 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 11:15:33 +0100 Subject: [PATCH 222/714] Remove credit for encryption code from license --- Docs/License.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Docs/License.html b/Docs/License.html index 194c44534..52878d3b6 100644 --- a/Docs/License.html +++ b/Docs/License.html @@ -1826,12 +1826,6 @@

    are willingly made:

  • -
    -

    - [UserInfo] section -

    - -

    - Stores personal information about the user. -

    - -

    - Name / Value pairs: -

    - -
    -
    - Name (String) -
    -
    - User's name. -
    -
    - Email (String) -
    -
    - User's email address. -
    -
    -
    -

    [WindowState:XXX] sections

    From fe28a187ea36ac3d2898760a0f8a0bf26a644530 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 11:54:05 +0100 Subject: [PATCH 226/714] Add documentation of UnitList settings section omitted from earlier versions of document in error. --- Docs/Design/FileFormats/config.html | 80 ++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index 503ac618e..3ccc61718 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -315,7 +315,7 @@

    - Once entry for each search directory configured for the compiler where XXX ranges from 0 to SearchDirCount - 1. + One entry for each search directory configured for the compiler where XXX ranges from 0 to SearchDirCount - 1.
    Each entry contains a fully specified directory path. @@ -1230,6 +1230,84 @@

    +

    + [UnitList] section +

    + +

    + Records the names of the units that appear in the Units check box list on the References tab of the Edit Snippet dialoogue box. +

    + +

    + Name / Value pairs: +

    + +
    +
    + Count (Integer) +
    +
    + The number of units in the list. +
    +
    + UnitXXX (String) +
    +
    + One entry for each unit, where XXX range from 0 to Count - 1. +
    +
    + +

    + Note that some "reserved" unit names that always appear in the list box are not recorded in settings. They are: +

    + +
      +
    • + SysUtils +
    • +
    • + Classes +
    • +
    • + Windows +
    • +
    • + Graphics +
    • +
    + +

    + If this section is missing or has no units listed then CodeSnip defaults to using the following units in addition to the "reserved" units: +

    + +
      +
    • + Controls +
    • +
    • + Messages +
    • +
    • + Types +
    • +
    • + ShlObj +
    • +
    • + ShellAPI +
    • +
    • + ActiveX +
    • +
    • + Math +
    • +
    + +

    + These default unit names will be included in this section the first time it is written. +

    +

    [UpdateChecks] section From 3f190e40fecaf52c9aa6def7b8d6daec201f0b74 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 21:01:40 +0100 Subject: [PATCH 227/714] Add code to removed redundant Prefs:Updating section from config file in first run code --- Src/FirstRun.UConfigFile.pas | 9 +++++++++ Src/FirstRun.UMain.pas | 1 + 2 files changed, 10 insertions(+) diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index 2684473c6..23a508f29 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -96,6 +96,8 @@ TUserConfigFileUpdater = class(TConfigFileUpdater) procedure DeleteProxyServerSection; /// Deletes unused Prefs:News section. procedure DeleteNewsPrefs; + /// Deletes unused Prefs:Updating section. + procedure DeleteUpdatingPrefs; /// Effectively renames MainWindow section used prior to version /// 11 as WindowState:MainForm. procedure RenameMainWindowSection; @@ -312,6 +314,13 @@ procedure TUserConfigFileUpdater.DeleteProxyServerSection; DeleteIniSection('ProxyServer', CfgFileName); end; +procedure TUserConfigFileUpdater.DeleteUpdatingPrefs; +begin + if not TFile.Exists(CfgFileName, False) then + CreateNewFile; + DeleteIniSection('Prefs:Updating', CfgFileName); +end; + class function TUserConfigFileUpdater.GetFileVersion: Integer; begin Result := FileVersion; diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index 24995329b..139e1cc56 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -242,6 +242,7 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); begin fUserConfigFile.DeleteNewsPrefs; fUserConfigFile.DeleteProxyServerSection; + fUserConfigFile.DeleteUpdatingPrefs; end; {$IFNDEF PORTABLE} From ab3a70e1f935a3031c443c51e4edcd0e43b6d8a9 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 21:05:23 +0100 Subject: [PATCH 228/714] Remove documentation of deleted Prefs:Updating settings section. --- Docs/Design/FileFormats/config.html | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index 3ccc61718..c1f4455a3 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -1151,35 +1151,6 @@

    -
    -

    - [Prefs:Updating] section -

    - -

    - Stores preferences relating to updating CodeSnip and the local copy of the online database. -

    - -

    - Name / Value pairs: -

    - -
    -
    - AutoCheckProgramFrequency (Integer) -
    -
    - Specifies frequency, in days, with which CodeSnip automatically checks online for program updates. A value of 0 indicates that CodeSnip will not check for program updates automatically. -
    -
    - AutoCheckDatabaseFrequency (Integer) -
    -
    - Specifies frequency, in days, with which CodeSnip automatically checks online for database updates. A value of 0 indicates that CodeSnip will not check for database updates automatically. -
    -
    -
    -

    [ProxyServer] section From 0148414a61c47bd446f80172d54adf9355006d08 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 21:11:19 +0100 Subject: [PATCH 229/714] Remove documentation of deleted ProxyServer setting section. --- Docs/Design/FileFormats/config.html | 50 ----------------------------- 1 file changed, 50 deletions(-) diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index c1f4455a3..6751b7b33 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -1151,56 +1151,6 @@

    -
    -

    - [ProxyServer] section -

    - -

    - Stores information about any proxy internet server that is to be used. -

    - -

    - Name / Value pairs: -

    - -
    -
    - UseProxy (Boolean) -
    -
    - Flag that indicates whether to use a proxy server or not. If false the remaining name / value pairs in this section are ignored. -
    -
    - IPAddress (String) -
    -
    - IP address of proxy server in dotted quad format, e.g. 127.0.0.1. -
    -
    - Port (Integer) -
    -
    - Port on which to access proxy server. -
    -
    - UserName (String) -
    -
    - Username for proxy server access. Empty if server doesn't require a user - name. -
    -
    - Password (String) -
    -
    - Encrypted form of any password required to access proxy server. Empty if no - password is required. This value is a hex representation of the bytes of - the encrypted password. -
    -
    -
    -

    [UnitList] section

    From 9feac4adb878236031a327e7f6997002ad9ce67f Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 23:41:15 +0100 Subject: [PATCH 230/714] Add code to remove redundant UpdateChecks section from config file in first run code --- Src/FirstRun.UConfigFile.pas | 2 ++ Src/FirstRun.UMain.pas | 1 + 2 files changed, 3 insertions(+) diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index 23a508f29..038ea165a 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -98,6 +98,8 @@ TUserConfigFileUpdater = class(TConfigFileUpdater) procedure DeleteNewsPrefs; /// Deletes unused Prefs:Updating section. procedure DeleteUpdatingPrefs; + /// Deletes unused UpdateChecks section. + procedure DeleteUpdateChecks; /// Effectively renames MainWindow section used prior to version /// 11 as WindowState:MainForm. procedure RenameMainWindowSection; diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index 139e1cc56..be96f3621 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -243,6 +243,7 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); fUserConfigFile.DeleteNewsPrefs; fUserConfigFile.DeleteProxyServerSection; fUserConfigFile.DeleteUpdatingPrefs; + fUserConfigFile.DeleteUpdateChecks; end; {$IFNDEF PORTABLE} From d372197c91cc667d9cd6c78e50deaaabdb6b6782 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 23:42:50 +0100 Subject: [PATCH 231/714] Remove documentation of deleted UpdateChecks settings section. --- Docs/Design/FileFormats/config.html | 33 ----------------------------- 1 file changed, 33 deletions(-) diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index 6751b7b33..a61ee4659 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -1229,39 +1229,6 @@

    These default unit names will be included in this section the first time it is written.

    -
    -

    - [UpdateChecks] section -

    - -

    - Records date of last (automatic) update checks for different items. These - values are used to determine when to perform the next check. (Checks are made - within a fixed interval of the preceding check). -

    - -

    - Name / Value pairs: -

    - -
    -
    - LastProgramCheck (Date-Time) -
    -
    - Date (in GMT) that the program last checked to see if a new version of - CodeSnip is available. -
    -
    - LastDatabaseCheck (Date-Time) -
    -
    - Date (in GMT) that the program last checked to see if the online version of - the Code Snippets Database had been updated. -
    -
    -
    -

    [WindowState:XXX] sections

    From 6384bbc3c4026b6879f874d65f9a815f05aa5ad7 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 23:56:41 +0100 Subject: [PATCH 232/714] Added implementation of method left out from commit 9feac4a This corrects an error - only method prototype was added in the earlier commit --- Src/FirstRun.UConfigFile.pas | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index 038ea165a..edca9f2d1 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -316,6 +316,13 @@ procedure TUserConfigFileUpdater.DeleteProxyServerSection; DeleteIniSection('ProxyServer', CfgFileName); end; +procedure TUserConfigFileUpdater.DeleteUpdateChecks; +begin + if not TFile.Exists(CfgFileName, False) then + CreateNewFile; + DeleteIniSection('UpdateChecks', CfgFileName); +end; + procedure TUserConfigFileUpdater.DeleteUpdatingPrefs; begin if not TFile.Exists(CfgFileName, False) then From 4f02d2c233aea6d0e2d844055cb54b4a24cee252 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 31 Mar 2020 23:59:20 +0100 Subject: [PATCH 233/714] Modify some comments --- Src/FirstRun.UConfigFile.pas | 8 ++++++-- Src/FirstRun.UMain.pas | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index edca9f2d1..cb6693f6a 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -60,7 +60,7 @@ TConfigFileUpdater = class abstract(TObject) /// Checks if program version in config file is same as current /// program version. function IsCurrentProgramVer: Boolean; overload; - /// Stamps config file with current and file version. + /// Stamps config file with current file version. procedure Stamp; virtual; end; @@ -82,14 +82,18 @@ TUserConfigFileUpdater = class(TConfigFileUpdater) {$IFNDEF PORTABLE} /// Updates config file currently in original (pre v1.9) format to /// current format. + /// Standard edition only. procedure UpdateFromOriginal; /// Deletes any highlighter preferences. + /// Standard edition only. procedure DeleteHighligherPrefs; /// Updates Prefs:CodeGen section from format prior to version 9 /// to version 9 and later format. + /// Standard edition only. procedure UpdateCodeGenEntries; /// Deletes unused key that determines detail pane index. /// + /// Standard edition only. procedure DeleteDetailsPaneIndex; {$ENDIF} /// Deletes proxy server section. @@ -151,7 +155,7 @@ TCommonConfigFileUpdater = class(TConfigFileUpdater) procedure DeleteProgramKey; {$ELSE} /// Deletes and common config file - /// Portable edition only + /// Portable edition only. procedure DeleteCfgFile; {$ENDIF} end; diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index be96f3621..92f685ee2 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -247,6 +247,8 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); end; {$IFNDEF PORTABLE} + // No need to delete sections of common config file on portable edition + // because the entire file is deleted below! if fCommonConfigFile.FileVer < 7 then begin fCommonConfigFile.DeleteRegistrationInfo; From 63bf432b108192934a930f43089e85b1cd5fa512 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 00:08:31 +0100 Subject: [PATCH 234/714] Make processing of user config file versions earlier then v9 available in portable edition --- Src/FirstRun.UConfigFile.pas | 8 +------- Src/FirstRun.UMain.pas | 2 -- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index cb6693f6a..09b741e14 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -87,15 +87,13 @@ TUserConfigFileUpdater = class(TConfigFileUpdater) /// Deletes any highlighter preferences. /// Standard edition only. procedure DeleteHighligherPrefs; + {$ENDIF} /// Updates Prefs:CodeGen section from format prior to version 9 /// to version 9 and later format. - /// Standard edition only. procedure UpdateCodeGenEntries; /// Deletes unused key that determines detail pane index. /// - /// Standard edition only. procedure DeleteDetailsPaneIndex; - {$ENDIF} /// Deletes proxy server section. procedure DeleteProxyServerSection; /// Deletes unused Prefs:News section. @@ -288,14 +286,12 @@ procedure TUserConfigFileUpdater.CreateDefaultCodeGenEntries; SetIniString('Prefs:CodeGen', 'Warning7.MinCompiler', '20.00', CfgFileName); end; -{$IFNDEF PORTABLE} procedure TUserConfigFileUpdater.DeleteDetailsPaneIndex; begin if not TFile.Exists(CfgFileName, False) then CreateNewFile; DeleteIniKey('MainWindow', 'DetailTab', CfgFileName); end; -{$ENDIF} {$IFNDEF PORTABLE} procedure TUserConfigFileUpdater.DeleteHighligherPrefs; @@ -398,7 +394,6 @@ procedure TUserConfigFileUpdater.Stamp; ); end; -{$IFNDEF PORTABLE} procedure TUserConfigFileUpdater.UpdateCodeGenEntries; begin // Key that determines if warnings are emitted changes from SwitchOffWarnings @@ -418,7 +413,6 @@ procedure TUserConfigFileUpdater.UpdateCodeGenEntries; else SetIniInt('Prefs:CodeGen', 'EmitWarnDirs', 0, CfgFileName); end; -{$ENDIF} procedure TUserConfigFileUpdater.UpdateFindXRefs; begin diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index 92f685ee2..e18a1ff9d 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -220,13 +220,11 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); // we rely on this for portable version. fUserConfigFile.CreateDefaultCodeGenEntries; - {$IFNDEF PORTABLE} if fUserConfigFile.FileVer < 9 then begin fUserConfigFile.DeleteDetailsPaneIndex; fUserConfigFile.UpdateCodeGenEntries; end; - {$ENDIF} if fUserConfigFile.FileVer < 11 then fUserConfigFile.RenameMainWindowSection; From 3a2a9b2ab500ba4874460d4ea012296dbff20e0f Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 00:13:48 +0100 Subject: [PATCH 235/714] Modify comments re inability to move user database on and record new path in settings on portable edition --- Src/UAppInfo.pas | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Src/UAppInfo.pas b/Src/UAppInfo.pas index e9d1dfa9a..59821a23c 100644 --- a/Src/UAppInfo.pas +++ b/Src/UAppInfo.pas @@ -70,7 +70,10 @@ TAppInfo = class(TNoConstructObject) @return Full path to required directory. } class procedure ChangeUserDataDir(const NewDir: string); - {Changes directory where CodeSnip stores the user's "database" files. + {Changes directory where CodeSnip stores the user's "database" files and + records it in the user config file. + Does nothing on portable edition since it does not permit the user + database to be moved. @param NewDir [in] New directory. } class function AppExeFilePath: string; @@ -156,7 +159,10 @@ class function TAppInfo.AppExeFilePath: string; end; class procedure TAppInfo.ChangeUserDataDir(const NewDir: string); - {Changes directory where CodeSnip stores the user's "database" files. + {Changes directory where CodeSnip stores the user's "database" files and + records it in the user config file. + Does nothing on portable edition since it does not permit the user database + to be moved. @param NewDir [in] New directory. } {$IFNDEF PORTABLE} From 1e9692308ef9b706c9115f0847671737c0ee767d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 00:14:07 +0100 Subject: [PATCH 236/714] Delete completed TODOs --- Src/CodeSnip.todo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index cb24cdb08..e1749ad3c 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,6 +1,6 @@ {TODO -cUI : Remove unused tool bar button in main window} -{TODO -cFirstRun : Delete UpdateChecks section from Config file on first run} -{TODO -cFirstRun : Delete Prefs:Updating section from Config file on first run} + + {TODO -cHelp : Add a Backup Database task help topics that describes how to backup and restore databases. Then add help link to Res/HTML/dlg-dbupdate-intro-tplt.html} From 68f5c9344e4c400313055e40176bcd2b3d22cb5f Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 00:32:27 +0100 Subject: [PATCH 237/714] Remove ability to import user data from TCodeImporter Made minimal changes to calling code to support change in TCodeImporter's interface. --- Src/UCodeImportExport.pas | 32 +++++--------------------------- Src/UCodeImportMgr.pas | 2 +- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/Src/UCodeImportExport.pas b/Src/UCodeImportExport.pas index 1447b5b7b..d9de97a93 100644 --- a/Src/UCodeImportExport.pas +++ b/Src/UCodeImportExport.pas @@ -68,8 +68,6 @@ TCodeImporter = class(TNoPublicConstructObject) strict private /// Version of file being imported. fVersion: Integer; - /// Information about user who created export. - fUserInfo: TUserInfo; /// List of snippets read from XML. fSnippetInfo: TSnippetInfoList; /// Extended XML document object. @@ -91,14 +89,12 @@ TCodeImporter = class(TNoPublicConstructObject) public /// Destroys object. destructor Destroy; override; - /// Imports snippets and optional user data from XML. - /// TUserInfo [out] Receives user information. Set - /// to null if no user information was available. + /// Imports snippets from XML. /// TSnippetInfoList [out] Receives information /// about each imported snippet. /// TBytes [in] Byte array containing XML data. - class procedure ImportData(out UserInfo: TUserInfo; - out SnippetInfo: TSnippetInfoList; const Data: TBytes); + class procedure ImportData(out SnippetInfo: TSnippetInfoList; + const Data: TBytes); end; type @@ -469,7 +465,6 @@ procedure TCodeImporter.Execute(const Data: TBytes); // Error message sParseError = 'Import file has an invalid format'; var - UserNode: IXMLNode; // node containing any user info SnippetNodes: IXMLSimpleNodeList; // list of snippet nodes SnippetNode: IXMLNode; // each snippet node in list Idx: Integer; // loops thru snippet node list @@ -482,21 +477,6 @@ procedure TCodeImporter.Execute(const Data: TBytes); // Validate loaded document and get version number fVersion := ValidateDoc; - // Get user info - UserNode := fXMLDoc.FindNode(cExportRootNode + '\' + cUserInfoNode); - if Assigned(UserNode) then - begin - fUserInfo.Details.Name := TXMLDocHelper.GetSubTagText( - fXMLDoc, UserNode, cUserNameNode - ); - fUserInfo.Details.Email := TXMLDocHelper.GetSubTagText( - fXMLDoc, UserNode, cUserEmailNode - ); - fUserInfo.Comments := TXMLDocHelper.GetSubTagText( - fXMLDoc, UserNode, cUserCommentsNode - ); - end; - // Read in all snippets SnippetNodes := GetAllSnippetNodes; SetLength(fSnippetInfo, SnippetNodes.Count); @@ -574,15 +554,14 @@ function TCodeImporter.GetAllSnippetNodes: IXMLSimpleNodeList; Result := fXMLDoc.FindChildNodes(SnippetsNode, cSnippetNode); end; -class procedure TCodeImporter.ImportData(out UserInfo: TUserInfo; - out SnippetInfo: TSnippetInfoList; const Data: TBytes); +class procedure TCodeImporter.ImportData(out SnippetInfo: TSnippetInfoList; + const Data: TBytes); var Idx: Integer; // loops through all imported snippets begin with InternalCreate do try Execute(Data); - UserInfo.Assign(fUserInfo); SetLength(SnippetInfo, Length(fSnippetInfo)); for Idx := Low(fSnippetInfo) to High(fSnippetInfo) do SnippetInfo[Idx].Assign(fSnippetInfo[Idx]); @@ -599,7 +578,6 @@ constructor TCodeImporter.InternalCreate; fXMLDoc := TXMLDocHelper.CreateXMLDoc; // Initialise fields that receive imported data SetLength(fSnippetInfo, 0); - fUserInfo.Init; end; function TCodeImporter.ValidateDoc: Integer; diff --git a/Src/UCodeImportMgr.pas b/Src/UCodeImportMgr.pas index e437c2a56..0aa8dbc48 100644 --- a/Src/UCodeImportMgr.pas +++ b/Src/UCodeImportMgr.pas @@ -214,7 +214,7 @@ procedure TCodeImportMgr.Import(const FileName: string); fImportInfoList.Clear; try Data := TFileIO.ReadAllBytes(FileName); - TCodeImporter.ImportData(fUserInfo, fSnippetInfoList, Data); + TCodeImporter.ImportData(fSnippetInfoList, Data); except on E: EStreamError do raise ECodeImportMgr.Create(E); From a9512502e70229cc8194d66a3e73f8fea8c3593f Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 00:37:58 +0100 Subject: [PATCH 238/714] Remove ability to export user data from TCodeExporter Made minimal changes to calling code to support change in TCodeExporter's interface. --- Src/FmCodeExportDlg.pas | 4 +--- Src/UCodeImportExport.pas | 43 +++++++-------------------------------- 2 files changed, 8 insertions(+), 39 deletions(-) diff --git a/Src/FmCodeExportDlg.pas b/Src/FmCodeExportDlg.pas index 2ddc89786..e220943ca 100644 --- a/Src/FmCodeExportDlg.pas +++ b/Src/FmCodeExportDlg.pas @@ -230,9 +230,7 @@ procedure TCodeExportDlg.WriteOutputFile; var OutData: TEncodedData; // receives export file content begin - OutData := TCodeExporter.ExportSnippets( - TUserInfo.CreateNul, frmSnippets.SelectedSnippets - ); + OutData := TCodeExporter.ExportSnippets(frmSnippets.SelectedSnippets); TFileIO.WriteAllBytes(StrTrim(edFile.Text), OutData.Data); end; diff --git a/Src/UCodeImportExport.pas b/Src/UCodeImportExport.pas index d9de97a93..031348f1d 100644 --- a/Src/UCodeImportExport.pas +++ b/Src/UCodeImportExport.pas @@ -108,8 +108,6 @@ ECodeImporter = class(ECodeSnipXML); TCodeExporter = class(TNoPublicConstructObject) strict private var - /// User information to be written to XML. - fUserInfo: TUserInfo; /// List of snippets to be exported. fSnippets: TSnippetList; /// Extended XML document object. @@ -135,11 +133,6 @@ TCodeExporter = class(TNoPublicConstructObject) /// IXMLNode [in] Node under which this node is to /// be created. procedure WriteProgInfo(const ParentNode: IXMLNode); - /// Writes a node and sub-nodes containing any information about - /// user who created export file. - /// IXMLNode [in] Node under which user info node - /// is to be written. - procedure WriteUserInfo(const ParentNode: IXMLNode); /// Writes nodes containing details of all exported snippets. /// /// IXMLNode [in] Node under which snippets are to @@ -159,23 +152,17 @@ TCodeExporter = class(TNoPublicConstructObject) function Execute: TEncodedData; /// Constructs and initialises object ready to perform export. /// - /// TUserInfo [in] User information to be exported. - /// Ignored if null. /// TSnippetList [in] List of snippets to be /// exported. - constructor InternalCreate(const UserInfo: TUserInfo; - const SnipList: TSnippetList); + constructor InternalCreate(const SnipList: TSnippetList); public /// Destroys object. destructor Destroy; override; - /// Exports user information and snippets as XML. - /// TUserInfo [in] User information to be exported. - /// Ignored if null. + /// Exports snippets as XML. /// TSnippetList [in] List of snippets to be /// exported. /// TEncodedData. Encoded data containing exported XML. - class function ExportSnippets(const UserInfo: TUserInfo; - const SnipList: TSnippetList): TEncodedData; + class function ExportSnippets(const SnipList: TSnippetList): TEncodedData; end; type @@ -265,8 +252,6 @@ function TCodeExporter.Execute: TEncodedData; // Write document content WriteProgInfo(RootNode); - if not fUserInfo.IsNul then - WriteUserInfo(RootNode); WriteSnippets(RootNode); // Save XML as UTF-8 with no BOM @@ -277,10 +262,10 @@ function TCodeExporter.Execute: TEncodedData; end; end; -class function TCodeExporter.ExportSnippets(const UserInfo: TUserInfo; - const SnipList: TSnippetList): TEncodedData; +class function TCodeExporter.ExportSnippets(const SnipList: TSnippetList): + TEncodedData; begin - with InternalCreate(UserInfo, SnipList) do + with InternalCreate(SnipList) do try Result := Execute; finally @@ -295,12 +280,10 @@ procedure TCodeExporter.HandleException(const EObj: TObject); raise EObj; end; -constructor TCodeExporter.InternalCreate(const UserInfo: TUserInfo; - const SnipList: TSnippetList); +constructor TCodeExporter.InternalCreate(const SnipList: TSnippetList); begin inherited InternalCreate; fSnippets := SnipList; - fUserInfo := UserInfo; end; function TCodeExporter.SnippetNames( @@ -390,18 +373,6 @@ procedure TCodeExporter.WriteSnippets(const ParentNode: IXMLNode); WriteSnippet(Node, Snippet); end; -procedure TCodeExporter.WriteUserInfo(const ParentNode: IXMLNode); -var - UserInfoNode: IXMLNode; // new user info parent node -begin - // Add user info node - UserInfoNode := fXMLDoc.CreateElement(ParentNode, cUserInfoNode); - // Add separate child node for each piece of user info - fXMLDoc.CreateElement(UserInfoNode, cUserNameNode, fUserInfo.Details.Name); - fXMLDoc.CreateElement(UserInfoNode, cUserEmailNode, fUserInfo.Details.Email); - fXMLDoc.CreateElement(UserInfoNode, cUserCommentsNode, fUserInfo.Comments); -end; - { TCodeImporter } destructor TCodeImporter.Destroy; From 49742d6402a60fc514ba3195741f90a6f2c286a8 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 00:51:58 +0100 Subject: [PATCH 239/714] Remove user info page from Code Import wizard dialogue box --- Src/FmCodeImportDlg.dfm | 74 ++++++------------------------- Src/FmCodeImportDlg.pas | 98 +++++++++++++---------------------------- 2 files changed, 45 insertions(+), 127 deletions(-) diff --git a/Src/FmCodeImportDlg.dfm b/Src/FmCodeImportDlg.dfm index ebd03dfba..34cfa4618 100644 --- a/Src/FmCodeImportDlg.dfm +++ b/Src/FmCodeImportDlg.dfm @@ -1,7 +1,7 @@ inherited CodeImportDlg: TCodeImportDlg Caption = 'Import Wizard' ExplicitWidth = 565 - ExplicitHeight = 433 + ExplicitHeight = 436 PixelsPerInch = 96 TextHeight = 13 inherited pnlBody: TPanel @@ -9,11 +9,15 @@ inherited CodeImportDlg: TCodeImportDlg ExplicitHeight = 321 inherited pcWizard: TPageControl Height = 288 - ActivePage = tsUpdate + ActivePage = tsFile ExplicitHeight = 288 object tsInfo: TTabSheet Caption = 'tsInfo' TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblIntro: TLabel Left = 0 Top = 8 @@ -33,7 +37,7 @@ inherited CodeImportDlg: TCodeImportDlg object lblFile: TLabel Left = 0 Top = 8 - Width = 220 + Width = 230 Height = 13 Caption = 'Open import &file: (click button to browse for file)' FocusControl = edFile @@ -41,7 +45,7 @@ inherited CodeImportDlg: TCodeImportDlg object lblLoadFile: TLabel Left = 0 Top = 72 - Width = 172 + Width = 179 Height = 13 Caption = 'Click the Next button to read the file.' end @@ -67,60 +71,6 @@ inherited CodeImportDlg: TCodeImportDlg TabOrder = 1 end end - object tsUserInfo: TTabSheet - Caption = 'tsUserInfo' - ImageIndex = 2 - TabVisible = False - object lblName: TLabel - Left = 0 - Top = 8 - Width = 31 - Height = 13 - Caption = 'Name:' - end - object lblEmail: TLabel - Left = 0 - Top = 45 - Width = 28 - Height = 13 - Caption = 'Email:' - end - object lblComments: TLabel - Left = 0 - Top = 85 - Width = 52 - Height = 13 - Caption = 'Comments:' - end - object edComments: TMemo - Left = 72 - Top = 82 - Width = 297 - Height = 154 - ParentColor = True - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 2 - end - object edName: TEdit - Left = 72 - Top = 3 - Width = 297 - Height = 21 - ParentColor = True - ReadOnly = True - TabOrder = 0 - end - object edEmail: TEdit - Left = 72 - Top = 42 - Width = 297 - Height = 21 - ParentColor = True - ReadOnly = True - TabOrder = 1 - end - end object tsUpdate: TTabSheet Caption = 'tsUpdate' ImageIndex = 3 @@ -128,7 +78,7 @@ inherited CodeImportDlg: TCodeImportDlg object lblImportList: TLabel Left = 0 Top = 53 - Width = 86 + Width = 91 Height = 13 Caption = 'Imported &snippets:' FocusControl = lvImports @@ -136,7 +86,7 @@ inherited CodeImportDlg: TCodeImportDlg object lblSelectedSnippet: TLabel Left = 0 Top = 217 - Width = 82 + Width = 83 Height = 13 Caption = 'S&elected snippet:' FocusControl = edRename @@ -203,6 +153,10 @@ inherited CodeImportDlg: TCodeImportDlg Caption = 'tsFinish' ImageIndex = 5 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblFinish: TLabel Left = 0 Top = 8 diff --git a/Src/FmCodeImportDlg.pas b/Src/FmCodeImportDlg.pas index 786c035ab..475c8c06f 100644 --- a/Src/FmCodeImportDlg.pas +++ b/Src/FmCodeImportDlg.pas @@ -17,9 +17,17 @@ interface uses // Delphi - Classes, ActnList, Controls, ComCtrls, StdCtrls, ExtCtrls, Forms, + Classes, + ActnList, + Controls, + ComCtrls, + StdCtrls, + ExtCtrls, + Forms, // Project - FmWizardDlg, UBaseObjects, UCodeImportMgr; + FmWizardDlg, + UBaseObjects, + UCodeImportMgr; type /// @@ -30,21 +38,14 @@ interface TCodeImportDlg = class(TWizardDlg, INoPublicConstruct) tsInfo: TTabSheet; tsFile: TTabSheet; - tsUserInfo: TTabSheet; tsUpdate: TTabSheet; lblIntro: TLabel; lblFile: TLabel; edFile: TEdit; btnBrowse: TButton; tsFinish: TTabSheet; - lblName: TLabel; - lblEmail: TLabel; - lblComments: TLabel; - edComments: TMemo; lvImports: TListView; lblImportList: TLabel; - edName: TEdit; - edEmail: TEdit; lblLoadFile: TLabel; btnRename: TButton; edRename: TEdit; @@ -71,13 +72,12 @@ TCodeImportDlg = class(TWizardDlg, INoPublicConstruct) strict private const // Indices of wizard pages - cIntroPage = 0; - cFilePage = 1; - cUserInfoPage = 2; // displayed only there is user info - cUpdatePage = 3; - cFinishPage = 4; + cIntroPage = 0; + cFilePage = 1; + cUpdatePage = 2; + cFinishPage = 3; // Index of subitems in list view - cLVActionIdx = 1; + cLVActionIdx = 1; cLVImportName = 0; var /// Reference to import manager object used to perform import @@ -100,8 +100,6 @@ TCodeImportDlg = class(TWizardDlg, INoPublicConstruct) /// error message if not. class procedure CanOpenDialogClose(Sender: TObject; var CanClose: Boolean); - /// Populates controls on user information page. - procedure InitUserInfo; /// Displays current details of all snippets in import file in /// list view on update page. procedure InitImportInfo; @@ -153,14 +151,6 @@ TCodeImportDlg = class(TWizardDlg, INoPublicConstruct) /// Overridden method called from ancestor class. procedure MoveForward(const PageIdx: Integer; var CanMove: Boolean); override; - /// Determines index of page following page indexed by PageIdx. - /// Skips user info page if there is no user info. - /// Overridden method called from ancestor class. - function NextPage(const PageIdx: Integer): Integer; override; - /// Determines index of page preceding page indexed by PageIdx. - /// Skips user info page if there is no user info. - /// Overridden method called from ancestor class. - function PrevPage(const PageIdx: Integer): Integer; override; public /// Displays wizard, passing a reference to import manager object /// to be used for import operations. Returns True if wizard finishes or @@ -175,10 +165,16 @@ implementation uses // Delphi - SysUtils, Dialogs, + SysUtils, + Dialogs, // Project - UCtrlArranger, UExceptions, UMessageBox, UOpenDialogEx, UOpenDialogHelper, - USnippetValidator, UStrUtils; + UCtrlArranger, + UExceptions, + UMessageBox, + UOpenDialogEx, + UOpenDialogHelper, + USnippetValidator, + UStrUtils; {$R *.dfm} @@ -232,21 +228,18 @@ procedure TCodeImportDlg.actRenameUpdate(Sender: TObject); procedure TCodeImportDlg.ArrangeForm; begin TCtrlArranger.SetLabelHeights(Self); + // Arrange controls on tab sheets + // tsInfo - { nothing to do } + // nothing to do + // tsFile TCtrlArranger.AlignVCentres( TCtrlArranger.BottomOf(lblFile, 6), [edFile, btnBrowse] ); lblLoadFile.Top := TCtrlArranger.BottomOf([edFile, btnBrowse], 12); - // tsUserInfo - TCtrlArranger.AlignVCentres(8, [lblName, edName]); - TCtrlArranger.AlignVCentres( - TCtrlArranger.BottomOf([lblName, edName], 8), [lblEmail, edEmail] - ); - lblComments.Top := TCtrlArranger.BottomOf([lblEmail, edEmail], 8); - edComments.Top := lblComments.Top; + // tsUpdate lblImportList.Top := TCtrlArranger.BottomOf(lblModifyInstructions, 8); lvImports.Top := TCtrlArranger.BottomOf(lblImportList, 6); @@ -254,12 +247,13 @@ procedure TCodeImportDlg.ArrangeForm; TCtrlArranger.AlignVCentres( TCtrlArranger.BottomOf(lblSelectedSnippet, 6), [edRename, btnRename] ); + // tsFinish sbFinish.Top := TCtrlArranger.BottomOf(lblFinish, 6); // Size body pnlBody.ClientHeight := TCtrlArranger.MaxContainerHeight( - [tsInfo, tsFile, tsUserInfo, tsUpdate, tsFinish] + [tsInfo, tsFile, tsUpdate, tsFinish] ) + pnlBody.ClientHeight - tsInfo.Height; // Arrange inherited controls and size the form @@ -269,7 +263,6 @@ procedure TCodeImportDlg.ArrangeForm; procedure TCodeImportDlg.BeginPage(const PageIdx: Integer); begin case PageIdx of - cUserInfoPage: InitUserInfo; cUpdatePage: InitImportInfo; cFinishPage: PresentResults; end; @@ -329,14 +322,12 @@ function TCodeImportDlg.HeadingText(const PageIdx: Integer): string; // Page headings sIntroPageheading = 'Import snippets from a file'; sFilePage = 'Choose import file'; - sUserInfoPage = 'User information'; sUpdatePage = 'Edit import and update database'; sFinishPage = 'Import complete'; begin case PageIdx of cIntroPage: Result := sIntroPageheading; cFilePage: Result := sFilePage; - cUserInfoPage: Result := sUserInfoPage; cUpdatePage: Result := sUpdatePage; cFinishPage: Result := sFinishPage; end; @@ -377,13 +368,6 @@ procedure TCodeImportDlg.InitImportInfo; end; end; -procedure TCodeImportDlg.InitUserInfo; -begin - edName.Text := fImportMgr.UserInfo.Details.Name; - edEmail.Text := fImportMgr.UserInfo.Details.Email; - edComments.Text := fImportMgr.UserInfo.Comments; -end; - constructor TCodeImportDlg.InternalCreate(AOwner: TComponent; const ImportMgr: TCodeImportMgr); begin @@ -427,16 +411,6 @@ procedure TCodeImportDlg.MoveForward(const PageIdx: Integer; end; end; -function TCodeImportDlg.NextPage(const PageIdx: Integer): Integer; -begin - case PageIdx of - cFilePage: - if fImportMgr.UserInfo.IsNul then - Exit(cUpdatePage); - end; - Result := inherited NextPage(PageIdx); -end; - procedure TCodeImportDlg.PresentResults; // --------------------------------------------------------------------------- @@ -468,16 +442,6 @@ procedure TCodeImportDlg.PresentResults; end; end; -function TCodeImportDlg.PrevPage(const PageIdx: Integer): Integer; -begin - case PageIdx of - cUpdatePage: - if fImportMgr.UserInfo.IsNul then - Exit(cFilePage); - end; - Result := inherited PrevPage(PageIdx); -end; - procedure TCodeImportDlg.ReadImportFile; begin fImportMgr.Import(GetFileNameFromEditCtrl); From 83f02c75fff0c4130104dd84eacfb6d5e4a5fe65 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 01:05:57 +0100 Subject: [PATCH 240/714] Remove code that renders user info as part of a snippet's Extra property --- Src/UCodeImportMgr.pas | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/Src/UCodeImportMgr.pas b/Src/UCodeImportMgr.pas index 0aa8dbc48..c55eae9ae 100644 --- a/Src/UCodeImportMgr.pas +++ b/Src/UCodeImportMgr.pas @@ -241,7 +241,6 @@ procedure TCodeImportMgr.InitImportInfoList; procedure TCodeImportMgr.UpdateDatabase; - // --------------------------------------------------------------------------- // Adjusts a snippet's dependency list so that main database is searched for a // required snippet if it is not in the user database. procedure AdjustDependsList(const Depends: ISnippetIDList); @@ -261,23 +260,6 @@ procedure TCodeImportMgr.UpdateDatabase; end; end; - /// Builds an active text representation of the contributing user's details. - function UserDetailsActiveText: IActiveText; - resourcestring - // user information prefix text - sContributorPrefix = 'Contributed by:'; - begin - Result := TActiveTextFactory.CreateActiveText; - Result.AddElem(TActiveTextFactory.CreateActionElem(ekPara, fsOpen)); - Result.AddElem( - TActiveTextFactory.CreateTextElem( - sContributorPrefix + ' ' + UserInfo.Details.ToString - ) - ); - Result.AddElem(TActiveTextFactory.CreateActionElem(ekPara, fsClose)); - end; - // --------------------------------------------------------------------------- - var Editor: IDatabaseEdit; // object used to update user database Snippet: TSnippet; // reference any existing snippet to overwrite @@ -298,9 +280,6 @@ procedure TCodeImportMgr.UpdateDatabase; AdjustDependsList(SnippetInfo.Data.Refs.Depends); - if UserInfo.Details.ToString <> '' then - SnippetInfo.Data.Props.Extra.Append(UserDetailsActiveText); - Snippet := Database.Snippets.Find(ImportInfo.ImportAsName, True); if Assigned(Snippet) then // snippet already exists: overwrite it From 4c02432efe7dc441c29fe3f8a0fe2fc49791fe16 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 01:08:55 +0100 Subject: [PATCH 241/714] Remove redundant UserInfo property from TCodeImportMgr. --- Src/UCodeImportMgr.pas | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Src/UCodeImportMgr.pas b/Src/UCodeImportMgr.pas index c55eae9ae..157288382 100644 --- a/Src/UCodeImportMgr.pas +++ b/Src/UCodeImportMgr.pas @@ -94,8 +94,6 @@ TCodeImportMgr = class sealed(TObject) fSnippetInfoList: TSnippetInfoList; /// Value of ImportInfo property. fImportInfoList: TImportInfoList; - /// Value of UserInfo property. - fUserInfo: TUserInfo; /// Initialises import information list with details of snippets /// read from import file. procedure InitImportInfoList; @@ -132,9 +130,6 @@ TCodeImportMgr = class sealed(TObject) /// Any existing snippets with same name as imported snippets are /// overwritten. procedure UpdateDatabase; - /// Information about user who created the import file. - /// May be null if no user info included in import file. - property UserInfo: TUserInfo read fUserInfo; /// List of information describing if and how to import snippets /// in import file. Permits customisation of import. property ImportInfo: TImportInfoList read fImportInfoList; @@ -210,7 +205,6 @@ procedure TCodeImportMgr.Import(const FileName: string); var Data: TBytes; // content of import file as bytes begin - fUserInfo := TUserInfo.CreateNul; fImportInfoList.Clear; try Data := TFileIO.ReadAllBytes(FileName); From 8c21aabc631f84aff7df327428e6705f27c566ec Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 01:16:45 +0100 Subject: [PATCH 242/714] Remove redundant TUserInfo record and unused units. --- Src/UCodeImportExport.pas | 86 +++++++++++---------------------------- 1 file changed, 23 insertions(+), 63 deletions(-) diff --git a/Src/UCodeImportExport.pas b/Src/UCodeImportExport.pas index 031348f1d..862e7ca13 100644 --- a/Src/UCodeImportExport.pas +++ b/Src/UCodeImportExport.pas @@ -5,8 +5,8 @@ * * Copyright (C) 2008-2020, Peter Johnson (gravatar.com/delphidabbler). * - * Implements classes that can import and export user defined snippets and user - * information from and to XML. + * Implements classes that can import and export user defined snippets from and + * to XML. } @@ -18,10 +18,16 @@ interface uses // Delphi - SysUtils, Classes, XMLIntf, + SysUtils, + Classes, + XMLIntf, // Project - DB.USnippet, UBaseObjects, UEncodings, UExceptions, UIStringList, - UUserDetails, UXMLDocHelper, UXMLDocumentEx; + DB.USnippet, + UBaseObjects, + UEncodings, + UIStringList, + UXMLDocHelper, + UXMLDocumentEx; type @@ -43,27 +49,7 @@ TSnippetInfo = record TSnippetInfoList = array of TSnippetInfo; type - /// Encapsulates user info from export files. - TUserInfo = record - /// User's personal details. - Details: TUserDetails; - /// User's comments. - Comments: string; - /// Initialises record to given values. - constructor Create(const UserDetails: TUserDetails; - const UserComments: string); - /// Returns a new record with null field values. - class function CreateNul: TUserInfo; static; - /// Copies given TUserInfo record to this one. - procedure Assign(const Src: TUserInfo); - /// Initialises record to null value. - procedure Init; - /// Checks if record is null, i.e. empty. - function IsNul: Boolean; - end; - -type - /// Imports code snippets and user info from XML. + /// Imports code snippets from XML. TCodeImporter = class(TNoPublicConstructObject) strict private /// Version of file being imported. @@ -103,8 +89,7 @@ TCodeImporter = class(TNoPublicConstructObject) ECodeImporter = class(ECodeSnipXML); type - // TODO -cRefactor: Decide if we still need to export user info - /// Exports code snippets and user info to XML. + /// Exports code snippets to XML. TCodeExporter = class(TNoPublicConstructObject) strict private var @@ -176,10 +161,17 @@ implementation uses // Delphi - ActiveX, XMLDom, + ActiveX, + XMLDom, // Project - ActiveText.UMain, DB.UMain, DB.USnippetKind, UAppInfo, UREMLDataIO, - UReservedCategories, USnippetExtraHelper, USnippetIDs, UStructs, + ActiveText.UMain, + DB.UMain, + DB.USnippetKind, + UAppInfo, + UReservedCategories, + USnippetExtraHelper, + USnippetIDs, + UStructs, UXMLDocConsts; @@ -191,38 +183,6 @@ implementation cEarliestVersion = 1; // earliest file version supported by importer cLatestVersion = 6; // current file version written by exporter - -{ TUserInfo } - -procedure TUserInfo.Assign(const Src: TUserInfo); -begin - Details.Assign(Src.Details); - Comments := Src.Comments; -end; - -constructor TUserInfo.Create(const UserDetails: TUserDetails; - const UserComments: string); -begin - Details := UserDetails; - Comments := UserComments; -end; - -class function TUserInfo.CreateNul: TUserInfo; -begin - Result.Init; -end; - -procedure TUserInfo.Init; -begin - Details.Init; - Comments := ''; -end; - -function TUserInfo.IsNul: Boolean; -begin - Result := Details.IsNul and (Comments = ''); -end; - { TCodeExporter } destructor TCodeExporter.Destroy; From f5e6b971c507f2e851935d0334bbed06d2a0c238 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 01:20:34 +0100 Subject: [PATCH 243/714] Remove redundant UUserDetails unit --- Src/CodeSnip.dpr | 1 - Src/CodeSnip.dproj | 1 - Src/UUserDetails.pas | 126 ------------------------------------------- 3 files changed, 128 deletions(-) delete mode 100644 Src/UUserDetails.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 68e7e67b8..52288af56 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -354,7 +354,6 @@ uses UUserDBBackup in 'UUserDBBackup.pas', UUserDBMgr in 'UUserDBMgr.pas', UUserDBMove in 'UUserDBMove.pas', - UUserDetails in 'UUserDetails.pas', UUtils in 'UUtils.pas', UVersionInfo in 'UVersionInfo.pas', UView in 'UView.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 0db53dc79..d035bdb62 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -551,7 +551,6 @@ - diff --git a/Src/UUserDetails.pas b/Src/UUserDetails.pas deleted file mode 100644 index 0f8e9e443..000000000 --- a/Src/UUserDetails.pas +++ /dev/null @@ -1,126 +0,0 @@ -{ - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at http://mozilla.org/MPL/2.0/ - * - * Copyright (C) 2009-2020, Peter Johnson (gravatar.com/delphidabbler). - * - * Implements a record that encapsulates information a program user. -} - - -unit UUserDetails; - - -interface - - -type - /// - /// Record that encapsulates information about a program user. - /// - TUserDetails = record - strict private - /// Value of Name property. - fName: string; - /// Value of EMail property. - fEmail: string; - /// Setter for Name property. - /// Trims leading and trailing spaces from new value. - procedure SetName(const AName: string); - /// Setter for Email property. - /// Trims leading and trailing spaces from new value. - procedure SetEmail(const AEmail: string); - public - /// User name. - property Name: string read fName write SetName; - /// User email. - property Email: string read fEmail write SetEmail; - /// Constructs record with given field values. - constructor Create(const UserName, UserEmail: string); - /// Creates and returns a new null record. - class function CreateNul: TUserDetails; static; - /// Assigns the field values of a given record to this record. - /// - procedure Assign(const Src: TUserDetails); - /// Initialises the record to null values. - procedure Init; - /// Checks if record is null, i.e. empty. - function IsNul: Boolean; - /// Returns string representation of user details. - function ToString: string; - end; - - -implementation - - -uses - // Project - UStrUtils; - - -{ TUserDetails } - -procedure TUserDetails.Assign(const Src: TUserDetails); -begin - SetName(Src.Name); - SetEmail(Src.Email); -end; - -constructor TUserDetails.Create(const UserName, UserEmail: string); -begin - SetName(UserName); - SetEmail(UserEmail); -end; - -class function TUserDetails.CreateNul: TUserDetails; -begin - Result.Init; -end; - -procedure TUserDetails.Init; -begin - SetName(''); - SetEmail(''); -end; - -function TUserDetails.IsNul: Boolean; -begin - Result := (Name = '') and (Email = ''); -end; - -procedure TUserDetails.SetEmail(const AEmail: string); -begin - fEmail := StrTrim(AEmail); -end; - -procedure TUserDetails.SetName(const AName: string); -begin - fName := StrTrim(AName); -end; - -function TUserDetails.ToString: string; -begin - // Returns one of following: - // +-----------------+----------+-----------+ - // | Result | Name Set | Email Set | - // +-----------------+----------+-----------+ - // | '' | No | No | - // | 'Name' | Yes | No | - // | '' | No | Yes | - // | 'Name ' | Yes | Yes | - // +-----------------+----------+-----------+ - if IsNul then - Exit(''); - Result := Name; - if Email <> '' then - begin - if Result <> '' then - Result := Result + ' '; - Result := Result + '<' + Email + '>'; - end; -end; - -end. - From 419db66fe0746b534f2c7b8e1f184dbbd601db20 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 01:29:07 +0100 Subject: [PATCH 244/714] Add code to remove redundant UserInfo section from config file in first run code --- Src/FirstRun.UConfigFile.pas | 9 +++++++++ Src/FirstRun.UMain.pas | 1 + 2 files changed, 10 insertions(+) diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index 09b741e14..edd04b4fe 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -102,6 +102,8 @@ TUserConfigFileUpdater = class(TConfigFileUpdater) procedure DeleteUpdatingPrefs; /// Deletes unused UpdateChecks section. procedure DeleteUpdateChecks; + /// Deletes unused UserInfo section. + procedure DeleteUserInfo; /// Effectively renames MainWindow section used prior to version /// 11 as WindowState:MainForm. procedure RenameMainWindowSection; @@ -330,6 +332,13 @@ procedure TUserConfigFileUpdater.DeleteUpdatingPrefs; DeleteIniSection('Prefs:Updating', CfgFileName); end; +procedure TUserConfigFileUpdater.DeleteUserInfo; +begin + if not TFile.Exists(CfgFileName, False) then + CreateNewFile; + DeleteIniSection('UserInfo', CfgFileName); +end; + class function TUserConfigFileUpdater.GetFileVersion: Integer; begin Result := FileVersion; diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index e18a1ff9d..39969321e 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -242,6 +242,7 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); fUserConfigFile.DeleteProxyServerSection; fUserConfigFile.DeleteUpdatingPrefs; fUserConfigFile.DeleteUpdateChecks; + fUserConfigFile.DeleteUserInfo; end; {$IFNDEF PORTABLE} From a05a269065544ce36e1041e5fb6b701846cca30d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 01:38:15 +0100 Subject: [PATCH 245/714] Update privacy statement Updated re removal of user info from config file and removal of program key --- Docs/Privacy.txt | 14 ++++---------- Src/Help/HTML/privacy_statement.htm | 10 +++------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/Docs/Privacy.txt b/Docs/Privacy.txt index e0ad74d5f..37fcf0637 100644 --- a/Docs/Privacy.txt +++ b/Docs/Privacy.txt @@ -16,13 +16,10 @@ portable edition. Common.config -------------------------------------------------------------------------------- -Common.config is located in the %ProgramData%\DelphiDabbler\CodeSnip.4 folder -for the standard edition or in the AppData sub folder of the install directory -for the portable edition. +Common.config is located in the in the %ProgramData%\DelphiDabbler\CodeSnip.4 +folder for the standard edition. It is not used by the portable edition. -The data that is stored in Common.config includes a unique 32 digit hexadecimal -key based on attributes of your computer. The data that is used to create the -hexadecimal key cannot be recovered from the key. +Only version information is stored in Common.config. User.config @@ -33,10 +30,7 @@ folder for the standard edition or in the AppData sub folder of the install directory for the portable edition. The file stores several user-specific application data settings such as your -preferences. The only personal information is any user name or email address you -provided if you ever entered such information in a dialogue box. This is used -only to automatically enter the data in dialogue boxes where needed, to save you -re-typing it. +preferences. None of this information is personally identifiable. Spyware diff --git a/Src/Help/HTML/privacy_statement.htm b/Src/Help/HTML/privacy_statement.htm index 023e9537b..bd54228e3 100644 --- a/Src/Help/HTML/privacy_statement.htm +++ b/Src/Help/HTML/privacy_statement.htm @@ -40,11 +40,10 @@

    Common.config is located in the in the %ProgramData%\DelphiDabbler\CodeSnip.4 folder for the - standard edition or in the AppData sub folder of the install - directory for the portable edition. + standard edition. It is not used by the portable edition.

    - The data that is stored in Common.config includes a unique 32 digit hexadecimal key based on attributes of your computer. The data that is used to create the hexadecimal key cannot be recovered from the key. + Only version information is stored in Common.config.

    User.config @@ -57,10 +56,7 @@

    The file stores several user-specific application data settings such as - your preferences. The only personal information is any user name or email - address you provided if you ever entered such information in a dialogue - box. This is used only to automatically enter the data in dialogue boxes - where needed, to save you re-typing it. + your preferences. None of this information is personally identifiable.

    Spyware From c23dc8fba95eb5a8a0d74dbcbc61465464951889 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 01:55:57 +0100 Subject: [PATCH 246/714] Update export file format to v7 --- Src/UCodeImportExport.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/UCodeImportExport.pas b/Src/UCodeImportExport.pas index 862e7ca13..359bd155c 100644 --- a/Src/UCodeImportExport.pas +++ b/Src/UCodeImportExport.pas @@ -181,7 +181,7 @@ implementation cWatermark = 'B46969D4-D367-4F5F-833E-F165FBA78631'; // file version numbers cEarliestVersion = 1; // earliest file version supported by importer - cLatestVersion = 6; // current file version written by exporter + cLatestVersion = 7; // current file version written by exporter { TCodeExporter } From 7482948354dfe25c4c29a1890e4679e6861e7bf4 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 01:59:48 +0100 Subject: [PATCH 247/714] Remove XML node names not used in export file v7 --- Src/UXMLDocConsts.pas | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Src/UXMLDocConsts.pas b/Src/UXMLDocConsts.pas index 97110c409..a8ef440e4 100644 --- a/Src/UXMLDocConsts.pas +++ b/Src/UXMLDocConsts.pas @@ -38,10 +38,6 @@ interface // export XML only cExportRootNode = 'codesnip-export'; cProgVersionNode = 'prog-version'; - cUserInfoNode = 'user-info'; - cUserNameNode = 'name'; - cUserEmailNode = 'email'; - cUserCommentsNode = 'comments'; cSourceCodeTextNode = 'source-code-text'; // common to user-database and export XML cRootVersionAttr = 'version'; From e815ebd07cbe23328b281a9ef69162581c92d0f0 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 02:16:36 +0100 Subject: [PATCH 248/714] Update PJWdwState components to v5.6.1 of 28 Oct 2014 --- Src/3rdParty/PJWdwState.pas | 232 ++++++++++++++++++++++++++++++------ 1 file changed, 193 insertions(+), 39 deletions(-) diff --git a/Src/3rdParty/PJWdwState.pas b/Src/3rdParty/PJWdwState.pas index dd3c8092f..7ea118261 100644 --- a/Src/3rdParty/PJWdwState.pas +++ b/Src/3rdParty/PJWdwState.pas @@ -3,10 +3,10 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 1999-2013, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 1999-2014, Peter Johnson (www.delphidabbler.com). * - * $Rev$ - * $Date$ + * $Rev: 1966 $ + * $Date: 2014-10-28 01:20:04 +0000 (Tue, 28 Oct 2014) $ * * DelphiDabbler Window state components. } @@ -15,11 +15,14 @@ unit PJWdwState; // Conditional defines -// Note: Delphi 1/2 not included since code will not compile on these compilers +// Note: There is no version checking for Delphi 1 and 2 not since this unit +// will not compile with those compilers. {$DEFINE WarnDirs} // $WARN compiler directives available {$DEFINE RegAccessFlags} // TRegistry access flags available +{$DEFINE RequiresFileCtrl} // FileCtrl unit is required for ForceDirectories {$UNDEF RTLNameSpaces} // Don't qualify RTL units names with namespaces {$UNDEF TScrollStyleMoved} // TScrollStyle hasn't moved to System.UITypes units +{$UNDEF SupportsPathDelim} // PathDelim and related routine not defined {$IFDEF VER100} // Delphi 3 {$UNDEF WarnDirs} {$UNDEF RegAccessFlags} @@ -32,15 +35,18 @@ {$UNDEF WarnDirs} {$UNDEF RegAccessFlags} {$ENDIF} -{$IFDEF VER140} // Delphi 6 - {$UNDEF WarnDirs} -{$ENDIF} {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 23.0} // Delphi XE2 + {$IF CompilerVersion >= 24.0} // Delphi XE3 and later + {$LEGACYIFEND ON} // NOTE: this must come before all $IFEND directives + {$DEFINE TScrollStyleMoved} + {$IFEND} + {$IF CompilerVersion >= 23.0} // Delphi XE2 and later {$DEFINE RTLNameSpaces} {$IFEND} - {$IF CompilerVersion >= 24.0} // Delphi XE3 - {$DEFINE TScrollStyleMoved} + {$IF CompilerVersion >= 14.0} // Delphi 6 and later + {$DEFINE SupportsPathDelim} + {$UNDEF WarnDirs} + {$UNDEF RequiresFileCtrl} {$IFEND} {$ENDIF} @@ -54,7 +60,11 @@ interface System.Classes, Vcl.Controls, Winapi.Messages, Winapi.Windows, Vcl.Forms, System.SysUtils, System.Win.Registry; {$ELSE} - Classes, Controls, Messages, Windows, Forms, SysUtils, Registry; + Classes, Controls, Messages, Windows, Forms, SysUtils, Registry + {$IFDEF RequiresFileCtrl} + , FileCtrl // needed for ForceDirectories since it's not in SysUtils yet. + {$ENDIF} + ; {$ENDIF} @@ -65,6 +75,7 @@ interface // instructs MDI child components they can restore their windows PJM_RESTOREMDICHILD = WM_USER + 1; + type TPJCustomWdwState = class; @@ -637,15 +648,42 @@ TPJWdwState = class(TPJCustomWdwState) { TPJWdwStateGetRegData: Type of event that is triggered just before registry is accessed. It allows - handler to change the registry HKEY and sub key to be used. - @param RootKey [in/out] Registry root key. Default value passed in. May be - changed in event handler. + handler to change the registry root key and sub key to be used. + @param RootKey [in/out] Registry root key. Default HKEY value passed in. + May be changed in event handler. @param SubKey [in/out] Registry sub key. Default value passed in. May be changed in event handler. } TPJWdwStateGetRegData = procedure(var RootKey: HKEY; var SubKey: string) of object; + {TPJRegRootKey: + Enumeration of values that represent the registry root keys supported by + TPJRegWdwState. Each value represents and maps to the similarly named + HKEY_* constant, as shown in the comments. + } + TPJRegRootKey = ( + hkClassesRoot, // HKEY_CLASSES_ROOT + hkCurrentUser, // HKEY_CURRENT_USER + hkLocalMachine, // HKEY_LOCAL_MACHINE + hkUsers, // HKEY_USERS + hkPerformanceData, // HKEY_PERFORMANCE_DATA + hkCurrentConfig, // HKEY_CURRENT_CONFIG + hkDynData // HKEY_DYN_DATA + ); + + { + TPJWdwStateGetRegDataEx: + Type of event that is triggered just before registry is accessed. It allows + handler to change the registry root key and sub key to be used. + @param RootKeyEx [in/out] Registry root key. Default TPJRegRootKey value + passed in. May be changed in event handler. + @param SubKey [in/out] Registry sub key. Default value passed in. May be + changed in event handler. + } + TPJWdwStateGetRegDataEx = procedure(var RootKeyEx: TPJRegRootKey; + var SubKey: string) of object; + { TPJWdwStateRegAccessEvent: Type of event that is triggered after registry is opened, ready for access. @@ -668,23 +706,34 @@ TPJWdwState = class(TPJCustomWdwState) } TPJRegWdwState = class(TPJCustomWdwState) private // properties - fRootKey: HKEY; - {Value of RootKey property} + fRootKeyEx: TPJRegRootKey; + {Value of RootKeyEx property} fSubKey: string; {Value of SubKey property} fOnGetRegData: TPJWdwStateGetRegData; {Event handler for OnGetRegData event} + fOnGetRegDataEx: TPJWdwStateGetRegDataEx; + {Event handler for OnGetRegDataEx event} fOnGettingRegData: TPJWdwStateRegAccessEvent; // Added by BJM {Event handler for OnGettingRegData event} fOnPuttingRegData: TPJWdwStateRegAccessEvent; // Added by BJM {Event handler for OnPuttingRegData event} + function GetRootKey: HKEY; + {Read accessor for RootKey property. + @return Required property value. + } + procedure SetRootKey(const Value: HKEY); + {Write accessor for RootKey property. + @param Value [in] New property value. + @exception ERangeError raised if value is not a recognised HKEY_* value. + } procedure SetSubKey(const Value: string); {Write accessor method for SubKey property. @param Value [in] New property value. If Value='' then the property is set to \Software\\Window\
    . } protected - procedure GetRegInfo(var ARootKey: HKEY; var ASubKey: string); + procedure GetRegInfo(var ARootKey: TPJRegRootKey; var ASubKey: string); {Triggers OnGetRegData event to get registry root key and sub key to be used when restoring / saving window state. @param ARootKey [in/out] Required root key value. Set to value of @@ -729,9 +778,17 @@ TPJRegWdwState = class(TPJCustomWdwState) // Published inherited property property OnReadWdwState; // New properties - property RootKey: HKEY read fRootKey write fRootKey + property RootKey: HKEY read GetRootKey write SetRootKey default HKEY_CURRENT_USER; - {Registry root key to use. Must be set to a valid HKEY value} + {Registry root key to use. Must be set to a valid HKEY value. Setting this + property also sets RootKeyEx to a corresponding value} + property RootKeyEx: TPJRegRootKey read fRootKeyEx write fRootKeyEx + stored False default hkCurrentUser; + {Registry root key to use as specified by a value from the TPJRegRootKey + enumeration. Setting this property also sets RootKey to a corresponding + value. + NOTE: This property is provided to make it easier to set root keys at + design time to avoid remembering the root key value as an integer} property SubKey: string read fSubKey write SetSubKey; {The sub-key below root key where window state is to be stored. If set to empty string the value of '/Software//Window/' @@ -739,9 +796,17 @@ TPJRegWdwState = class(TPJCustomWdwState) property OnGetRegData: TPJWdwStateGetRegData read fOnGetRegData write fOnGetRegData; {Event triggered just before registry is read when restoring and saving - window state. Allows handler to change registry HKEY and subkey to be used - to store window state. If this event is handled then RootKey and SubKey - properties are ignored} + window state. Allows handler to change root key and subkey to be used to + store window state. Root key is specified via its HKEY value. If this + event is handled then RootKey, RootKeyEx and SubKey properties are all + ignored} + property OnGetRegDataEx: TPJWdwStateGetRegDataEx + read fOnGetRegDataEx write fOnGetRegDataEx; + {Event triggered just before registry is read when restoring and saving + window state. Allows handler to change root key and subkey to be used to + store window state. Root key is specified via its TPJRegRootKey value. If + this event is handled then RootKey, RootKeyEx and SubKey properties are + all ignored} property OnGettingRegData: TPJWdwStateRegAccessEvent // Added by BJM read fOnGettingRegData write fOnGettingRegData; {Event triggered when component is reading window state data from @@ -786,6 +851,26 @@ procedure Register; ); end; +{$IFNDEF SupportsPathDelim} +// Definitions used for versions of Delphi that don't implement the following +// constant and function in SysUtils. + +const + // File path delimiter + PathDelim = '/'; + +// Ensures that given directory or path ends with exactly one path delimiter. +function IncludeTrailingPathDelimiter(const PathOrDir: string): string; +begin + Result := PathOrDir; + // remove all trailing path delimiters if any, to get rid of any duplicates + while (Result <> '') and (Result[Length(Result)] = PathDelim) do + Result := Copy(Result, 1, Length(Result) - 1); + // add a single trailing delimiter + Result := Result + PathDelim; +end; +{$ENDIF} + { TPJWdwStateHook } procedure TPJWdwStateHook.CMShowingChanged(var Msg: TMessage); @@ -1647,6 +1732,43 @@ procedure TPJWdwState.SaveWdwState(const Left, Top, Width, Height, { TPJRegWdwState } +resourcestring + // Error messages + sErrBadHKEY = '%d is not a valid HKEY value.'; + +const + // Map of supported HKEY_ constants onto corresponding TPJRegRootKey values. + RegRootKeyMap: array[TPJRegRootKey] of HKEY = ( + HKEY_CLASSES_ROOT, // hkClassesRoot + HKEY_CURRENT_USER, // hkCurrentUser + HKEY_LOCAL_MACHINE, // hkLocalMachine + HKEY_USERS, // hkUsers + HKEY_PERFORMANCE_DATA, // hkPerformanceData + HKEY_CURRENT_CONFIG, // hkCurrentConfig + HKEY_DYN_DATA // hkDynData + ); + +function TryHKEYToCode(const RootKey: HKEY; var Value: TPJRegRootKey): Boolean; + {Attempts to convert a HKEY value into the corresponding TPJRegRootKey value. + @param RootKey [in] HKEY value to convert. + @param Value [in/out] Set to TPJRegRootKey value corresponding to RootKey. + Value is undefined if RootKey has no corresponding TPJRegRootKey value. + @return True if RootKey is valid and has corresponding TPJRegRootKey value + or False of not. + } +var + Code: TPJRegRootKey; +begin + Result := True; + for Code := Low(TPJRegRootKey) to High(TPJRegRootKey) do + if RegRootKeyMap[Code] = RootKey then + begin + Value := Code; + Exit; + end; + Result := False; +end; + function ReadRegInt(const Reg: TRegistry; const AName: string; const ADefault: Integer): Integer; {Reads integer value from current sub key in registry, using a default value @@ -1709,26 +1831,45 @@ constructor TPJRegWdwState.Create(AOwner: TComponent); } begin inherited Create(AOwner); - fRootKey := HKEY_CURRENT_USER; + fRootKeyEx := hkCurrentUser; SetSubKey(''); end; -procedure TPJRegWdwState.GetRegInfo(var ARootKey: HKEY; +procedure TPJRegWdwState.GetRegInfo(var ARootKey: TPJRegRootKey; var ASubKey: string); - {Triggers OnGetRegData event to get registry root key and sub key to be used - when restoring / saving window state. + {Triggers the OnGetRegDateEx event or, if that is not assigned, the + OnGetRegData event, to get registry root key and sub key to be used when + restoring / saving window state. @param ARootKey [in/out] Required root key value. Set to value of RootKey property by default. May be changed in event handler. @param ASubKey [in/ou] Required sub key. Set to value of SubKey property when called. May be changed in event handler. } +var + RootHKey: HKEY; // used to get root key via its HKEY value begin - // Use RootKey and SubKey property values by default - ARootKey := RootKey; + // Use RootKeyEx and SubKey property values by default + ARootKey := RootKeyEx; ASubKey := SubKey; - // Allow user to change these by handling OnGetRegData event - if Assigned(fOnGetRegData) then - fOnGetRegData(ARootKey, ASubKey); + // Allow user to change these by handling either OnGetRegDataEx or + // OnGetRegData event + if Assigned(fOnGetRegDataEx) then + fOnGetRegDataEx(ARootKey, ASubKey) + else if Assigned(fOnGetRegData) then + begin + RootHKey := RegRootKeyMap[ARootKey]; + fOnGetRegData(RootHKey, ASubKey); + if not TryHKEYToCode(RootHKey, ARootKey) then + raise ERangeError.CreateFmt(sErrBadHKEY, [RootHKey]); + end; +end; + +function TPJRegWdwState.GetRootKey: HKEY; + {Read accessor for RootKey property. + @return Required property value. + } +begin + Result := RegRootKeyMap[fRootKeyEx]; end; procedure TPJRegWdwState.ReadWdwState(var Left, Top, Width, Height, @@ -1747,16 +1888,16 @@ procedure TPJRegWdwState.ReadWdwState(var Left, Top, Width, Height, value is the ordinal value of a TWindowState value. } var - Reg: TRegistry; // instance of registry object used to read info - ARootKey: HKEY; // registry root key where window state is stored - ASubKey: string; // sub key of registry from which to read window state + Reg: TRegistry; // instance of registry object used to read info + ARootKey: TPJRegRootKey; // registry root key where window state is stored + ASubKey: string; // registry sub key from which to read window state begin // Get registry keys from which to read window state GetRegInfo(ARootKey, ASubKey); // Open registry at required key Reg := SafeCreateReg; try - Reg.RootKey := ARootKey; + Reg.RootKey := RegRootKeyMap[ARootKey]; if Reg.OpenKey(ASubKey, False) then begin // Read position, size and state of window @@ -1785,16 +1926,16 @@ procedure TPJRegWdwState.SaveWdwState(const Left, Top, Width, Height, value of a TWindowState value. } var - Reg: TRegistry; // instance of registry object class used to write info - ARootKey: HKEY; // registry root key where window state is stored - ASubKey: string; // sub key of registry in which to save window state + Reg: TRegistry; // instance of registry object used to write info + ARootKey: TPJRegRootKey; // registry root key where window state is stored + ASubKey: string; // sub key of registry in which to save window state begin // Get registry keys in which to save window state GetRegInfo(ARootKey, ASubKey); // Open registry at required key Reg := SafeCreateReg; try - Reg.RootKey := ARootKey; + Reg.RootKey := RegRootKeyMap[ARootKey]; if Reg.OpenKey(ASubKey, True) then begin // Write window size, position and state from registry @@ -1812,6 +1953,19 @@ procedure TPJRegWdwState.SaveWdwState(const Left, Top, Width, Height, end; end; +procedure TPJRegWdwState.SetRootKey(const Value: HKEY); + {Write accessor for RootKey property. + @param Value [in] New property value. + @exception ERangeError raised if value is not a recognised HKEY_* value. + } +begin + if not TryHKEYToCode(Value, fRootKeyEx) then + begin + fRootKeyEx := hkCurrentUser; + raise ERangeError.CreateFmt(sErrBadHKEY, [Value]); + end; +end; + procedure TPJRegWdwState.SetSubKey(const Value: string); {Write accessor method for SubKey property. @param Value [in] New property value. If Value='' then the property is set From e912f6d5f91ccf0cabb57cd89aace707c3bb9f0f Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 02:19:30 +0100 Subject: [PATCH 249/714] Updated PJMD5 unit to v1.1.1 of 11 Jan 2014 --- Src/3rdParty/PJMD5.pas | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Src/3rdParty/PJMD5.pas b/Src/3rdParty/PJMD5.pas index 17665da65..4cb0a9fea 100644 --- a/Src/3rdParty/PJMD5.pas +++ b/Src/3rdParty/PJMD5.pas @@ -3,10 +3,10 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2010-2013, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2010-2014, Peter Johnson (www.delphidabbler.com). * - * $Rev$ - * $Date$ + * $Rev: 1515 $ + * $Date: 2014-01-11 02:36:28 +0000 (Sat, 11 Jan 2014) $ * * This unit is a Delphi Pascal implementation of the MD5 Message-Digest * algorithm. See RFC1321 (http://www.faqs.org/rfcs/rfc1321.html). @@ -31,12 +31,15 @@ {$UNDEF CANCOMPILE} {$UNDEF RTLNAMESPACES} {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 20.0} // Delphi 2009 - {$DEFINE CANCOMPILE} + {$IF CompilerVersion >= 24.0} // Delphi XE3 and later + {$LEGACYIFEND ON} // NOTE: this must come before all $IFEND directives {$IFEND} - {$IF CompilerVersion >= 23.0} // Delphi XE2 + {$IF CompilerVersion >= 23.0} // Delphi XE2 and later {$DEFINE RTLNAMESPACES} {$IFEND} + {$IF CompilerVersion >= 20.0} // Delphi 2009 and later + {$DEFINE CANCOMPILE} + {$IFEND} {$ENDIF} {$IFNDEF CANCOMPILE} {$MESSAGE FATAL 'Delphi 2009 or later required'} From bb88ae6248d667b68b379b9f11b93ae3ea340d98 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 02:22:01 +0100 Subject: [PATCH 250/714] Update PJShellFolders unit to v2.3.2 of 11 Jan 2014 --- Src/3rdParty/PJShellFolders.pas | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Src/3rdParty/PJShellFolders.pas b/Src/3rdParty/PJShellFolders.pas index ee1a3587b..ca27208d6 100644 --- a/Src/3rdParty/PJShellFolders.pas +++ b/Src/3rdParty/PJShellFolders.pas @@ -3,10 +3,10 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2001-2013, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2001-2014, Peter Johnson (www.delphidabbler.com). * - * $Rev$ - * $Date$ + * $Rev: 1515 $ + * $Date: 2014-01-11 02:36:28 +0000 (Sat, 11 Jan 2014) $ * * Run time unit that defines shell folders components, classes and routines. } @@ -27,17 +27,20 @@ interface {$DEFINE DELPHI5ANDUP} {$ENDIF} {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14.0} // Delphi 6 and later - {$DEFINE DELPHI5ANDUP} - {$DEFINE DELPHI6ANDUP} + {$IF CompilerVersion >= 24.0} // Delphi XE3 and later + {$LEGACYIFEND ON} // NOTE: this must come before all $IFEND directives + {$IFEND} + {$IF CompilerVersion >= 23.0} // Delphi XE2 and later + {$DEFINE RTLNameSpaces} {$IFEND} {$IF CompilerVersion >= 15.0} // Delphi 7 and later {$DEFINE DELPHI7ANDUP} {$WARN UNSAFE_CODE OFF} {$WARN UNSAFE_CAST OFF} {$IFEND} - {$IF CompilerVersion >= 23.0} // Delphi XE2 - {$DEFINE RTLNameSpaces} + {$IF CompilerVersion >= 14.0} // Delphi 6 and later + {$DEFINE DELPHI5ANDUP} + {$DEFINE DELPHI6ANDUP} {$IFEND} {$ENDIF} From 69a4a9e9d48b218a695ef92bc19d4e4399b7f489 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 02:25:52 +0100 Subject: [PATCH 251/714] Updated PJStreamWrapper unit from Stream Extension Classes to v3.1.2 of 12 Jan 2014 --- Src/3rdParty/PJStreamWrapper.pas | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Src/3rdParty/PJStreamWrapper.pas b/Src/3rdParty/PJStreamWrapper.pas index 10e91b78a..51e3f22e6 100644 --- a/Src/3rdParty/PJStreamWrapper.pas +++ b/Src/3rdParty/PJStreamWrapper.pas @@ -3,10 +3,10 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2000-2013, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 2000-2014, Peter Johnson (www.delphidabbler.com). * - * $Rev$ - * $Date$ + * $Rev: 1515 $ + * $Date: 2014-01-11 02:36:28 +0000 (Sat, 11 Jan 2014) $ * * Defines the TPJStreamWrapper class. This is a base class for descendant * classes that "wrap" a TStream class to provide some form of filter or @@ -22,14 +22,17 @@ {$UNDEF SUPPORTS_TSTREAM64} {$UNDEF RTLNAMESPACES} {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 14.0} // >= Delphi 6 - {$DEFINE SUPPORTS_TSTREAM64} + {$IF CompilerVersion >= 24.0} // Delphi XE3 and later + {$LEGACYIFEND ON} // NOTE: this must come before all $IFEND directives + {$IFEND} + {$IF CompilerVersion >= 23.0} // Delphi XE2 and later + {$DEFINE RTLNAMESPACES} {$IFEND} - {$IF CompilerVersion >= 18.0} // >= Delphi 2006 + {$IF CompilerVersion >= 18.0} // Delphi 2006 and later {$DEFINE SUPPORTS_STRICT} {$IFEND} - {$IF CompilerVersion >= 23.0} // >= Delphi XE2 - {$DEFINE RTLNAMESPACES} + {$IF CompilerVersion >= 14.0} // Delphi 6 and later + {$DEFINE SUPPORTS_TSTREAM64} {$IFEND} {$ENDIF} From c2b76b4ab7fe846379a3062b69afbf2922b5580b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 02:27:54 +0100 Subject: [PATCH 252/714] Updated PJSysInfo unit to v5.4.0 of 19 Mar 2020 --- Src/3rdParty/PJSysInfo.pas | 318 +++++++++++++++++++++++++++++++------ 1 file changed, 270 insertions(+), 48 deletions(-) diff --git a/Src/3rdParty/PJSysInfo.pas b/Src/3rdParty/PJSysInfo.pas index 65f74044b..8a4fbda50 100644 --- a/Src/3rdParty/PJSysInfo.pas +++ b/Src/3rdParty/PJSysInfo.pas @@ -3,10 +3,10 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 2001-2016, Peter Johnson (@delphidabbler). + * Copyright (C) 2001-2020, Peter Johnson (@delphidabbler). * - * $Rev: 2015 $ - * $Date: 2016-09-12 00:47:45 +0100 (Mon, 12 Sep 2016) $ + * $Rev: 2023 $ + * $Date: 2020-03-17 05:00:45 +0000 (Tue, 17 Mar 2020) $ * * This unit contains various static classes, constants, type definitions and * global variables for use in providing information about the host computer and @@ -37,8 +37,8 @@ * code used in v3.0 and later) * * - Rich Habedank (bug fix in r228 and testing of bug fixes reported as - * issues #31 (https://code.google.com/p/ddab-lib/issues/detail?id=31) and - * #33 (https://code.google.com/p/ddab-lib/issues/detail?id=33) + * issues #31 (https://sourceforge.net/p/ddablib/tickets/31/) and #33 + * (https://sourceforge.net/p/ddablib/tickets/33/) * * The project also draws on the work of: * @@ -443,9 +443,10 @@ interface osWin8Point1, // Windows 8.1 osWinSvr2012R2, // Windows Server 2012 R2 osWin10, // Windows 10 - osWin10Svr // Windows 2016 Server + osWin10Svr, // Windows 2016 Server + osWinSvr2019 // Windows 2019 Server ); - + type /// Enumeration identifying processor architecture. TPJProcessorArchitecture = ( @@ -791,6 +792,15 @@ TPJComputerInfo = class(TObject) /// processor. class function ProcessorName: string; + /// Returns the speed of the computer's processor in MHz. + /// + /// + /// On multi-processor systems this is the speed of the 1st + /// processor. + /// 0 is returned if the information is not a available. + /// + class function ProcessorSpeedMHz: Cardinal; + /// Checks if the host computer has a 64 bit processor. class function Is64Bit: Boolean; @@ -967,6 +977,7 @@ implementation sUnknownPlatform = 'Unrecognised operating system platform'; sUnknownProduct = 'Unrecognised operating system product'; sBadRegType = 'Unsupported registry type'; + sBadRegIntType = 'Integer value expected in registry'; sBadProcHandle = 'Bad process handle'; @@ -1171,6 +1182,65 @@ implementation 'Software\Microsoft\Windows NT\CurrentVersion' ); +const + // Known windows build numbers. + // Sources: + // https://en.wikipedia.org/wiki/Windows_NT + // https://en.wikipedia.org/wiki/Windows_10_version_history + // https://en.wikipedia.org/wiki/Windows_Server_2019 + // https://en.wikipedia.org/wiki/Windows_Server_2016 + // https://en.wikipedia.org/wiki/Windows_Server_2016 + // https://tinyurl.com/y8tfadm2 + + // for Vista and Win 7 we have to add service pack number to these values to + // get actual build number + + WinVistaBaseBuild = 6000; + Win7BaseBuild = 7600; + + // for Win 8 onwards we just use the build numbers as is + + Win8Build = 9200; // Build number used for all Win 8/Svr 2012 + Win8Point1Build = 9600; // Build number used for all Win 8.1/Svr 2012 R2 + + Win10TH1Build = 10240; // Windows 10 TH1 - version 1507 (1st release) + Win10TH2Build = 10586; // Windows 10 TH2 - version 1511 + Win10RS1Build = 14393; // Windows 10 RS1 - version 1607 + Win10RS2Build = 15063; // Windows 10 RS2 - version 1703 + Win10RS3Build = 16299; // Windows 10 RS3 - version 1709 + Win10RS4Build = 17134; // Windows 10 RS4 - version 1803 + Win10RS5Build = 17763; // Windows 10 RS5 - version 1809 + Win1019H1Build = 18362; // Windows 10 19H1 - version 1903 + Win1019H2Build = 18363; // Windows 10 19H2 - version 1909 + Win1020H1Build = 19041; // Windows 10 20H2 - version 2004 + + Win2016TP1Build = 9841; // Win 2016 Server Technical Preview 1 + Win2016TP2Build = 10074; // Win 2016 Server Technical Preview 2 + Win2016TP3Build = 10514; // Win 2016 Server Technical Preview 3 + Win2016TP4Build = 10586; // Win 2016 Server Technical Preview 4 + Win2016TP5Build = 14300; // Win 2016 Server Technical Preview 5 + Win2016RTMBuild = 14393; // Win 2016 Server Release To Manufacturing + Win2016v1709Build = 16299; // Win Server 2016 version 1709 + Win2016v1803Build = 17134; // Win Server 2016 version 1803 + + Win2019IP180320Build = 17623; // Win Server 2019 Insider Preview Build 17623 + Win2019IP180324Build = 17627; // Win Server 2019 Insider Preview Build 17627 + Win2019IP180515Build = 17666; // Win Server 2019 Insider Preview Build 17666 + Win2019IP180619Build = 17692; // Win Server 2019 Insider Preview Build 17692 + Win2019IP180710Build = 17709; // Win Server 2019 Insider Preview Build 17709 + Win2019IP180716Build = 17713; // Win Server 2019 Insider Preview Build 17713 + Win2019IP180731Build = 17723; // Win Server 2019 Insider Preview Build 17723 + Win2019IP180814Build = 17733; // Win Server 2019 Insider Preview Build 17733 + Win2019IP180821Build = 17738; // Win Server 2019 Insider Preview Build 17738 + Win2019IP180828Build = 17744; // Win Server 2019 Insider Preview Build 17744 + Win2019v1809Build = 17763; // Win Server 2019 version 1809 + Win2019v1903Build = 18362; // Win Server 2019 version 1903 + Win2019v1909Build = 18363; // Win Server 2019 version 1909 + + // Last build number of Windows 2016 Server - after this build number are + // Windows 2019 Server + Win2016LastBuild = Win2016v1803Build; + type // Function type of the GetNativeSystemInfo and GetSystemInfo functions TGetSystemInfo = procedure(var lpSystemInfo: TSystemInfo); stdcall; @@ -1379,8 +1449,8 @@ function GetEnvVar(const VarName: string): string; // Checks if host OS is Windows 2000 or earlier, including any Win9x OS. // This is a helper function for RegCreate and RegOpenKeyReadOnly and avoids -// avoids using TPJOSInfo to ensure that an infinite loop is not set up with -// TPJOSInfo calling back into RegCreate. +// using TPJOSInfo to ensure that an infinite loop is not set up with TPJOSInfo +// calling back into RegCreate. function IsWin2000OrEarlier: Boolean; begin // NOTE: all Win9x OSs have InternalMajorVersion < 5, so we don't need to @@ -1395,7 +1465,8 @@ function IsWin2000OrEarlier: Boolean; function RegCreate: TRegistry; begin {$IFDEF REGACCESSFLAGS} - //! Fix for issue #14 (http://bit.n/eWkw9X) suggested by Steffen Schaff. + //! Fix for issue #14 (https://sourceforge.net/p/ddablib/tickets/14/) + //! suggested by Steffen Schaff. //! Later modified to allow for fact that Windows 2000 fails if //! KEY_WOW64_64KEY is used. if IsWin2000OrEarlier then @@ -1464,6 +1535,32 @@ function GetRegistryString(const RootKey: HKEY; end; end; +function GetRegistryInt(const RootKey: HKEY; const SubKey, Name: string): + Integer; +var + Reg: TRegistry; // registry access object + ValueInfo: TRegDataInfo; // info about registry value +begin + Result := 0; + // Open registry at required root key + Reg := RegCreate; + try + Reg.RootKey := RootKey; + if RegOpenKeyReadOnly(Reg, SubKey) and Reg.ValueExists(Name) then + begin + // Check if registry value is integer + Reg.GetDataInfo(Name, ValueInfo); + if ValueInfo.RegData <> rdInteger then + raise EPJSysInfo.Create(sBadRegIntType); + Result := Reg.ReadInteger(Name); + end; + finally + // Close registry + Reg.CloseKey; + Reg.Free; + end; +end; + // Gets string info for given value from Windows current version key in // registry. function GetCurrentVersionRegStr(ValName: string): string; @@ -1489,24 +1586,14 @@ procedure InitPlatformIdEx; GetVersionEx: TGetVersionEx; // pointer to GetVersionEx API function GetProductInfo: TGetProductInfo; // pointer to GetProductInfo API function SI: TSystemInfo; // structure from GetSystemInfo API call -const - // Known windows build numbers. - // Source: https://en.wikipedia.org/wiki/Windows_NT - // for Vista and Win 7 we have to add service pack number to these values to - // get actual build number - WinVistaBaseBuild = 6000; - Win7BaseBuild = 7600; - // for Win 8 onwards we just use the build numbers as is - Win8Build = 9200; // Only build number used for Win 8 / Svr 2012 - Win8Point1Build = 9600; // Only build number used for Win 8.1 / Svr 2012 R2 - Win10TH1Build = 10240; // Initial Windows 10 release (not Server 2016) - Win10TH2Build = 10586; // Windows 10 TH2 (shared with Win 2016 TP4 - below) - Win10RS1Build = 14393; // Windows 10 RS1 - Win2016TP1Build = 9841; // Windows 2016 Server Technical Preview 1 - Win2016TP2Build = 10074; // Windows 2016 Server Technical Preview 2 - Win2016TP3Build = 10514; // Windows 2016 Server Technical Preview 3 - Win2016TP4Build = 10586; // Windows 2016 Server Technical Preview 4 - Win2016TP5Build = 14300; // Windows 2016 Server Technical Preview 5 + + // Return name of Windows Server 2019 insider preview release for given build + // number. Build must be a valid insider preview release number + function Win2019IPExtra(const Build: Integer): string; + begin + Result := Format('Insider Preview Build %d', [Build]); + end; + begin // Load version query functions used externally to this routine VerSetConditionMask := LoadKernelFunc('VerSetConditionMask'); @@ -1515,6 +1602,7 @@ procedure InitPlatformIdEx; {$ELSE} VerifyVersionInfo := LoadKernelFunc('VerifyVersionInfoA'); {$ENDIF} + if not UseGetVersionAPI then begin // Not using GetVersion and GetVersionEx functions to get version info @@ -1526,9 +1614,9 @@ procedure InitPlatformIdEx; Win32ServicePackMinor := 0; // we don't use suite mask any more! Win32SuiteMask := 0; - // platform for all OSs tested for this way are NT: the NewGetVersion calls - // below indirectly call VerifyVersionInfo API, which is only defined for - // Windows 2000 and later. + // platform for all OSs tested for this way is always NT: the NewGetVersion + // calls below indirectly call VerifyVersionInfo API, which is only defined + // for Windows 2000 and later. InternalPlatform := VER_PLATFORM_WIN32_NT; Win32HaveExInfo := True; NewGetVersion( @@ -1545,7 +1633,7 @@ procedure InitPlatformIdEx; else Win32ProductType := 0; // NOTE: It's going to be very slow to test for all possible build numbers, - // so I've just narrowed the search down using the information at + // so I've narrowed the search down using the information at // http://en.wikipedia.org/wiki/Windows_NT case InternalMajorVersion of 6: @@ -1591,29 +1679,63 @@ procedure InitPlatformIdEx; if (Win32ProductType <> VER_NT_DOMAIN_CONTROLLER) and (Win32ProductType <> VER_NT_SERVER) then begin - // Windows 10 TH1 branch release if IsBuildNumber(Win10TH1Build) then - InternalBuildNumber := Win10TH1Build - // Windows 10 TH2 branch release + begin + InternalBuildNumber := Win10TH1Build; + InternalExtraUpdateInfo := 'Version 1507'; // 1st Win 10 version + end else if IsBuildNumber(Win10TH2Build) then begin InternalBuildNumber := Win10TH2Build; - InternalExtraUpdateInfo := 'Version 1511'; + InternalExtraUpdateInfo := 'Version 1511: November Update'; end else if IsBuildNumber(Win10RS1Build) then begin InternalBuildNumber := Win10RS1Build; - InternalExtraUpdateInfo := 'Version 1607'; - end; + InternalExtraUpdateInfo := 'Version 1607: Anniversary Update'; + end + else if IsBuildNumber(Win10RS2Build) then + begin + InternalBuildNumber := Win10RS2Build; + InternalExtraUpdateInfo := 'Version 1703: Creators Update'; + end + else if IsBuildNumber(Win10RS3Build) then + begin + InternalBuildNumber := Win10RS3Build; + InternalExtraUpdateInfo := 'Version 1709: Fall Creators Update'; + end + else if IsBuildNumber(Win10RS4Build) then + begin + InternalBuildNumber := Win10RS4Build; + InternalExtraUpdateInfo := 'Version 1803: April 2018 Update'; + end + else if IsBuildNumber(Win10RS5Build) then + begin + InternalBuildNumber := Win10RS5Build; + InternalExtraUpdateInfo := 'Version 1809: October 2018 Update'; + end + else if IsBuildNumber(Win1019H1Build) then + begin + InternalBuildNumber := Win1019H1Build; + InternalExtraUpdateInfo := 'Version 1903: May 2019 Update'; + end + else if IsBuildNumber(Win1019H2Build) then + begin + InternalBuildNumber := Win1019H2Build; + InternalExtraUpdateInfo := 'Version 1909: Novermber 2019 Update'; + end + else if IsBuildNumber(Win1020H1Build) then + begin + InternalBuildNumber := Win1020H1Build; + // TODO: Add marketing name below once known + InternalExtraUpdateInfo := 'Version 2004'; + end end else begin - { TODO: Revisit when Windows 2016 Server is released to add its - build number } - // Check for Technical previews. We don't check for TP1 here because - // that reported version 6.4, not version 10! - // Source of these build numbers: - // https://en.wikipedia.org/wiki/Windows_Server_2016#Version_history + // Check for Win Server 2016 echnical previews. + // We don't check for TP1 // here because that reported version 6.4, + // not version 10! if IsBuildNumber(Win2016TP2Build) then begin InternalBuildNumber := Win2016TP2Build; @@ -1634,14 +1756,99 @@ procedure InitPlatformIdEx; InternalBuildNumber := Win2016TP5Build; InternalExtraUpdateInfo := 'Technical Preview 5'; end + else if IsBuildNumber(Win2016RTMBuild) then + begin + InternalBuildNumber := Win2016RTMBuild; + InternalExtraUpdateInfo := 'Version 1607'; + end + else if IsBuildNumber(Win2016v1709Build) then + begin + InternalBuildNumber := Win2016v1709Build; + InternalExtraUpdateInfo := 'Version 1709'; + end + else if IsBuildNumber(Win2016v1803Build) then + begin + InternalBuildNumber := Win2016v1803Build; + InternalExtraUpdateInfo := 'Version 1803'; + end + else if IsBuildNumber(Win2019IP180320Build) then + begin + InternalBuildNumber := Win2019IP180320Build; + InternalExtraUpdateInfo := Win2019IPExtra(Win2019IP180320Build); + end + else if IsBuildNumber(Win2019IP180324Build) then + begin + InternalBuildNumber := Win2019IP180324Build; + InternalExtraUpdateInfo := Win2019IPExtra(Win2019IP180324Build); + end + else if IsBuildNumber(Win2019IP180515Build) then + begin + InternalBuildNumber := Win2019IP180515Build; + InternalExtraUpdateInfo := Win2019IPExtra(Win2019IP180515Build); + end + else if IsBuildNumber(Win2019IP180619Build) then + begin + InternalBuildNumber := Win2019IP180619Build; + InternalExtraUpdateInfo := Win2019IPExtra(Win2019IP180619Build); + end + else if IsBuildNumber(Win2019IP180710Build) then + begin + InternalBuildNumber := Win2019IP180710Build; + InternalExtraUpdateInfo := Win2019IPExtra(Win2019IP180710Build); + end + else if IsBuildNumber(Win2019IP180716Build) then + begin + InternalBuildNumber := Win2019IP180716Build; + InternalExtraUpdateInfo := Win2019IPExtra(Win2019IP180716Build); + end + else if IsBuildNumber(Win2019IP180716Build) then + begin + InternalBuildNumber := Win2019IP180716Build; + InternalExtraUpdateInfo := Win2019IPExtra(Win2019IP180716Build); + end + else if IsBuildNumber(Win2019IP180731Build) then + begin + InternalBuildNumber := Win2019IP180731Build; + InternalExtraUpdateInfo := Win2019IPExtra(Win2019IP180731Build); + end + else if IsBuildNumber(Win2019IP180814Build) then + begin + InternalBuildNumber := Win2019IP180814Build; + InternalExtraUpdateInfo := Win2019IPExtra(Win2019IP180814Build); + end + else if IsBuildNumber(Win2019IP180821Build) then + begin + InternalBuildNumber := Win2019IP180821Build; + InternalExtraUpdateInfo := Win2019IPExtra(Win2019IP180821Build); + end + else if IsBuildNumber(Win2019IP180828Build) then + begin + InternalBuildNumber := Win2019IP180828Build; + InternalExtraUpdateInfo := Win2019IPExtra(Win2019IP180828Build); + end + else if IsBuildNumber(Win2019v1809Build) then + begin + InternalBuildNumber := Win2019v1809Build; + InternalExtraUpdateInfo := 'Version 1809'; + end + else if IsBuildNumber(Win2019v1903Build) then + begin + InternalBuildNumber := Win2019v1903Build; + InternalExtraUpdateInfo := 'Version 1903'; + end + else if IsBuildNumber(Win2019v1909Build) then + begin + InternalBuildNumber := Win2019v1909Build; + InternalExtraUpdateInfo := 'Version 1909'; + end end; end; end; end; // ** If InternalBuildNumber is 0 when we get here then we failed to get it - // We no longer look in registry as of SVN commit r2001, because this is - // can get spoofed. E.g. when running on Windows 10 TH2 registry call is + // We no longer look in registry as of SVN commit r2001, because this can + // get spoofed. E.g. when running on Windows 10 TH2 registry call is // returning build number of 7600 even though regedit reveals it to be // 10586 ! // So we must now consider a build number of 0 as indicating an unknown @@ -1776,7 +1983,7 @@ class function TPJOSInfo.Edition: string; osWin7, osWinSvr2008R2, osWin8, osWinSvr2012, osWin8Point1, osWinSvr2012R2, - osWin10, osWin10Svr: + osWin10, osWin10Svr, osWinSvr2019: begin // For v6.0 and later we ignore the suite mask and use the new // PRODUCT_ flags from the GetProductInfo() function to determine the @@ -2315,7 +2522,10 @@ class function TPJOSInfo.Product: TPJOSProduct; if not IsServer then Result := osWin10 else - Result := osWin10Svr; + if InternalBuildNumber <= Win2016LastBuild then + Result := osWin10Svr + else + Result := osWinSvr2019; end; end; else @@ -2361,6 +2571,7 @@ class function TPJOSInfo.ProductName: string; osWinSvr2012R2: Result := 'Windows Server 2012 R2'; osWin10: Result := 'Windows 10'; osWin10Svr: Result := 'Windows Server 2016'; + osWinSvr2019: Result := 'Windows Server 2019'; else raise EPJSysInfo.Create(sUnknownProduct); end; @@ -2683,6 +2894,17 @@ class function TPJComputerInfo.ProcessorName: string; ); end; +class function TPJComputerInfo.ProcessorSpeedMHz: Cardinal; +begin + Result := Cardinal( + GetRegistryInt( + HKEY_LOCAL_MACHINE, + 'HARDWARE\DESCRIPTION\System\CentralProcessor\0\', + '~MHz' + ) + ); +end; + class function TPJComputerInfo.SystemManufacturer: string; begin Result := GetRegistryString( From cb5a43700a6d33a446b47db97f1eed93f25980ff Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 02:30:09 +0100 Subject: [PATCH 253/714] Update PJVersionInfo unit to v3.3.2 of 11 Jan 2014 --- Src/3rdParty/PJVersionInfo.pas | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Src/3rdParty/PJVersionInfo.pas b/Src/3rdParty/PJVersionInfo.pas index 6f9b22f63..dbff236c7 100644 --- a/Src/3rdParty/PJVersionInfo.pas +++ b/Src/3rdParty/PJVersionInfo.pas @@ -3,10 +3,10 @@ * v. 2.0. If a copy of the MPL was not distributed with this file, You can * obtain one at http://mozilla.org/MPL/2.0/ * - * Copyright (C) 1998-2013, Peter Johnson (www.delphidabbler.com). + * Copyright (C) 1998-2014, Peter Johnson (www.delphidabbler.com). * - * $Rev$ - * $Date$ + * $Rev: 1515 $ + * $Date: 2014-01-11 02:36:28 +0000 (Sat, 11 Jan 2014) $ * * Version Information Component. The component reads version information from * executable files. @@ -35,14 +35,17 @@ {$ENDIF} // Switch off unsafe code warnings if switch supported {$IFDEF CONDITIONALEXPRESSIONS} - {$IF CompilerVersion >= 15.0} // >= Delphi 7 - {$WARN UNSAFE_CODE OFF} + {$IF CompilerVersion >= 24.0} // Delphi XE3 and later + {$LEGACYIFEND ON} // NOTE: this must come before all $IFEND directives + {$IFEND} + {$IF CompilerVersion >= 23.0} // Delphi XE2 and later + {$DEFINE Supports_RTLNameSpaces} {$IFEND} - {$IF CompilerVersion >= 18.0} // >= Delphi 2006 + {$IF CompilerVersion >= 18.0} // Delphi 2006 and later {$DEFINE Supports_AdvancedRecords} {$IFEND} - {$IF CompilerVersion >= 23.0} // Delphi XE2 - {$DEFINE Supports_RTLNameSpaces} + {$IF CompilerVersion >= 15.0} // Delphi 7 and later + {$WARN UNSAFE_CODE OFF} {$IFEND} {$ENDIF} From 10474d27521da590b0685813117464201f298fd0 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 02:45:14 +0100 Subject: [PATCH 254/714] Remove TODOs that are now referenced in "Refactoring" card in GitHub CodeSnip 4 project --- Src/FmAboutDlg.pas | 2 -- Src/FmMain.pas | 1 - Src/UXMLDocHelper.pas | 2 -- 3 files changed, 5 deletions(-) diff --git a/Src/FmAboutDlg.pas b/Src/FmAboutDlg.pas index 5d2e9aab6..804f93118 100644 --- a/Src/FmAboutDlg.pas +++ b/Src/FmAboutDlg.pas @@ -403,8 +403,6 @@ procedure TAboutDlg.InitHTMLFrames; procedure InitProgramFrame; begin pcDetail.ActivePage := tsProgram; // display page to let browser load OK - { TODO -cRefactor: Change this frmProgram so it's no longer a HTML template - unless we need to add a gravatar link from Web.UInfo unit. } frmProgram.Initialise( 'dlg-about-program-tplt.html', procedure(Tplt: THTMLTemplate) diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 9d1781627..130546c03 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -1046,7 +1046,6 @@ procedure TMainForm.actSelectSnippetsExecute(Sender: TObject); procedure TMainForm.ActSubmitOrExportUpdate(Sender: TObject); begin - // TODO -cRefactor: rename method - no longer shared (Sender as TAction).Enabled := TCodeShareMgr.CanShare; end; diff --git a/Src/UXMLDocHelper.pas b/Src/UXMLDocHelper.pas index 6999ff6a4..e198943b0 100644 --- a/Src/UXMLDocHelper.pas +++ b/Src/UXMLDocHelper.pas @@ -9,8 +9,6 @@ * documents. } -{ TODO -cRefactor: Separate out generic helper code from snippets XML file - specific code. Put generic code in super-class? } unit UXMLDocHelper; From 07ed26e9795abad7c2435e0f69c3b1f61ab1f791 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 02:51:19 +0100 Subject: [PATCH 255/714] Remove TODOs that are now referenced in "SWAG Changes" card in GitHub CodeSnip 4 project --- Src/FmSWAGImportDlg.pas | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index 3c702ba64..d87ce6685 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -10,14 +10,6 @@ } -{TODO -cSWAG: Add facility to elect to use swag categories } -{TODO -cSWAG: Consider removing callbacks } -{TODO -cSWAG: Consider using cutdown version on progress form for init swag and - loading multiple snippets. - Perhaps use a base class frame - TBusyBaseFrame that gets - subclassed by TBusyFrame. Can also rewrite TProgressFrame as a - subclass of TBusyBaseFrame.} - unit FmSWAGImportDlg; interface From 90a3039bd85638005bda147402908c08cf3e224b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 1 Apr 2020 02:53:24 +0100 Subject: [PATCH 256/714] Remove TODO that is now referenced in "Rationlise use of TFontHelper methods" card in GitHub CodeSnip 4 project --- Src/CodeSnip.todo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index e1749ad3c..28079a010 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -4,6 +4,6 @@ {TODO -cHelp : Add a Backup Database task help topics that describes how to backup and restore databases. Then add help link to Res/HTML/dlg-dbupdate-intro-tplt.html} -{TODO -cUI : Rationalise use of TFontHelper.SetDefaultFont(s) and .SetDefaultBaseFont(s) methods.} + {TODO -cPreRelease : Remove -[**dev**] from product and file versions in .vi files before bumping release number} From acec703737c59cefe9f54ae34d8938fb315c393d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 2 Apr 2020 01:30:47 +0100 Subject: [PATCH 257/714] Sort file names in [Files] section of help project file --- Src/Help/CodeSnip.hhp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Src/Help/CodeSnip.hhp b/Src/Help/CodeSnip.hhp index df7891b0c..9609675ba 100644 --- a/Src/Help/CodeSnip.hhp +++ b/Src/Help/CodeSnip.hhp @@ -6,7 +6,6 @@ ; ; CodeSnip help project file. - [OPTIONS] Compatibility=1.1 Compiled file=..\..\Exe\CodeSnip.chm @@ -17,9 +16,9 @@ Index file=Index.hhk Language=0x809 English (United Kingdom) Title=CodeSnip Help - [FILES] HTML\about_compiler_checks.htm +HTML\about_swag.htm HTML\detail_pane.htm HTML\dlg_about.htm HTML\dlg_addcategory.htm @@ -27,18 +26,22 @@ HTML\dlg_backup.htm HTML\dlg_configcompilers.htm HTML\dlg_deletecategory.htm HTML\dlg_dependencies.htm +HTML\dlg_dependencies_edit.htm HTML\dlg_duplicatesnippet.htm HTML\dlg_editsnippet.htm HTML\dlg_elementcolour.htm HTML\dlg_export.htm HTML\dlg_exportfile.htm +HTML\dlg_favourites.htm HTML\dlg_findcompiler.htm HTML\dlg_findtext.htm HTML\dlg_findxrefs.htm HTML\dlg_firstrun.htm +HTML\dlg_hilitemgr.htm HTML\dlg_import.htm HTML\dlg_importfile.htm HTML\dlg_loadselection.htm +HTML\dlg_moveuserdb.htm HTML\dlg_pagesetup.htm HTML\dlg_preferences.htm HTML\dlg_prefs_codegen.htm @@ -48,13 +51,16 @@ HTML\dlg_prefs_hiliter.htm HTML\dlg_prefs_printing.htm HTML\dlg_prefs_snippetlayout.htm HTML\dlg_prefs_sourcecode.htm +HTML\dlg_prefs_updates.htm HTML\dlg_print.htm HTML\dlg_renamecategory.htm HTML\dlg_restore.htm +HTML\dlg_savehiliter.htm HTML\dlg_saveselection.htm HTML\dlg_savesnippet.htm HTML\dlg_selectcompiler.htm HTML\dlg_selectroutines.htm +HTML\dlg_swagimport.htm HTML\dlg_testcompile.htm HTML\dlg_trappedbugreport.htm HTML\dlg_update.htm @@ -77,6 +83,7 @@ HTML\menu_tools.htm HTML\menu_view.htm HTML\navigation.htm HTML\new.htm +HTML\notifiy_database_update.htm HTML\overview_pane.htm HTML\privacy_statement.htm HTML\quickstart.htm @@ -88,7 +95,6 @@ HTML\snippet_kinds.htm HTML\snippet_routine.htm HTML\snippet_type.htm HTML\snippet_unit.htm -HTML\tasks.htm HTML\task_addsnippets.htm HTML\task_copysnippet.htm HTML\task_customise.htm @@ -99,13 +105,5 @@ HTML\task_savesnippet.htm HTML\task_search.htm HTML\task_testcompile.htm HTML\task_update.htm +HTML\tasks.htm HTML\welcome.htm -HTML\dlg_favourites.htm -HTML\dlg_moveuserdb.htm -HTML\dlg_savehiliter.htm -HTML\dlg_hilitemgr.htm -HTML\dlg_prefs_updates.htm -HTML\notifiy_database_update.htm -HTML\dlg_dependencies_edit.htm -HTML\about_swag.htm -HTML\dlg_swagimport.htm From 9764660b0605b08c510ae991a0dd7ca78ee5c70b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 2 Apr 2020 02:28:13 +0100 Subject: [PATCH 258/714] Add notes about differences in compiler settings between different editions of CodeSnip --- Src/Help/HTML/about_compiler_checks.htm | 14 +++++++++----- Src/Help/HTML/dlg_configcompilers.htm | 9 ++++++--- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Src/Help/HTML/about_compiler_checks.htm b/Src/Help/HTML/about_compiler_checks.htm index 716ca984a..52139a1b3 100644 --- a/Src/Help/HTML/about_compiler_checks.htm +++ b/Src/Help/HTML/about_compiler_checks.htm @@ -52,11 +52,15 @@

    Configure Compilers dialogue box.

    - Compiler configuration is stored on a per user basis, i.e. each user - account maintains separate compiler configuration information. Therefore - each user must configure compilers separately. The reason for this is that - each user may wish to use a different set of available compilers and / or - may wish to use different compiler switches and search paths. + When using the standard version of CodeSnip, compiler configuration is + stored on a per user basis, i.e. each user account maintains separate + compiler configuration information. Therefore each user must configure + compilers separately. The reason for this is that each user may wish to + use a different set of available compilers and / or may wish to use + different compiler switches and search paths. +

    +

    + The portable version of CodeSnip only maintains one set of compiler configuration information per installation.

    Running the tests diff --git a/Src/Help/HTML/dlg_configcompilers.htm b/Src/Help/HTML/dlg_configcompilers.htm index f35527077..39a2896f0 100644 --- a/Src/Help/HTML/dlg_configcompilers.htm +++ b/Src/Help/HTML/dlg_configcompilers.htm @@ -39,15 +39,18 @@

    these compilers when test compiling routines.

    +

    + When using the standard version of CodeSnip each logged on user has their + their own compiler configuration, so any changes you make will not affect + other users. The portable edition of CodeSnip only supports one set of + configuration data per installation. +

    Supported compilers are listed on the left hand side of the dialogue. If a compiler is known to CodeSnip its name appears in bold. Unknown compilers (or compilers that are not installed on the local system) appear in plain text.

    -

    - Any changes you make do not affect other users. -

    Selecting a compiler on the left displays information about it on the right hand side of the dialogue. Here you enter or edit the required From 1228ffda02e2846f8e705035de08acfe438f2cb7 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 2 Apr 2020 02:29:24 +0100 Subject: [PATCH 259/714] Fix errors in help topics --- Src/Help/HTML/dlg_configcompilers.htm | 8 ++++---- Src/Help/HTML/dlg_findcompiler.htm | 2 +- Src/Help/HTML/dlg_selectcompiler.htm | 4 ++-- Src/Help/HTML/explain_all_compilers_hidden.htm | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Src/Help/HTML/dlg_configcompilers.htm b/Src/Help/HTML/dlg_configcompilers.htm index 39a2896f0..c928fd56c 100644 --- a/Src/Help/HTML/dlg_configcompilers.htm +++ b/Src/Help/HTML/dlg_configcompilers.htm @@ -67,7 +67,7 @@

    by clicking the ellipsis button to the right of the edit box. The chosen file name is entered in the edit box. As soon as the cursor leaves the edit box the file name is checked for validity – it must exist and - be an executable file. If it valid it is used and compiler name will be + be an executable file. If it is valid the compiler name will be emboldened.

    @@ -98,7 +98,7 @@

    kinds of snippet pages.

    - Switches + Switches Tab

    CodeSnip passes certain switches to the command line of each @@ -157,7 +157,7 @@

    correctly.

    - Namespaces + Namespaces Tab

    Note: This tab appears only if the selected compiler is @@ -204,7 +204,7 @@

    see your compiler's documentation.

    - Search Paths + Search Paths Tab

    If you have your own or third party units you want your user-defined diff --git a/Src/Help/HTML/dlg_findcompiler.htm b/Src/Help/HTML/dlg_findcompiler.htm index 00e72cf7c..f0910fc23 100644 --- a/Src/Help/HTML/dlg_findcompiler.htm +++ b/Src/Help/HTML/dlg_findcompiler.htm @@ -119,7 +119,7 @@

    The dialogue box will have remembered details of your previous search, - so deselect Delphi 7, 2006 2010 and select Delphi XE and XE2 in the + so deselect Delphi 7, 2006 & 2010 and select Delphi XE and XE2 in the Compilers list. Now choose Does not compile in the Criteria drop down list and change the search logic to Find all compilers. Ensure that Refine existing search scope is diff --git a/Src/Help/HTML/dlg_selectcompiler.htm b/Src/Help/HTML/dlg_selectcompiler.htm index a2504db93..797645543 100644 --- a/Src/Help/HTML/dlg_selectcompiler.htm +++ b/Src/Help/HTML/dlg_selectcompiler.htm @@ -35,12 +35,12 @@

    Click OK to confirm the selection. This will close the dialogue - box and enter the selected file name into the edit box next the the + box and enter the selected file name into the edit box next to the ellipsis button. If the selected file does not exist an error message will be displayed and the dialogue box will not close.

    - Click the Cancel to cancel the selection. + Click the Cancel button to cancel the selection.

    diff --git a/Src/Help/HTML/explain_all_compilers_hidden.htm b/Src/Help/HTML/explain_all_compilers_hidden.htm index 5287949fe..1139f2583 100644 --- a/Src/Help/HTML/explain_all_compilers_hidden.htm +++ b/Src/Help/HTML/explain_all_compilers_hidden.htm @@ -58,7 +58,7 @@

    configured the compilers so that none of them display in the table.

    - There are two possible solutions, depending on whether you compiler + There are two possible solutions, depending on whether you want compiler results to be displayed or not.

    @@ -66,7 +66,7 @@

    Assuming you do want compiler results displayed you need to tell - CodeSnip enable this in the CodeSnip to enable this in the Configure Compilers dialogue box.

    @@ -80,9 +80,9 @@

    box. Repeat this step for each compiler whose results you want to display.

    - When you have done, close the dialogue box using the OK button. - If you are currently displaying a snippet the display will change and the - above message will be replaced by a table of the required compiler + When you have finished, close the dialogue box using the OK + button. If you are currently displaying a snippet the display will change + and the above message will be replaced by a table of the required compiler results.

    From 9698c70d5a7eeac4295923853551faa1e931ab50 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 2 Apr 2020 03:24:19 +0100 Subject: [PATCH 260/714] Update, correct and clarify main menu help topics --- Src/Help/HTML/main_menu.htm | 12 +++++------- Src/Help/HTML/menu_compile.htm | 7 +++++-- Src/Help/HTML/menu_database.htm | 14 ++++++++------ Src/Help/HTML/menu_edit.htm | 4 +--- Src/Help/HTML/menu_file.htm | 2 +- Src/Help/HTML/menu_help.htm | 14 -------------- Src/Help/HTML/menu_search.htm | 8 ++++---- Src/Help/HTML/menu_snippets.htm | 10 +++++----- Src/Help/HTML/menu_view.htm | 7 ++++--- 9 files changed, 33 insertions(+), 45 deletions(-) diff --git a/Src/Help/HTML/main_menu.htm b/Src/Help/HTML/main_menu.htm index 2cc45600a..26d7ada2e 100644 --- a/Src/Help/HTML/main_menu.htm +++ b/Src/Help/HTML/main_menu.htm @@ -30,7 +30,7 @@

    File - Save snippets and units, print snippets and exit the program. + Save snippets, units & selections, print snippets and exit the program. @@ -64,8 +64,8 @@

    Snippets - Create, edit and delete user defined snippet. Also allows snippets to - be imported and exported. + Create, edit and delete user defined snippets. Also allows snippets to + be imported, exported and favourited. @@ -81,8 +81,7 @@

    Database - Save, backup and restore the user database and update the main - database from the web. + Various database save, restore and update operations. @@ -107,8 +106,7 @@

    Help - Help file, web links, license, copyright, donations, news blog and - acknowledgements. + Help file, license, web links and about box. diff --git a/Src/Help/HTML/menu_compile.htm b/Src/Help/HTML/menu_compile.htm index b2cd4f297..3694dc72c 100644 --- a/Src/Help/HTML/menu_compile.htm +++ b/Src/Help/HTML/menu_compile.htm @@ -38,7 +38,8 @@

    Test Compile Results dialogue box. See About Compiler Checks for more - information. + information. This option is disabled if the snippet is + freeform. @@ -50,6 +51,8 @@

    Displays any test compilation errors and warnings in a dialogue box. + This option is disabled if the snippet is + freeform. @@ -61,7 +64,7 @@

    Displays a dialogue box that shows source code of the unit used to - test compile the selected snippet. This option is not available if the + test compile the selected snippet. This option is disabled if the snippet is freeform. diff --git a/Src/Help/HTML/menu_database.htm b/Src/Help/HTML/menu_database.htm index 4433a71fa..f38b6bc2f 100644 --- a/Src/Help/HTML/menu_database.htm +++ b/Src/Help/HTML/menu_database.htm @@ -69,14 +69,16 @@

    - Menu icon +   - Update From Web + Install or Update DelphiDabbler Snippets Database - Displays the Update from Web dialogue box - that enables the main code snippets database to be updated. + Displays the Install or Update DelphiDabbler + Snippets Database dialogue box that enables the main code snippets + database to be updated from a local copy of the DelphiDabbler Snippets + Database. @@ -87,10 +89,10 @@

    Move User Database† - Displays the Move User Database + Displays the Move User Database dialogue box from where the user defined database files can be moved to a diffent folder. The main reason for this option is so that the - user can locate the database in a suitable location for backing up, + user can locate the database in a suitable location for backing up, such as a DropBox or Google Drive sub-directory. diff --git a/Src/Help/HTML/menu_edit.htm b/Src/Help/HTML/menu_edit.htm index 437ad9424..56ac55cc8 100644 --- a/Src/Help/HTML/menu_edit.htm +++ b/Src/Help/HTML/menu_edit.htm @@ -81,7 +81,7 @@

    Copy Source Code
    - [Shift+U] + [Shift+Ctrl+C] Copies only the source code of the selected snippet to the clipboard @@ -98,8 +98,6 @@

    Selects all the text in the Detail Pane. - This menu option is disabled if the Detail Pane does not have the - input focus. diff --git a/Src/Help/HTML/menu_file.htm b/Src/Help/HTML/menu_file.htm index cf9179934..b0eb3ce64 100644 --- a/Src/Help/HTML/menu_file.htm +++ b/Src/Help/HTML/menu_file.htm @@ -72,7 +72,7 @@

    [Shift+Alt+S] - Saves a list snippets selected by the most recent search. This + Saves a list of snippets selected by the most recent search. This selection can then be reloaded later. The Save Selection dialogue box is displayed where the required file name is entered. Note that this diff --git a/Src/Help/HTML/menu_help.htm b/Src/Help/HTML/menu_help.htm index b33ddf9bf..e483567ee 100644 --- a/Src/Help/HTML/menu_help.htm +++ b/Src/Help/HTML/menu_help.htm @@ -136,20 +136,6 @@

    >CodeSnip FAQs in the default web browser. - - - Menu icon - - - Donate - - - Choose this option to make a donation to help support development of - CodeSnip and the online database. Displays a dialogue box - containing a button to click to make a payment online using - PayPal™. - - Menu icon diff --git a/Src/Help/HTML/menu_search.htm b/Src/Help/HTML/menu_search.htm index 95f13646e..461421456 100644 --- a/Src/Help/HTML/menu_search.htm +++ b/Src/Help/HTML/menu_search.htm @@ -47,7 +47,7 @@

    Find Compiler(s)
    - [Ctrl+Shift+F] + [Shift+Ctrl+F] Finds snippets that either compile, fail to compile or result in @@ -84,8 +84,8 @@

    [Shift+Ctrl+S] - Allows manual selection of the snippets to be displayed. Displays the - Select Snippets dialogue box + Allows a manual selection of the snippets to be displayed. Displays + the Select Snippets dialogue box where the required snippets are selected. On completion the Overview Pane shows only the selected snippets. @@ -97,7 +97,7 @@

    Show All
    - [Ctrl+Shift+A] + [Shift+Ctrl+A] Restores the whole database after a find operation. All snippets in diff --git a/Src/Help/HTML/menu_snippets.htm b/Src/Help/HTML/menu_snippets.htm index 0016d3ffd..681cef085 100644 --- a/Src/Help/HTML/menu_snippets.htm +++ b/Src/Help/HTML/menu_snippets.htm @@ -113,10 +113,10 @@

    Import Snippets From SWAG - Imports selected snippets from the SWAG - Database into the local user-defined snippets database. The - SWAG Import Wizard is displayed which - is used to select the required snippets. + Imports selected snippets from a local copy of the + SWAG Database into the local user-defined + snippets database. The SWAG Import + Wizard is displayed which is used to select the required snippets. @@ -129,7 +129,7 @@

    Makes the currently display snippet a "Favourite". If the - snippet is already a favourite this option has no effect. + snippet is already a favourite this option is disabled. diff --git a/Src/Help/HTML/menu_view.htm b/Src/Help/HTML/menu_view.htm index 31e3d7c1a..7a8ed14f4 100644 --- a/Src/Help/HTML/menu_view.htm +++ b/Src/Help/HTML/menu_view.htm @@ -96,8 +96,9 @@

    Displays snippets grouped by kind in the - Overview Pane: i.e. routine, type, - constant or freeform. + Overview Pane i.e. class/advanced + record, constant, freeform, + routine, type definition, or unit. @@ -199,7 +200,7 @@

    Collapses all sections in the Overview Pane so that only the section - headings a visible. + headings are visible. From 844bfef73c13538871d4d17cc5bec5902c52cf78 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 12 Apr 2020 01:18:40 +0100 Subject: [PATCH 261/714] Improve content and fix typos --- Src/Help/HTML/welcome.htm | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Src/Help/HTML/welcome.htm b/Src/Help/HTML/welcome.htm index 33feb572e..b9fb31a32 100644 --- a/Src/Help/HTML/welcome.htm +++ b/Src/Help/HTML/welcome.htm @@ -27,7 +27,7 @@

    In addition to managing your own code snippets, CodeSnip can also - download and display source code from the DelphiDabbler

  • The Portable edition which can be run from removable storage, such a memory sticks. It keeps its settings and data files within the - directory in which it is installed. This make the program suitable for + directory in which it is installed. This makes the program suitable for running on more than one computer, taking its data with it. This edition has program file name CodeSnip-p.exe.
  • -

    - You can tell which edition you are using from the program's About - Box. -

    What makes CodeSnip different from other code snippets managers - is that it can test-compile snippets that are in the correct format. It - can also generate a compilable unit containing suitable selected snippets, - taking care of all dependencies. + is that it can test-compile Pascal code snippets. It can also generate a + compilable unit containing suitable selected snippets, taking care of all + dependencies.

    CodeSnip understands several different From e2cd2e5ae32ae5905fc24c59f2591b6506fc7c84 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 24 Apr 2020 13:26:38 +0100 Subject: [PATCH 262/714] Update and correct task help topics --- Src/Help/HTML/task_addsnippets.htm | 6 +- Src/Help/HTML/task_copysnippet.htm | 19 ++---- Src/Help/HTML/task_generateunit.htm | 7 ++- Src/Help/HTML/task_printroutine.htm | 2 +- Src/Help/HTML/task_search.htm | 26 ++++---- Src/Help/HTML/task_testcompile.htm | 5 +- Src/Help/HTML/task_update.htm | 95 +++++++++++++++++++---------- Src/Help/HTML/tasks.htm | 3 +- 8 files changed, 96 insertions(+), 67 deletions(-) diff --git a/Src/Help/HTML/task_addsnippets.htm b/Src/Help/HTML/task_addsnippets.htm index 4c50abd79..59c243391 100644 --- a/Src/Help/HTML/task_addsnippets.htm +++ b/Src/Help/HTML/task_addsnippets.htm @@ -88,9 +88,9 @@

    menu.

    - Snippets from the main database cannot be edited or deleted. User defined - snippets are displayed in a different colour to the snippets from the main - database. + Snippets from the main database cannot be edited or deleted. The names of + user defined snippets are displayed in a different colour to the snippets + from the main database.

    diff --git a/Src/Help/HTML/task_copysnippet.htm b/Src/Help/HTML/task_copysnippet.htm index 7db32ae6d..ad86e2189 100644 --- a/Src/Help/HTML/task_copysnippet.htm +++ b/Src/Help/HTML/task_copysnippet.htm @@ -21,16 +21,15 @@

    Copy Snippet to Clipboard

    - There are three options ways for copying a snippet of code to the - clipboard. + There are three ways to copy a code snippet to the clipboard.

    Copy Information

    Copies all the information about the selected snippet to the clipboard in - both plain text and rich text format. The rich text format version syntax - highlights the source code. + both plain text and rich text format. The rich text format version is + syntax highlighted.

    This option applies to any kind of snippet. Simply select a snippet in the @@ -65,21 +64,15 @@

    Copy Source Code

    - Copies only the source code of the selected snippet in plain text and in - rich text format. Again the rich text copy is syntax highlighted. The + Copies the source code of the selected snippet in plain text and in + rich text format, with the rich text copy being syntax highlighted. The snippet's description is not included as comments.

    This option applies to any kind of snippet. Select a snippet in the Overview Pane and then use the Edit | Copy Source Code menu option or press - Ctrl+U. -

    -

    - You can copy either a single routine or a whole category of routines to - the clipboard. The code is copied as a valid Pascal fragment. Notes of - any required units or other routines are included as comments. To copy a - routine proceed as follows: + Shift+Ctrl+C.

    diff --git a/Src/Help/HTML/task_generateunit.htm b/Src/Help/HTML/task_generateunit.htm index e64901060..1812fedb9 100644 --- a/Src/Help/HTML/task_generateunit.htm +++ b/Src/Help/HTML/task_generateunit.htm @@ -54,8 +54,9 @@

  • Choose the file type, the commenting style and whether you want the - file syntax highlighted using the controls in the dialogue box. You can - preview the file by using the dialogue box's Preview button. + file to be syntax highlighted by using the controls in the dialogue box. + You can use the Preview button to preview the unit. Note that + syntax highlighting is only available for HTML and RTF file types.
  • Click OK to generate the unit. @@ -63,7 +64,7 @@

    See the Save Unit dialogue box help - topic for detailed information about the available options. + topic for detailed information about all available options.

    Whether certain warnings are inihibited in the generated code can be diff --git a/Src/Help/HTML/task_printroutine.htm b/Src/Help/HTML/task_printroutine.htm index 23d3d956f..95c11e746 100644 --- a/Src/Help/HTML/task_printroutine.htm +++ b/Src/Help/HTML/task_printroutine.htm @@ -45,7 +45,7 @@

    The printed document contains the same information that is presented in - the information pane. + the detail pane.

    Note that the default output options and margin size can be configured on diff --git a/Src/Help/HTML/task_search.htm b/Src/Help/HTML/task_search.htm index c4cd8cda3..5ba55786a 100644 --- a/Src/Help/HTML/task_search.htm +++ b/Src/Help/HTML/task_search.htm @@ -30,7 +30,7 @@

    criteria are displayed.

    - Text and compiler searches can be configured to either operate on any + Text and compiler searches can be configured either to operate on any previous search results, effectively refining that search or to operate on the whole database, discarding any previous search results.

    @@ -39,7 +39,7 @@

    database with any existing search results discarded.

    - Serach results can be discarded by clicking the + Search results can be discarded by clicking the Show All button Show All toolbar button or by selecting Search | Show All. Following this all snippets are displayed. @@ -65,7 +65,7 @@

    src="../images/FindCompiler.gif" class="glyph" > Find Compiler(s) toolbar button (or select Search | Find - Compiler) and enter the search criteria in the + Compiler(s)) and enter the search criteria in the Find Compiler(s) Dialogue Box.

    @@ -73,10 +73,10 @@

    This search is provided to enable you to find snippets that are related to - one another. The search finds snippets referenced by the currently - selected snippet. Cross references via the "see also" or - "required snippets" fields can be searched, and searches can be - recursive. + one another. The search finds snippets that are referenced by the + currently selected snippet. Cross references via the "see also" + or "required snippets" fields can be searched, and searches can + be recursive.

    To run the search select a snippet in the @@ -97,7 +97,7 @@

    Select Snippets) you can explicitly choose which snippets are to be displayed in the Overview Pane. This is done in the Select Snippets dialogue - box by simply placing a check mark next to the required snippets. + box by simply placing check marks next to the required snippets.

    The main purpose of this option is to select snippets for inclusion in a @@ -109,15 +109,15 @@

    The results of a search can be saved to disk using the File | Save - Selection menu option. These search results can be loaded from disk - and any matching snippets selected. Doing this replaces any existing - search results. + Selection menu option. To restore the saved selection later use the + File | Load Selection menu option and select the required search + file. Loading a search always replaces any existing search results.

    Note that the search criteria are not saved, just the details of the snippets that were included in the search results. If any snippets from a - saved search result have been deleted when a result set is loaded, any - references to deleted snippets are ignored. + saved search result have been deleted by the time a result set is loaded + then those snippets are quietly ignored.

    diff --git a/Src/Help/HTML/task_testcompile.htm b/Src/Help/HTML/task_testcompile.htm index 655d90fa2..4d43f464d 100644 --- a/Src/Help/HTML/task_testcompile.htm +++ b/Src/Help/HTML/task_testcompile.htm @@ -21,8 +21,9 @@

    Test Compile a Snippet

    - You can check any snippet in the database with all the supported compilers - installed on the local computer, providing the snippet is not + You can check whether any snippet in the database compiles with all + supported compilers that are installed on the local computer, providing + the snippet is not freeform. Proceed as follows:

      diff --git a/Src/Help/HTML/task_update.htm b/Src/Help/HTML/task_update.htm index f2cc79868..d7f100175 100644 --- a/Src/Help/HTML/task_update.htm +++ b/Src/Help/HTML/task_update.htm @@ -12,52 +12,85 @@ - Update Database + Install or Update the DelphiDabbler Code Snippets Database

      - Update Database + Install or Update the DelphiDabbler Code Snippets Database

      - Updates to the code snippets database are made available from time to time - on the web. You can download the latest version of the database easily by - connecting to the internet then clicking the Update Database button Update Database from Web toolbar button or by choosing the - Database | Update From Web menu option. + You can install the DelphiDabbler Code Snippets Database into + CodeSnip as follows.

      +
        +
      1. + Download the latest release of the database from the + delphidabbler/code-snippets project on GitHub. You can find + the latest release at + https://github.com/delphidabbler/code-snippets/releases. +
      2. +
      3. + Unpack the downloaded zip file into a new or empty + folder on your computer. The folder must not be a sub + folder of CodeSnip's application or user database directories. +
      4. +
      5. + Display the Install or Update DelphiDabbler Snippets Database wizard from the + Database | Install or Update DelphiDabbler Snippets + Database menu option. +
      6. +
      7. + Skip the first page of the wizard by clicking Next. +
      8. +
      9. + On the Select database download folder page of the wizard enter + the full path of the folder where you unpacked the downloaded zip file. + Click Next. +
      10. +
      11. + The Install the database page will now be displayed. Click + Load to load the database. +
      12. +
      13. + Once the database has been copied the Database installed page + will be displayed and you can close the wizard using the Finish + button. +
      14. +
      15. + The database is now installed. You can now delete both the downloaded + zip file and the folder where you unpacked it. +
      16. +

      - The Update From Web dialogue box will be displayed. Make sure you are - connected to the internet then click the Update from Web button - to begin the update. + You can periodically check the delphidabbler/code-snippets + GitHub account to see if any new releases have been made. To update to the + latest release simply repeat the process above.

      +

      + Notes +

      - By default CodeSnip checks periodically to find if any database - updates are available. It displays a pop-up notification in the main - window if an update is available. The notification includes a button that - displays the Update From Web dialogue box mentioned above. You can switch this - feature off, or change the frequency with which checks are made, by using - the Updates tab of the Preferences dialogue box. -

      -

      - Database updates apply to all users. This is because only one copy of the - database exists on the computer. + A single copy of DelphiDabbler Code Snippets Database is shared by all + users of the same computer.

      Updating the database has no effect on any user-defined snippets that have been created – they are not overwritten by the update process. + However, it does no harm to take a backup of your snippets before + performing the update! Use the Database | Backup User Database + menu option to do this. +

      +

      + You cannot edit snippets from the Code Snippets Database. You can identify + them easily because, by default, the snippet name is displayed in a + different colour to user-defined snippets.

      diff --git a/Src/Help/HTML/tasks.htm b/Src/Help/HTML/tasks.htm index d80bc01c4..d5026cae9 100644 --- a/Src/Help/HTML/tasks.htm +++ b/Src/Help/HTML/tasks.htm @@ -52,7 +52,8 @@

      Test Compile a Snippet
    1. - Update the Database + Install or Update the DelphiDabbler Code + Snippets Database
    2. Customise CodeSnip From 174b301d96d255b9020c820ed9298ee5b9adf342 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 24 Apr 2020 13:27:08 +0100 Subject: [PATCH 263/714] Update and correct all snippet kind help topics --- Src/Help/HTML/snippet_class.htm | 58 +++++++++++++++++------------- Src/Help/HTML/snippet_constant.htm | 16 ++++----- Src/Help/HTML/snippet_freeform.htm | 29 +++++++-------- Src/Help/HTML/snippet_kinds.htm | 29 ++++++++------- Src/Help/HTML/snippet_routine.htm | 41 ++++++++++++--------- Src/Help/HTML/snippet_type.htm | 9 ++--- Src/Help/HTML/snippet_unit.htm | 12 +++---- 7 files changed, 106 insertions(+), 88 deletions(-) diff --git a/Src/Help/HTML/snippet_class.htm b/Src/Help/HTML/snippet_class.htm index c34d7c29c..d596aa09f 100644 --- a/Src/Help/HTML/snippet_class.htm +++ b/Src/Help/HTML/snippet_class.htm @@ -27,8 +27,8 @@

      Class & Advanced Record Snippets

      - A class (or advanced record) snippet, defines a single Pascal - class or advanced record (i.e. record with methods). + A snippet of the class & advanced record kind defines one or more + Pascal classes or advanced records (i.e. records with methods).

      The source code must conform to the following rules: @@ -36,13 +36,14 @@

      • Each snippet must begin with the type keyword as the - first non-white-space text in the source code. Comments should not - preceed it. Ideally the type keyword should be on a - line on its own. + first non-white-space text in the source code. Comments must not + precede it. The type keyword must be followed by at + least one space or a new line.
      • - Next follow all the class declarations. Addition type - keywords may be used. + Next follows the class or advance record declaration(s). Additional + type keywords may be used between types, but are not + required.
      • Method implementations follow once all the class / record types @@ -50,17 +51,17 @@

        classes and record types.

      • - The implementation keyword must not be used to separate - the declaration and the implementation: CodeSnip works out - where the implementation starts. + Unlike in a Pascal unit, the implementation keyword + must not be used to separate the declaration and the implementation: CodeSnip works out where the implementation + starts.

      Warning: It is an error to use this - snippet kind for records or classes that have no methods – use simple type definition instead. It is also an error to define more - than one class per snippet. + >simple type definition snippet instead.

      Here are examples valid class and advanced record snippets: @@ -98,25 +99,34 @@

      constructor Create(AX, AY: Integer); end; +type // optional type keyword + TRectEx = record + Top, Left, Width, Height: Integer; + constructor Create(ATop, ALeft, AWidth, AHeight: Integer); + end; + constructor TPointEx.Create(AX, AY: Integer); begin X := AX; Y := AY; +end; + +constructor TRectEx.Create(ATop, ALeft, AWidth, AHeight: Integer); +begin + Top := ATop; + Left := ALeft; + Width := AWidth; + Height := AHeight; end;

      - Class and Advanced Record snippets may refer to other classes or advanced - records, routines, - simple type definitions or + Class & Advanced Record snippets may refer to other class & + advanced record snippets, routines, + simple type definitions and constants, providing they are defined - in Delphi units or elsewhere in the database. The snippet's units and - dependency references should indicate where to find referenced types, - constants and routines. Freeform + in Delphi units or elsewhere in the database. The snippet's units + and dependency references should indicate where to find the + referenced snippets. Freeform and unit snippets may not be referenced.

      -

      - It is important that CodeSnip can understand the code because it - must be able to separate the declaration and implementation parts when - generating a unit containing the snippet. -

      diff --git a/Src/Help/HTML/snippet_constant.htm b/Src/Help/HTML/snippet_constant.htm index 2b8060f15..88ca84307 100644 --- a/Src/Help/HTML/snippet_constant.htm +++ b/Src/Help/HTML/snippet_constant.htm @@ -32,9 +32,9 @@

      Each constant snippet begins with the const keyword as - the first non-space text in the source code. Comments may not preceed it. - The const keyword is followed by at least one space or - newline and then one or more constant definitions. + the first non-space text in the source code. Comments may not precede it. + The const keyword is followed by at least one space or a + new line and then one or more constant definitions.

      Here's an example of a valid constant snippet: @@ -44,11 +44,11 @@

      cRangeMin = 1; cIntArray: array[cRangeMin..cRangeMax] of Integer = (42, 56, 99);

      - Constant snippets may refer to other - simple type definitions, - class & advanced record definitions - or constants, providing they are defined in Delphi units or elsewhere in - the database. The snippet's units and dependencies references should + Constant snippets may refer to other constant definitions, + simple type definitions or + class & advanced record definitions, + providing they are defined in Delphi units or elsewhere in the database. + The snippet's units and dependencies references should indicate where to find the other types and constants. Constants may not reference routine, unit or diff --git a/Src/Help/HTML/snippet_freeform.htm b/Src/Help/HTML/snippet_freeform.htm index 6eaf1764e..bf7b7b6ba 100644 --- a/Src/Help/HTML/snippet_freeform.htm +++ b/Src/Help/HTML/snippet_freeform.htm @@ -29,12 +29,12 @@

      Unlike the other snippet kinds, freeform code snippets can contain any kind of source code. The - code does not need to compilable, and nor does its layout need to conform - to any rules. + code can be in any language, does not need to be compilable and does not + have to conform to any layout rules.

      Because of the nature of freeform snippets, CodeSnip can make no - assumptions about them, and therefore cannot include the code in a + assumptions about them and therefore cannot include the code in a compilable unit. This has two major implications:

        @@ -43,18 +43,13 @@

      1. The snippets cannot be test-compiled (because CodeSnip cannot - generate a test unit. + generate a test unit).

      If you can live without these features and just want to use CodeSnip as a simple code repository, freeform snippets are by - far the easiest way to create your own snippets as there are no rules - to conform to. -

      -

      - Note: You will never find freeform code in the online - database. + far the easiest way to create your own snippets.

      When should freeform be used? @@ -72,8 +67,8 @@

      other units and routines, although you can if you wish.

    3. - The code doesn't conform with one of CodeSnip's other snippet - kinds, for example if the code is a class or a complete unit. + The code doesn't conform with the requirements of one of + CodeSnip's other snippet kinds.
    4. @@ -82,17 +77,19 @@

      Select the snippet in the Overview Pane and look in the Detail Pane. Look for the - "Kind" section below the source code. + "Kind" section. (This section appears just below the source code + unless the display layout has been + customised.)

      - How do I change the snippet to another kind? + How do I change a freeform snippet to another kind?

      Select the snippet in the Overview Pane then select the Snippets | Edit Snippet menu item to open the Edit Snippet dialogue box. On the - Code tab select a value in the Kind drop down list and - press OK. + Code tab select a suitable value in the Kind drop down + list and press OK.

      Warning: Don't change the kind unless you diff --git a/Src/Help/HTML/snippet_kinds.htm b/Src/Help/HTML/snippet_kinds.htm index b1309f8a3..6144ce159 100644 --- a/Src/Help/HTML/snippet_kinds.htm +++ b/Src/Help/HTML/snippet_kinds.htm @@ -28,11 +28,12 @@

      CodeSnip is more than just a simple repository for your code - snippets, it can do some other things like create compilable units and - test-compile your code that mean it needs to know something about your - code. For that reason each snippet must be identified as one of six - kinds, and there are rules governing the layout of the source code for - each kind. The six kinds are: + snippets. If you're using Pascal it can do some other things like + generate compilable units and test-compile your code. To be able to do + this CodeSnip needs to know something about your code. For that + reason each snippet must be identified as one of six kinds, and there are + rules governing the layout of the source code for each kind. The six kinds + are:

      1. @@ -69,21 +70,23 @@

        Freeform code
        A catch all for any snippet that is not one of the above types. Can contain anything. Freeform code can't be included in a - generated unit and nether can it be test complied.
        + generated unit and neither can it be test complied. This kind is also + used for non-Pascal code.
        Learn more.

      If you want to be able use all of CodeSnip's functionality you - must designate each of your snippets as one of the the first five kinds. - Use the "learn more" links to find out what you need to do to - comply with the requirements. Another way to learn is to examine the code - from the main database, since it all conforms. + must designate each of your Pascal snippets as one of the the first five + kinds. Use the "learn more" links to find out what you need to + do to comply with the requirements. Another way to learn is to examine the + code from the main DelphiDabbler Code Snippets database, since it all + conforms.

      - On the other hand if you only want to use CodeSnip as a - repository for your code snippets, and don't want test compiling, just - designate everything as freeform. Or mix and match. + On the other hand if you don't use Pascal or don't need + CodeSnip's advanced support for Pascal code, just designate + everything as freeform. Or mix and match. It's up to you.

      diff --git a/Src/Help/HTML/snippet_routine.htm b/Src/Help/HTML/snippet_routine.htm index 8459f2d53..a2658a41e 100644 --- a/Src/Help/HTML/snippet_routine.htm +++ b/Src/Help/HTML/snippet_routine.htm @@ -28,37 +28,38 @@

      A routine snippet, defines exactly one Pascal procedure or function. - Methods are not permitted. + Methods are not permitted (see the class & + advanced record kind for how to deal with methods).

      Each routine snippet begins with either the function or procedure keyword followed by a valid Pascal routine - prototype (see below). No source code or comments may not preceed the + prototype (see below). No source code or comments may precede the function or procedure keywords. The - following directives may be included in the prototype. + following directives may be included in the prototype:

      • - register + register
      • - pascal + pascal
      • - cdecl + cdecl
      • - stdcall + stdcall
      • - safecall + safecall
      • - overload + overload

      - After the routine prototype there must be at least one space or newline + After the routine prototype there must be at least one space or a new line before the routine's implementation. Private functions, procedures, type definitions, variables and constants are permitted.

      @@ -80,10 +81,10 @@

      simple type definitions, class & advanced record definitions or constants, providing they are defined - in Delphi units or elsewhere in the database. The snippet's units and - dependency references should indicate where to find referenced types, - constants and routines. Routine snippets may not reference - freeform or + in Delphi units or elsewhere in the database. The snippet's units + and dependency references should indicate where to find + referenced types, constants and routines. Routine snippets may not + reference freeform or unit snippets.

      @@ -97,9 +98,15 @@

      You may use overloaded routines by creating a separate routine snippet for each overloaded version of the routine. The overload - directive must be used. While the name of the routines used in the source - code must be the same for each overloaded routine, each snippet must be - given a unique name for use by the database. + directive must be used for each snippet. +

      +

      + While the name of the routines in source code must obviously be the same, + each snippet must be given a unique name for use by the database. For + example if there are two overloaded routines named MyFunc you + could use MyFunc_A and MyFunc_B as the snippet's name in + the database. The main DelphiDabbler Snippets Database has plenty of + examples.

      diff --git a/Src/Help/HTML/snippet_type.htm b/Src/Help/HTML/snippet_type.htm index 1d50310d1..0b98d9e04 100644 --- a/Src/Help/HTML/snippet_type.htm +++ b/Src/Help/HTML/snippet_type.htm @@ -29,7 +29,7 @@

      A simple type definition snippet, unsurprisingly, defines one or more Pascal types. Only simple types are supported. Classes, objects and - records that contain methods are not: use + records that contain methods are not supported: use class & advanced record snippet kinds for those. If you're not sure, the only types supported are those that can be completely defined in the interface section of a unit. @@ -38,7 +38,7 @@

      Each type definition snippet must begin with the type keyword as the first non-space text in the source code. Comments may not preceed it. The type keyword is followed by at least one - space or newline and then one or more type definitions. + space or a new line and then one or more type definitions.

      Here's an example of a valid type definition: @@ -51,8 +51,9 @@

      class & advanced record type definitions or constants, providing they are defined in Delphi units or elsewhere in the database. The - snippet's units and dependencies references should indicate where to find - the other types and constants. Type definitions must not reference + snippet's units and dependencies references should + indicate where to find the other types and constants. Type definitions + must not reference routine, unit or freeform snippets. diff --git a/Src/Help/HTML/snippet_unit.htm b/Src/Help/HTML/snippet_unit.htm index d08a6e23f..88a5ea43a 100644 --- a/Src/Help/HTML/snippet_unit.htm +++ b/Src/Help/HTML/snippet_unit.htm @@ -33,7 +33,7 @@

      Unit snippets are compilable just like all the other - snippet kinds except + snippet kinds, except freeform. However, that is where the similarities end. Specifically, unit snippets:

      @@ -59,8 +59,8 @@

      path.)
    5. - Do not have comments containg the snippet description inserted when - saved. + Do not have comments that contain the snippet description inserted into + the source code when copied or printed.
    6. @@ -99,9 +99,9 @@

      end.

      - In this unit, the Windows and Controls must be - available to the available compilers. All is well in this case because the - units are in the VCL. + In this unit, the Windows and Controls units must be + accessible to the available compilers. All is well in this case because + the units are in the VCL.

      Notes From 10517244f133bd535ebb63bf4c2002ebd1a1e163 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 24 Apr 2020 21:50:47 +0100 Subject: [PATCH 264/714] Remove redundant help topic re removed database update notifications --- Src/Help/CodeSnip.hhp | 1 - Src/Help/HTML/notifiy_database_update.htm | 43 ----------------------- 2 files changed, 44 deletions(-) delete mode 100644 Src/Help/HTML/notifiy_database_update.htm diff --git a/Src/Help/CodeSnip.hhp b/Src/Help/CodeSnip.hhp index 9609675ba..ee390814a 100644 --- a/Src/Help/CodeSnip.hhp +++ b/Src/Help/CodeSnip.hhp @@ -83,7 +83,6 @@ HTML\menu_tools.htm HTML\menu_view.htm HTML\navigation.htm HTML\new.htm -HTML\notifiy_database_update.htm HTML\overview_pane.htm HTML\privacy_statement.htm HTML\quickstart.htm diff --git a/Src/Help/HTML/notifiy_database_update.htm b/Src/Help/HTML/notifiy_database_update.htm deleted file mode 100644 index 10c645866..000000000 --- a/Src/Help/HTML/notifiy_database_update.htm +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - Database Update Notification Window - - - - - - - -

      - Database Update Notification Window -

      -

      - This notification window appears when CodeSnip has detected that - the online Code Snippets Database has been updated and can be downloaded. -

      -

      - You can click the Update Now button to open the - Update From Web dialogue box from where the - database can be downloaded. -

      -

      - Clicking the down facing arrow at the top right of the window closes the - notification. If you don't use the button, the window disappear roughly - 20 seconds after it appears. -

      - - From 302490ec4026e51705fecfb466b93bbd53c2a63a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 24 Apr 2020 22:48:31 +0100 Subject: [PATCH 265/714] Update and correct "what's new" help topic --- Src/Help/HTML/new.htm | 83 ++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 52 deletions(-) diff --git a/Src/Help/HTML/new.htm b/Src/Help/HTML/new.htm index 87f2143be..aa15e25a5 100644 --- a/Src/Help/HTML/new.htm +++ b/Src/Help/HTML/new.htm @@ -37,26 +37,24 @@

      also be included in generated units.
    7. -
      +

      Snippets from both the main and user databases can now be duplicated - using the Snippets | Duplicate Snippet menu option or - tool button. -

      -
      + using the Snippets | Duplicate Snippet menu option, by + pressing Shift+Ctrl+D or by clicking + the tool + button. +

      +

      This is very useful if you have created a snippet and want to create another one that shares a lot of the source code, dependencies etc. Just duplicate the first one with a new name and edit it as required. It saves a lot of time. -

      +

      +

      There's a second use where you can duplicate a snippet from the main database under the same name and make any tweaks you like to the new version: duplicate snippets are always editable. -

      -
      - Use the Snippets | Duplicate Snippet menu option, press - Shift+Ctrl+D or click the - tool button. -
      +

    8. The Database now supports Unicode text for snippet names, descriptions @@ -65,8 +63,8 @@

      don't understand Unicode source code or unit file names.

    9. - There is now finer control over the control of warnings in generated - code via the $WARN directive. This is controlled on the + There is now finer control over the warnings in generated code via the + $WARN directive. This is controlled on the Code Generation tab of the Preferences dialogue box.
    10. @@ -131,17 +129,17 @@

      Preferences dialogue box.
    11. -
      +

      Snippets can now have an optional "display name" that, unlike the snippet's name, does not need to be unique. This is useful for giving meaningful names to snippets such as overloaded functions. -

      -
      +

      +

      For example snippets ResizeRect_A and ResizeRect_B in the online database now have display names ResizeRect (TSize overload) and ResizeRect (Longint overload) which are much more meaningful. -

      +

    12. Snippet descriptions can now be formatted and can contain multiple @@ -155,11 +153,11 @@

      for notes or snippets in languages other than Pascal.

    13. -
      +

      Information about how a snippet from the online Code Snippets Database was tested is now displayed by means of a glyph at the top right of the detail pane, as follows: -

      +

      • care.
      +
    14. The Welcome page has been completely redesigned to be cleaner and to provide more useful information about the databases and program. @@ -193,7 +192,7 @@

      • - User's can now flag snippets as "Favourites". Press + Users can now flag snippets as "Favourites". Press Shift+Alt+F or click the Menu icon toolbar button to make the displayed snippet a favourite. @@ -211,16 +210,16 @@

        • -
          - You can specify the paths to be searched by the Delphi compilers when +

          + You can specify the paths to be searched by Delphi compilers when looking for used units. This lets you compile snippets that use units other than those provided in the VCL and RTL. For example you can specify a path to the Indy components to compile them. -

          -
          +

          +

          Use the Configure Compilers dialogue box to set the paths on a per-compiler basis. -

          +

        • Results of test compilations (F9) now @@ -228,7 +227,7 @@

          in a tab in the detail pane.

        • - [v4.3] It is easier to specify the namespaces to be + [v4.3] It is now easier to specify the namespaces to be searched for unqualified RTL and VCL units names by entering the required namespaces in the Namespaces tab of the Configure Compilers dialogue box. @@ -241,33 +240,13 @@

        • [v4.1] CodeSnip is now available in both standard and portable editions. The former is the - normal version which is designed to run on one computer and be able to - maintain difference user databases for each logged on user. The new + normal version which is designed to run on one computer and to be able + to maintain different user databases for each logged on user. The new portable edition will run from removable storage and maintains - a single copy of the main and user database on the same storage device. - This make it suitable for use by a single user on more than one + a single copy of the main and user databases on the same storage device. + This makes it suitable for use by a single user on more than one computer.
        • -
        • - There is a new option on the Tools menu that checks - availability of new versions of CodeSnip. [From v4.4 this process can be - automated - see below.] -
        • -
        • -
          - [v4.4] CodeSnip now automatically checks - online for any online Code Snippets Database updates and - shows a small notification window at the bottom right of the main - window if such an update is available. Notifications display a - button that can be used to download the relevant update. -
          -
          - Automatic update checking is switched on by default but you can - disable it, or change the default frequency, from the - Updates tab of the - Preferences dialogue box. -
          -
        • Text and compiler searches can now optionally refine a previous search rather than always searching the entire database. @@ -279,7 +258,7 @@

        For other features of v4 please read the change log for this release and all preceding v4 releases, including From 124c597a34fbac8b22d85420dce64cd478b4ced4 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 24 Apr 2020 22:51:27 +0100 Subject: [PATCH 266/714] Correct typos in license help topic --- Src/Help/HTML/license.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Help/HTML/license.htm b/Src/Help/HTML/license.htm index b3f2d649f..69361bc0a 100644 --- a/Src/Help/HTML/license.htm +++ b/Src/Help/HTML/license.htm @@ -47,7 +47,7 @@

        You may also modify CodeSnip as you wish and you may distribute copies of your modified version under the terms of the Mozilla Public License. The only exception is that you may not use the CodeSnip - name or branding (e.g. the program icon) any any modification you + name or branding (e.g. the program icon) in any modification you distribute unless you have the explicit permission of the copyright holder.

        From b489e444298f249a6beb98cae5d2ba4523ceb737 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 25 Apr 2020 04:29:53 +0100 Subject: [PATCH 267/714] Change method used to highlight REML code --- Src/Help/CSS/codesnip.css | 5 ++ Src/Help/HTML/reml.htm | 105 +++++++++++++++++--------------------- 2 files changed, 52 insertions(+), 58 deletions(-) diff --git a/Src/Help/CSS/codesnip.css b/Src/Help/CSS/codesnip.css index a83f65ef1..bc838fa58 100644 --- a/Src/Help/CSS/codesnip.css +++ b/Src/Help/CSS/codesnip.css @@ -145,6 +145,11 @@ table.menu td.desc { background-color: white; } +pre.reml, +code.reml { + color: purple; +} + .indent { margin-left: 2em; } diff --git a/Src/Help/HTML/reml.htm b/Src/Help/HTML/reml.htm index 3f669a608..c15403f25 100644 --- a/Src/Help/HTML/reml.htm +++ b/Src/Help/HTML/reml.htm @@ -25,10 +25,6 @@ dl dd { margin-left: 24px; } - .code { - font-family: "Courier New"; - color: purple; - } .hilite { background-color: #ff9; } @@ -62,19 +58,19 @@

        Block level tags

        -
        <p>...</p>
        +
        <p>...</p>
        Renders the enclosed markup as a simple paragraph.
        -
        <heading>...</heading>
        +
        <heading>...</heading>
        Renders the enclosed markup as a heading.

        The following rules apply to the use of - <p> and - <heading> + <p> and + <heading>

        1. @@ -82,8 +78,8 @@

        2. The tags must be matched, e.g. - <p> must have a matching - </p>. + <p> must have a matching + </p>.
        3. All text should be embedded within block level tags, e.g.

          1. - <p>Hello World</p> + <p>Hello World</p>
          2. - <heading>Hello</heading>
            - <p>Hello World</p>
            + <heading>Hello</heading>
            + <p>Hello World</p>

          @@ -111,27 +107,19 @@

          highlighted sections are in error, because they are not contained within block tags.

          -

          - blah - <heading>blah</heading> - blah - <p>blah</p> - blah -

          +
          blah<heading>blah</heading>blah<p>blah</p>blah

          However, CodeSnip is quite permissive and, in many cases, automatically adds - <p>...</p> + <p>...</p> tags for text that is not enclosed in block level tags. The above code is interpreted as:

          -

          - <p>blah </p>
          - <heading>blah</heading>
          - <p>blah </p>
          - <p>blah</p>
          - <p>blah</p> -

          +
          <p>blah </p>
          +<heading>blah</heading>
          +<p>blah </p>
          +<p>blah</p>
          +<p>blah</p>

          Inline tags

          @@ -139,40 +127,40 @@

          Here are the available inline tags:

          -
          <strong>...</strong>
          +
          <strong>...</strong>
          Renders the enclosed markup with strong emphasis.
          - Example: <p>Make stuff - <strong>stand out</strong>.</p> + Example: <p>Make stuff + <strong>stand out</strong>.</p>
          -
          <em>...</em>
          +
          <em>...</em>
          Emphasises the enclosed markup.
          - Example: <p>Draw - <em>attention</em> to something.</p> + Example: <p>Draw + <em>attention</em> to something.</p>
          -
          <var>...</var>
          +
          <var>...</var>
          Used to indicate the enclosed markup is a variable.
          - Example: <p>Refer to a function - <var>parameter</var>.</p> + Example: <p>Refer to a function + <var>parameter</var>.</p>
          -
          <warning>...</warning>
          +
          <warning>...</warning>
          Used for warning text.
          Example: - <p><warning>Warning:</warning> - Don't do it!</p> + <p><warning>Warning:</warning> + Don't do it!</p>
          -
          <mono>...</mono>
          +
          <mono>...</mono>
          Renders markup in a mono-spaced font.
          - Example: <p>Use the: - <mono>Windows</mono> unit.</p> + Example: <p>Use the: + <mono>Windows</mono> unit.</p>
          -
          <a href="url">...</a>
          +
          <a href="url">...</a>
          - Creates a hyperlink. The href attribute must + Creates a hyperlink. The href attribute must specify the required URL, which must use one of the http:, https: or file: protocols; others are not permitted. If you use the file: protocol it must reference a valid local @@ -180,9 +168,9 @@

          containing a hyperlink that uses the file: protocol it will only work on the recipient's system if the specified file exists in the same location.
          - Example: <p><a + Example: <p><a href="http://example.com">Visit - example.com</a></p>.. + example.com</a></p>..

          @@ -191,9 +179,9 @@

          The "<" and "&" characters are special within the markup and must not be used directly, even when you are just entering - plain text. You must use the &lt; character + plain text. You must use the &lt; character entity in place of "<" and - &amp; instead of "&". + &amp; instead of "&".

          A few other character entities are supported for convenience. Here is the @@ -201,32 +189,33 @@

          • - &lt; for < + &lt; for <
          • - &gt; for > + &gt; for >
          • - &quot; for " + &quot; for + "
          • - &amp; for & + &amp; for &
          • - &copy; for © + &copy; for + ©

          - By way of an example, if you want to display - x < y, use: + By way of an example, if you want to display x < y, use:

          - x &lt; y + x &lt; y

          No other symbolic character entities are supported. However, numeric character entities can be used to insert other characters - by specifying its code. For example &#64; is + by specifying its code. For example &#64; is equivalent to "@".

          From 3266b82d096e4e01bcd0a7e15cd3fb83d2538971 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 25 Apr 2020 04:31:01 +0100 Subject: [PATCH 268/714] Correct and update markup editor help topic --- Src/Help/HTML/markup_editor.htm | 60 ++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/Src/Help/HTML/markup_editor.htm b/Src/Help/HTML/markup_editor.htm index e6ac99558..9cea536b8 100644 --- a/Src/Help/HTML/markup_editor.htm +++ b/Src/Help/HTML/markup_editor.htm @@ -51,14 +51,14 @@

          edit control to be interpreted as plain text.

          - All characters you enter are treated literally. You cannot style the text. - Any URLs you enter are treated as plain text and are not interpreted as - hyplerlinks. + All characters you enter are treated literally. You cannot format the + text, other than to separate it into paragraphs. Any URLs you enter are + treated as plain text and are not interpreted as hyperlinks.

          - You can enter multiple paragraphs of text by separating each paragraph - with a blank line. Any text on consequtive lines is otherwise treated as - a single line. For example: + You enter multiple paragraphs of text by separating each paragraph with a + blank line. Any text on consecutive lines is treated as a single line. For + example:

          Lorem ipsum dolor sit amet
          @@ -94,11 +94,11 @@

          Markup

          - Choosing the Markup tab causes the entered text to be treated as - markup language, which is a very simple, HTML-like, language that allows - for a limited amount of text formatting and for the inclusion of - hyperlinks. For full details see the REML help - topic. + Choosing the Markup tab causes the entered text to be interpreted + as CodeSnip's own markup language, which is a very simple, + HTML-like, language that allows for a limited amount of text formatting + and for the inclusion of hyperlinks. For full details see the + REML help topic.

          A fixed width font is used to indicate you are editing @@ -118,44 +118,44 @@

          • -
            +

            Convert To Plain Text -

            -
            +

            +

            This option is only available when the editor is in Markup mode. It replaces the REML markup in the edit control with the plain text equivalent. -

            -
            +

            +

            All in-line styling and hyperlinks are lost. Paragraphs and headings are converted to plain text paragraphs, separated by blank lines. -

            -
            +

            +

            The editor is switched into Plain Text mode. -

            -
            +

            +

            If there is an error in the markup an error message will be displayed, no conversion will take place and the mode will not be changed. -

            +

          • -
            +

            Convert To Markup -

            -
            +

            +

            This option is only available when the editor is in Plain Text mode. It replaces the text entered in the edit control with the equivalent REML code. -

            -
            +

            +

            Illegal REML characters are converted to character attributes. Paragraphs (i.e. blocks of text separated by blanks lines) are converted to REML paragraphs - using the <p> tag. -

            -
            + using the <p> tag. +

            +

            The editor is switched into Markup mode. -

            +

          From 13abaa6a2ef11a94c2e8c50012453a22a8d1f9a8 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 25 Apr 2020 04:41:26 +0100 Subject: [PATCH 269/714] Corrected and updated navigation help topic --- Src/Help/HTML/navigation.htm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Src/Help/HTML/navigation.htm b/Src/Help/HTML/navigation.htm index 151bd1f2c..0d21c98ef 100644 --- a/Src/Help/HTML/navigation.htm +++ b/Src/Help/HTML/navigation.htm @@ -51,12 +51,12 @@

          any item displays it in a new tab.

          - Details Pane + Detail Pane

          The Details Pane is often displaying either details of a snippet or a + >Detail Pane is often displaying either details of a snippet or a group's table of contents.

          @@ -68,7 +68,7 @@

          the group.

          - Clicking any link displays target of the link in the current + Clicking any link displays the target of the link in the current tab, overwriting the current display. Once again Ctrl clicking the link displays the target item in a new tab. @@ -77,7 +77,7 @@

          You can use the Tab key to cycle through any snippet and category links displayed in the Details Pane and then press Return or + >Detail Pane and then press Return or Ctrl+Return to display the links in current or a new tab, respectively.

          @@ -88,7 +88,7 @@

          re-displayed using the navigation history.

          - You can move backwards and forwards in the history Previous button

          You can narrow down the range of displayed snippets by performing a - ssearch. + search.

          Footnote From 438d16571ab3ca1e02d2c41e38b5cd6a490c92ae Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 25 Apr 2020 05:20:35 +0100 Subject: [PATCH 270/714] Correct and edit the quick-start help topic --- Src/Help/HTML/quickstart.htm | 82 +++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/Src/Help/HTML/quickstart.htm b/Src/Help/HTML/quickstart.htm index 9abc7aadb..61a3af786 100644 --- a/Src/Help/HTML/quickstart.htm +++ b/Src/Help/HTML/quickstart.htm @@ -31,15 +31,13 @@

          This is a guide to getting up and running quickly with CodeSnip.

          - Download the database + Install the DelphiDabbler Snippets database

          - If you have not already done so, you need to get an up to date copy of - the CodeSnip database. You will know if this is the case because - the program will display a message to that effect when it first starts. - Use the Update From Web dialogue box, reached from the - Database | Update From Web menu option. + If you have not already done so, you can + install the main DelphiDabbler Code + Snippets database. You may be prompted to download the database the + first time you run the program.

          Customise the Database @@ -50,8 +48,8 @@

          Add, edit and delete snippets using the appropriate menu items on the - Database menu. You can also save, backup and restore the user - database from this menu. + Database menu. You can also save, backup + and restore the user database from this menu.

          Snippets can be categorised using any of the available categories or you @@ -65,12 +63,14 @@

          Overview Pane, grouped in different ways depending on which tab is selected. Select the name of a snippet in the Overview Pane to display its source code, description and other - information in the Detail Pane. Any snippets required to compile - the displayed snippet are listed in the "Required snippets" - section. Clicking a snippet's name displays its details. Similar - snippets are accessible in the "See also" section. The - compilers the snippet is known to compile with are indicated at the bottom - of the display. + information in the Detail Pane. +

          +

          + For Pascal snippets any snippets required to compile the displayed snippet + are listed in the "Required snippets" section. Clicking a + snippet's name displays its details. Similar snippets are accessible in + the "See also" section. The compilers the snippet is known to + compile with are indicated at the bottom of the display.

          Clicking a section heading in the Overview @@ -89,7 +89,7 @@

          Searching the database

          - You can search the database for specific words, for snippets that + You can search the database for specific words, for Pascal snippets that compile (or don't compile) under certain compilers or for cross-referenced snippets. Use the Find Text, Find Compiler(s) or @@ -126,8 +126,8 @@

          accessed from the Snippets | Show Favourites menu option or by pressing F4. Display the snippet you want by double clicking it. The snippet will then be displayed in the main - window's detail pane as normal. You can also - use the dialogue box to remove any unwanted favourites. + window's detail pane in a new tab. You can + also use the dialogue box to remove any unwanted favourites.

          The Favourites dialogue box is non-modal @@ -140,8 +140,8 @@

          Test Compiling Snippets

          - When any snippet is selected you can test it with any supported compilers - currently installed on your computer, provided it is not a + When any Pascal snippet is selected you can test it with any supported + compilers currently installed on your computer, provided it is not a freeform snippet. To do this you must first have configured CodeSnip to work with your compilers by providing the required information in the @@ -149,11 +149,11 @@

          To perform a test compilation select the required snippet in the Overview - pane and choose Compile | Test Compile Snippet menu option. The - program will then compile the snippet and display the result in the - Test Compile Results dialogue box. Full - details of any compiler errors or warnings can be displayed from this - dialogue box. + pane and choose Compile | Test Compile Snippet menu option or + press F9. The program will then compile the + snippet and display the result in the Test + Compile Results dialogue box. Full details of any compiler errors or + warnings can be displayed from this dialogue box.

          Exporting Snippets @@ -163,24 +163,36 @@

          • - Any selected routine can be exported to a file using the + Any selected routine or routines in + a selected category can be exported to a file using the Save Annotated Source dialogue box accessed from the File | Save Annotated Source menu option.
          • Plain text and syntax highlighted rich text copies of selected snippets can be copied to the clipboard via the Edit | Copy Annotated - Source or Edit | Copy Source Code menu options. + Source (routines only) or + Edit | Copy Source Code menu options.
          • - Complete Pascal units can be generated and written to file. The unit - will contain all the currently selected snippets (i.e. those displayed - in the Overview Pane). You can - explicitly specify the selected snippets by using the - Select Snippets dialogue box - available via Search | Select Snippets. The unit is configured - and saved from the Save Unit dialogue - box, displayed from the File | Save Unit menu option. +

            + Complete Pascal units can be generated and written to file. The unit + will contain all the currently selected snippets (i.e. those displayed + in the Overview Pane). You can + explicitly specify the selected snippets by using the + Select Snippets dialogue box + available via the Search | Select Snippets menu option. +

            +

            + The unit is configured and saved from the + Save Unit dialogue box, displayed from + the File | Save Unit menu option. +

            +

            + Note that unit and + freeform snippets cannot be + included in a generated unit. +

          • User-defined snippets can be exported to a file that can be imported by From 473601947e1dd7145e4cb1a164020bc7853b41a2 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 25 Apr 2020 05:23:57 +0100 Subject: [PATCH 271/714] Edit and correct main display topic --- Src/Help/HTML/main_display.htm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/Help/HTML/main_display.htm b/Src/Help/HTML/main_display.htm index 90604b065..6cf7a1532 100644 --- a/Src/Help/HTML/main_display.htm +++ b/Src/Help/HTML/main_display.htm @@ -28,7 +28,7 @@

            Menu menu + >Main menu
            The main menu appears at the top of the window. @@ -75,9 +75,9 @@

            The status bar lies across the bottom of the window. It displays - information about the database and any actives searches. When a main - or context menu item is highlighted brief help text describing the - menu item is also displayed here. + information about the database and any active searches. When a main or + context menu item is highlighted brief help text describing the menu + item is also displayed here.

        From 8ec840051115deeeff50426e5ca6c221bc1aff50 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 25 Apr 2020 06:06:35 +0100 Subject: [PATCH 272/714] Edit and correct detail and overview pane help topics --- Src/Help/HTML/detail_pane.htm | 44 +++++++++++---------------------- Src/Help/HTML/overview_pane.htm | 22 ++++++++++------- 2 files changed, 27 insertions(+), 39 deletions(-) diff --git a/Src/Help/HTML/detail_pane.htm b/Src/Help/HTML/detail_pane.htm index e0853918a..2858bb88c 100644 --- a/Src/Help/HTML/detail_pane.htm +++ b/Src/Help/HTML/detail_pane.htm @@ -32,7 +32,7 @@

        Tabs

        - Information is be displayed in one or more tabs. Items selected in the + Information is displayed in one or more tabs. Items selected in the Overview pane are normally displayed in the currently selected tab, overwriting previous contents. This behaviour can be changed as follows: @@ -63,7 +63,7 @@

      - When more than one tab is displayed you can quickly cycle through them + When multiple tabs are displayed you can quickly cycle through them from left to right by pressing Ctrl+Tab or from right to left using Shift+Ctrl+Tab.

      @@ -74,7 +74,7 @@

    15. Close the selected tab using Close Tab menu option displayed on the View menu, the detail pane's context - menu and any tab's context menu. Alternatively press + menu or any tab's context menu. Alternatively press Ctrl+F4.
    16. @@ -150,8 +150,8 @@

    17. - This information is not displayed for user-defined snippets. In the - place of the images is a link that can be clicked to edit the snippet. + This information is not displayed for user-defined snippets. Instead + there is a link that can be clicked to edit the snippet.

    18. @@ -215,15 +215,15 @@

      Selecting a section header (a category, an intial letter or a snippet kind in the snippet kind) in the Overview Pane causes a table to be displayed in the detail pane that - lists the name of the snippets contained in the section, along with their + lists the names of the snippets contained in the section, along with their descriptions. Following a search, the listed snippets are just those contained in the current database selection, if any.

      - Snippet names are links that, when clicked, displays the chosen snippet + Snippet names are links that, when clicked, display the chosen snippet in the detail pane.

      @@ -242,9 +242,9 @@

      Database Update View

      - When the database has been updated, all open tabs are closed and a new tab - created that simply informs that the database has been updated - successfully. + When the main DelphiDabbler Snippets database has been installed or + updated, all open tabs are closed and a new tab is created that simply + informs that the database has been updated successfully.

      Empty Tab View @@ -252,8 +252,8 @@

      When a new tab is created (View | New Tab or Ctrl+T, nothing is displayed except "Empty Tab" in light - grey. + >Ctrl+T), nothing is displayed except "Empty Tab" in + light grey.

      View History @@ -277,7 +277,7 @@

      >Alt+Right.

      - You can also jump directly to some recent views by selecting its name from + You can also jump directly to a recent view by selecting its name from the drop-down menus adjacent to the Previous button Deleting or editing an existing snippet or category will clear the history.

      -

      - Snippet and Category Links -

      -

      - Links to snippets or categories may be displayed as part of snippet or - section contents views. -

      -

      - Clicking a snippet link displays a snippet view for that snippet in the - current tab of the details pane, Clicking a category link causes a - section contents view to be displayed for the contents of the category, - again in the current tab. -

      -

      - Views displayed in this way are added to the history list. -

      diff --git a/Src/Help/HTML/overview_pane.htm b/Src/Help/HTML/overview_pane.htm index 0c711579b..f75e81483 100644 --- a/Src/Help/HTML/overview_pane.htm +++ b/Src/Help/HTML/overview_pane.htm @@ -22,10 +22,10 @@

      This pane appears on the left hand side of the main window. It lists all - the snippets in the database, grouped under section headers, which appear + the snippets in the database grouped under section headers, which appear in bold. Snippets can be grouped in three ways:

      -
        +
        1. by category, using the Categorised tab;
        2. @@ -96,7 +96,7 @@

          You can configure whether the overview pane tree view appears fully - expanded or fully collapsed by using the Display tab of the Ctrl+Up - Scrolls up the tree, without changing the selected item. + Scrolls the tree up, without changing the selected item. @@ -163,7 +163,7 @@

          Ctrl+Down - Scrolls down the tree, without changing the selected item. + Scrolls the tree down, without changing the selected item. @@ -277,16 +277,20 @@

          - - Ctrl+Num Sub + + Num Sub
          +   or
          + Ctrl+Num Sub Collapses an expanded section and selects the section header. - - Ctrl+Num Plus + + Num Plus
          +   or
          + Ctrl+Num Plus Expands a collapsed section. From 3c6bf1592c60068d04a6d42672629f2b401189ca Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 25 Apr 2020 06:10:09 +0100 Subject: [PATCH 273/714] Remove information about automatic update checking from database update dialogue help topic --- Src/Help/HTML/dlg_update.htm | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Src/Help/HTML/dlg_update.htm b/Src/Help/HTML/dlg_update.htm index efcb14791..74fd4a96c 100644 --- a/Src/Help/HTML/dlg_update.htm +++ b/Src/Help/HTML/dlg_update.htm @@ -76,17 +76,5 @@

          and try again. If you receive web server or time out errors this may be due to the server being down or busy so it is worth trying later.

          -

          - Note: By default CodeSnip checks online - from time to time to check if any database updates are available. A pop-up - notification window is displayed in the main window if an update is - available. This dialogue box can then be used to download the update. You - can switch this feature off, or change the frequency with which checks are - made, by using the Updates tab of the Preferences dialogue box. -

          From d250cd30e343866342c57b5d2e426a6fa8f44a40 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 25 Apr 2020 06:12:22 +0100 Subject: [PATCH 274/714] Remove redundant Updates Preferences help topic Remove link to removed topic from Preferences dialogue topic --- Src/Help/CodeSnip.hhp | 1 - Src/Help/HTML/dlg_preferences.htm | 3 - Src/Help/HTML/dlg_prefs_updates.htm | 95 ----------------------------- Src/Help/Index.hhk | 4 -- 4 files changed, 103 deletions(-) delete mode 100644 Src/Help/HTML/dlg_prefs_updates.htm diff --git a/Src/Help/CodeSnip.hhp b/Src/Help/CodeSnip.hhp index ee390814a..f8f9b376d 100644 --- a/Src/Help/CodeSnip.hhp +++ b/Src/Help/CodeSnip.hhp @@ -51,7 +51,6 @@ HTML\dlg_prefs_hiliter.htm HTML\dlg_prefs_printing.htm HTML\dlg_prefs_snippetlayout.htm HTML\dlg_prefs_sourcecode.htm -HTML\dlg_prefs_updates.htm HTML\dlg_print.htm HTML\dlg_renamecategory.htm HTML\dlg_restore.htm diff --git a/Src/Help/HTML/dlg_preferences.htm b/Src/Help/HTML/dlg_preferences.htm index 4d7b4791f..c77990a57 100644 --- a/Src/Help/HTML/dlg_preferences.htm +++ b/Src/Help/HTML/dlg_preferences.htm @@ -52,9 +52,6 @@

        3. Printing
        4. -
        5. - Updates -
        6. Misc.
        7. diff --git a/Src/Help/HTML/dlg_prefs_updates.htm b/Src/Help/HTML/dlg_prefs_updates.htm deleted file mode 100644 index 689cb799b..000000000 --- a/Src/Help/HTML/dlg_prefs_updates.htm +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - Updates Preferences - - - - - - - -

          - Updates Preferences -

          -

          - Use this tab of the Preferences dialogue box to determine if and when CodeSnip - checks for program and database updates. The tab is accessed by selecting - the Tools | Preferences menu item then clicking the - Updates tab. -

          -

          - There are two combo boxes, Check for program updates and - Check for database updates. They allow you to determine if, and - how often, CodeSnip checks to see if updates to the program and - the online Code Snippets Database are available, respectively. -

          -

          - The available choices are: -

          -
            -
          • - Never -
          • -
          • - Daily -
          • -
          • - Every 3 Days -
          • -
          • - Weekly -
          • -
          • - Fornightly -
          • -
          • - Monthly -
          • -
          -

          - The default value is Weekly. -

          -

          - Select Never if you don't want CodeSnip to check for - updates automatically. You can still check manually as follows: -

          -
            -
          • - For program updates use the Tools | Check For Program Updates - menu option. -
          • -
          • - For database updates use the Database | Update From Web menu - option. -
          • -
          -

          - CodeSnip performs update checking in a background thread shortly - after starting up. If there are no updates available you will see nothing. - If any updates are available a small notification window is displayed in - the bottom right hand side of the main window. The notification window - will be displayed for about 20 seconds or until you close it. -

          -

          - The notification window will describe the available update and provide a - button to click to enable it to be downloaded. -

          - - diff --git a/Src/Help/Index.hhk b/Src/Help/Index.hhk index be11849a3..c43d31b15 100644 --- a/Src/Help/Index.hhk +++ b/Src/Help/Index.hhk @@ -376,10 +376,6 @@

  • -
  • - - -
  • From 09d8a53b9d1edbb2fd054c6f026d81efa8f66e16 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 25 Apr 2020 10:55:51 +0100 Subject: [PATCH 275/714] Edit and correct preference dialogue help topics --- Src/Help/HTML/dlg_preferences.htm | 5 +- Src/Help/HTML/dlg_prefs_codegen.htm | 46 +++---- Src/Help/HTML/dlg_prefs_display.htm | 31 ++--- Src/Help/HTML/dlg_prefs_general.htm | 2 +- Src/Help/HTML/dlg_prefs_hiliter.htm | 18 ++- Src/Help/HTML/dlg_prefs_printing.htm | 12 +- Src/Help/HTML/dlg_prefs_snippetlayout.htm | 24 ++-- Src/Help/HTML/dlg_prefs_sourcecode.htm | 147 +++++++++++----------- 8 files changed, 152 insertions(+), 133 deletions(-) diff --git a/Src/Help/HTML/dlg_preferences.htm b/Src/Help/HTML/dlg_preferences.htm index c77990a57..627c884c3 100644 --- a/Src/Help/HTML/dlg_preferences.htm +++ b/Src/Help/HTML/dlg_preferences.htm @@ -31,8 +31,8 @@

    dialogue box is accessed via the Tools | Preferences menu option.

    - The dialogue box is in several sections, accessed by tabs across the top - of the page. These are: + The dialogue box is divided into several sections, accessed by tabs across + the top of the page. These are:

    • @@ -40,6 +40,7 @@

    • Snippet Layout +
    • Code Generation
    • diff --git a/Src/Help/HTML/dlg_prefs_codegen.htm b/Src/Help/HTML/dlg_prefs_codegen.htm index 0fbf61d1d..b292e117e 100644 --- a/Src/Help/HTML/dlg_prefs_codegen.htm +++ b/Src/Help/HTML/dlg_prefs_codegen.htm @@ -28,8 +28,9 @@

      This tab of the Preferences dialogue box - is used to customise the source code emitted by the code generator for - test compilations and generated units. + is used to customise the source code emitted by the code generator when + creating test compilations and when outputting units. +

      The tab is accessed by selecting the Tools | Preferences menu item then clicking the Code Generation tab. @@ -38,9 +39,10 @@

      Formatting tab for that.

      - The Code Generator can be configured to generate $WARN compiler directives - to switch specified warning messages on or off. These directives are - supported by Delphi 6 and later. + The Code Generator can be configured to generate $WARN + compiler directives to switch specified warning messages on or off. These + directives are supported by Delphi 6 and later. Free Pascal is not + supported.

      To enable this facility you must check the Emit $WARN directives @@ -50,13 +52,13 @@

      The warnings for which compiler directives are to be generated are those listed in the list view control situated below the check box. Warnings are identified by the text in the Symbol column. These symbols - must be valid parameters for Delphi's $WARN directive. Since new symbols - have been introduced in different versions of Delphi, the minimum version - of the compiler that supports the warning must also be specified. This is - shown in the Min. Compiler column of the list view. The version - number is that specified by the Delphi's CompilerVersion - constant. Finally, whether a warning is switched on or off is shown in the - State column. + must be valid parameters for Delphi's $WARN directive. Since + new symbols have been introduced in different versions of Delphi, the + minimum version of the compiler that supports the warning must also be + specified. This is shown in the Min. Compiler column of the list + view. The version number is that specified by Delphi's + CompilerVersion constant. Finally, whether a warning is + switched on or off is shown in the State column.

      The list view can be sorted on the contents of any of the columns by @@ -73,12 +75,12 @@

      Add a symbol
      Enter the symbol name in the Symbol edit control, specify the earliest compiler version that supports it in the Min. Compiler - edit control and specify whether the $WARN directive will switch the - warning on or off by selecting the appropriate Warning State - radio button. Click the Add button to add the symbol to the - list. If the Add button remains disabled check that the + edit control and specify whether the $WARN directive will + switch the warning on or off by selecting the appropriate Warning + State radio button. Click the Add button to add the symbol + to the list. If the Add button remains disabled check that the compiler version is valid and that the symbol name does not already - exist. + exist in the list view.
    • Delete a symbol
      @@ -91,9 +93,9 @@

      copied into the Symbol and Min. Compiler edit controls and the appropriate Warning State radio button will be selected. Change the details as required then click the Update - button to modify the symbol. The changes will be reflected in the list - view. If the entered information is not valid then the Update - button will be disabled. + button. The changes will be reflected in the list view. If the entered + information is not valid then the Update button will be + disabled.

    @@ -109,8 +111,8 @@

    source code that will be emitted by the code generator.

    - The Restore Defaults button discards the current list of $WARN - directives and replaces it with a default set. + The Restore Defaults button discards the current list of + $WARN directives and replaces it with a default set.

    diff --git a/Src/Help/HTML/dlg_prefs_display.htm b/Src/Help/HTML/dlg_prefs_display.htm index 71fee7d19..148fafee3 100644 --- a/Src/Help/HTML/dlg_prefs_display.htm +++ b/Src/Help/HTML/dlg_prefs_display.htm @@ -43,7 +43,7 @@

    href="overview_pane.htm" >overview pane appears when the program starts. Do this using the Start overview pane treeview as drop down list to choose either - Fully expanded to make the treeview display all entries) or + Fully expanded to make the treeview display all entries or Fully collapsed to display only section headers.
  • @@ -51,21 +51,22 @@

    tab or in a new tab in the detail pane. Check the Display newly added snippets & - categories in new tabs check box to add a new tab for each item - created or clear the check box to overwrite the content of the currently - selected tab. + categories in new tabs check box to add a new tab for each item, + or clear the check box to overwrite the content of the currently + selected tab. Note that Ctrl clicking an + item always displays the item in a new tab, regardless of this setting.

  • Choose whether empty section headings are hidden in the overview pane. Check the Hide empty section headings in - overiew check box to hide empty section headings or clear the check + overview check box to hide empty section headings or clear the check box to display them.
  • -
    +

    Specify the colours used for the following interface elements: -

    +

    • Snippet and category headings in the main database. @@ -79,14 +80,16 @@

      >detail pane.

    -
    +

    Choose the required colours from the appropriate drop-down colour - lists. Custom colours can be created: just select the - Custom... option from the drop down list and choose or create - the colour in the displayed colour dialogue box. Default colours for - any of the above interface elements can be restored by clicking the - Use Default Colours button. -

    + lists. Custom colours can be created: just select the + Custom... option from the top of the drop down list and + choose or create the colour in the displayed colour dialogue box. +

    +

    + Default colours for all the above interface elements can be restored + by clicking the Use Default Colours button. +

  • diff --git a/Src/Help/HTML/dlg_prefs_general.htm b/Src/Help/HTML/dlg_prefs_general.htm index acd94153f..56bb08661 100644 --- a/Src/Help/HTML/dlg_prefs_general.htm +++ b/Src/Help/HTML/dlg_prefs_general.htm @@ -44,7 +44,7 @@

    Select the measurement units to be used by the application from the Preferred units of measurement drop down list. Options are Inches and Millimeters. If you have not set this option - before, the measurement units will default to your locale settings. + before, the measurement units will be appropriate to your locale.

    diff --git a/Src/Help/HTML/dlg_prefs_hiliter.htm b/Src/Help/HTML/dlg_prefs_hiliter.htm index 2bba0f250..683831e9d 100644 --- a/Src/Help/HTML/dlg_prefs_hiliter.htm +++ b/Src/Help/HTML/dlg_prefs_hiliter.htm @@ -44,7 +44,7 @@

    Different syntax highlighter styles can be saved and given identifying - names for later user. + names for later use.

    Highlighter Font @@ -56,7 +56,7 @@

    Note: The highlighter font is ignored in code previews in - other tabs in the Preferences dialogue + other tabs of the Preferences dialogue box to ensure that previews fit the available space.

    @@ -65,14 +65,14 @@

    The colour and font style used for various syntactic elements of the source code can be changed. Select an element in the Elements - list box then using the Font style check boxes and - Colour drop down list. A preview of the element is displayed. + list box then edit its style using the Font style check boxes and + the Colour drop down list. A preview of the element is displayed.

    Named Styles

    - CodeSnip provides five pre-defined styles that are applied by + CodeSnip provides some pre-defined styles that are applied by clicking the Use Predefined Style button and selecting the style from the drop-down menu that appears.

    @@ -81,7 +81,7 @@

    1. - CodeSnip Classic – style of highlighting used in main + CodeSnip Classic – style of highlighting used in the main display of CodeSnip v2 and earlier.
    2. @@ -102,9 +102,7 @@

      highlighters can also be deleted from this dialogue box.

    3. - No Highlighter – no syntax highlighting used. You might - want to use this style if you are storing code other than Pascal in - CodeSnip. + No Highlighter – no syntax highlighting is used.

    @@ -134,7 +132,7 @@

    (see above).

    - Any number of custom highlighter style can be saved. + Any number of custom highlighter styles can be saved.

    diff --git a/Src/Help/HTML/dlg_prefs_printing.htm b/Src/Help/HTML/dlg_prefs_printing.htm index 49e83e817..878869460 100644 --- a/Src/Help/HTML/dlg_prefs_printing.htm +++ b/Src/Help/HTML/dlg_prefs_printing.htm @@ -36,7 +36,7 @@

    tab from the Print dialogue box.

    - Note: Options set in this tab usually take effect the + Warning: Options set in this tab usually take effect the next time the application is started. The exception is when the tab is displayed from the Print dialogue box, when you can choose to apply the new options straight away. @@ -47,7 +47,7 @@

    There are two options that change the way printed documents are formatted:

    -
      +
      • The Syntax highlight source code check box specifies whether source code included in the output is syntax highlighted by default. @@ -62,6 +62,12 @@

        A preview of the effect of the options is displayed to the right of the check boxes.

        +

        + When syntax highlighting is enabled the style used is as specified in the + Syntax Highlighter tab. When black and + white printing is specified the highlighter's font styles are used but + colours are ignored. +

        Page Margins

        @@ -72,7 +78,7 @@

        Margins are displayed and entered either in inches or millimeters. The units being used are displayed in the group box caption. - Note: measurement units can be specified on the + Note: measurement units can be changed on the Misc. tab, if it is visible.

        diff --git a/Src/Help/HTML/dlg_prefs_snippetlayout.htm b/Src/Help/HTML/dlg_prefs_snippetlayout.htm index 79ac666aa..469853f6b 100644 --- a/Src/Help/HTML/dlg_prefs_snippetlayout.htm +++ b/Src/Help/HTML/dlg_prefs_snippetlayout.htm @@ -30,13 +30,16 @@

        This tab of the Preferences dialogue box is used to customise the layout of pages - that display the various kinds of snippet in the kinds of snippet + in the Detail Pane.

        The tab is accessed by selecting the Tools | Preferences menu - item then clicking the Display tab in the Snippet Layout tab in the Preferences dialogue box.

        @@ -77,8 +80,8 @@

        Type
        - Snippet's type or kind, e.g. "Routine" or "Type - Definition" + Snippet's type or kind, e.g. + "Routine" or "Type Definition"

      • @@ -86,7 +89,7 @@

        Category
        - Category that snippet belongs to. Renders as a link. + Category that a snippet belongs to. Renders as a link.

      • @@ -94,7 +97,7 @@

        Required Units List
        - Always empty for Unit snippets.
        @@ -104,7 +107,8 @@

        Required Snippets List
        - Contains links to any required snippets. Always empty for Unit snippets.
        @@ -114,7 +118,7 @@

        Cross Reference List
        - Contains links to any cross referenced snippets. + List of links to any cross referenced snippets.

      • @@ -157,10 +161,10 @@

        The current page components will be displayed in the right hand Displayed page components list box. Any unused page components - are listed in the Unused page components list box. + are listed in the Unused page components list box on the left.

        - You customise the page using this list boxes. Here are the available + You customise the page using these list boxes. Here are the available actions:

          diff --git a/Src/Help/HTML/dlg_prefs_sourcecode.htm b/Src/Help/HTML/dlg_prefs_sourcecode.htm index 7042665db..44b317781 100644 --- a/Src/Help/HTML/dlg_prefs_sourcecode.htm +++ b/Src/Help/HTML/dlg_prefs_sourcecode.htm @@ -17,76 +17,81 @@ - - - -

          - - Code Formatting Preferences -

          -

          - This tab of the Preferences dialogue box - is used configure the format of source code that CodeSnip writes - to file or copies to the clipboard. The tab is accessed by selecting the - Tools | Preferences menu item then clicking the Code - Formatting tab. -

          -

          - Source code formatting -

          -

          - Descriptions of snippets can be included as comments in generated source - code. The placing of such comments can be customised using the - Commenting style drop down list. Options are: -

          -
            -
          • - No descriptive comments – descriptions are not included. -
          • -
          • - Comments after snippet header – comments appear between - a snippet's header and the body of the snippet. For functions and - procedures the header is the function or procedure prototype. For - types and constants the comment is placed after the - type or const keyword and before any - other code. -
          • -
          • - Comments before snippet – comments are placed before the - snippet. The snippet's name is included in the comment. -
          • -
          -

          - A preview of the comment style is displayed below the drop down list. -

          -

          - Some snippets have multi-paragraph descriptions, all of which would normally - appear in the snippet's comment in generated code. You can limit the comment - to use just the first paragraph of the snippet's description by ticking the - Truncate comments to one paragraph check box. -

          -

          - Note: Descriptive comments are not applicable to - freeform snippets. -

          -

          - File formatting -

          -

          - The default format of output files is configurable. The available output - types are HTML, rich text and two types of unformatted text, i.e. Pascal - files and plain text files. You choose the default output type using the - Output file type drop down list. -

          -

          - HTML and rich text file types can be syntax highlighted. To enable this - option check the Enable syntax highlighting check box. The - highlighting can be customised using the - Syntax Highlighter tab. -

          + + + +

          + + Code Formatting Preferences +

          +

          + This tab of the Preferences dialogue box + is used to configure the format of source code that CodeSnip + writes to file or copies to the clipboard. The tab is accessed by + selecting the Tools | Preferences menu item then clicking the + Code Formatting tab. +

          +

          + Source code formatting +

          +

          + Descriptions of snippets can be included as comments in generated source + code. The placing of such comments can be customised using the + Commenting style drop down list. Options are: +

          +
            +
          • + No descriptive comments – descriptions are not included. +
          • +
          • + Comments after snippet header – comments appear between + a snippet's header and the body of the snippet. For functions and + procedures the header is the function or procedure prototype. For + types and constants the comment is placed after the + type or const keyword and before any + other code. +
          • +
          • + Comments before snippet – comments are placed before the + snippet. The snippet's name is included in the comment. +
          • +
          +

          + A preview of the commenting style is displayed below the drop down list. +

          +

          + Some snippets have multi-paragraph descriptions, all of which normally + appear in the snippet's comment in generated code. You can limit the + comment to use just the first paragraph of the snippet's description by + ticking the Truncate comments to one paragraph check box. +

          +

          + Note: Descriptive comments are not applicable to + freeform or + unit snippets. +

          +

          + File formatting +

          +

          + The default format of output files is configurable. The available output + types are HTML, rich text and two types of unformatted text, i.e. Pascal + files and plain text files. You choose the default output type using the + Output file type drop down list. +

          +

          + HTML and rich text file types can be syntax highlighted. To enable this + option check the Enable syntax highlighting check box. The + highlighting can be customised using the + Syntax Highlighter tab. +

          +

          + You can override the default format when saving source code to file by + choosing a different format in the save dialogue box. +

          From 72e9ec800bc451575c7447c1b3d584068b020885 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 25 Apr 2020 11:08:25 +0100 Subject: [PATCH 276/714] Edit and correct subsidiary dialogue boxes of Syntax Highlighter preferences tab --- Src/Help/HTML/dlg_hilitemgr.htm | 9 +++++---- Src/Help/HTML/dlg_savehiliter.htm | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Src/Help/HTML/dlg_hilitemgr.htm b/Src/Help/HTML/dlg_hilitemgr.htm index 1d5e38e55..bcbd8e4de 100644 --- a/Src/Help/HTML/dlg_hilitemgr.htm +++ b/Src/Help/HTML/dlg_hilitemgr.htm @@ -34,12 +34,13 @@

          dialogue box.

          - The dialogue box is used to manage and display saved user-defined syntax - highlighter styles. The available styles are listed in the Available - highlighter styles list box. + The dialogue box is used to manage saved user-defined syntax highlighter + styles. The available styles are listed in the Available highlighter + styles list box.

          - To display a style either select the required style and press the Use + To display a style in the Syntax + Highlighter tab either select the required style and press the Use & Close button or, alternatively, double click the style in the list box. The dialogue box will be closed immediately and the style will be displayed in the main dialogue box ready for editing. diff --git a/Src/Help/HTML/dlg_savehiliter.htm b/Src/Help/HTML/dlg_savehiliter.htm index 8d98e3862..27f022aa9 100644 --- a/Src/Help/HTML/dlg_savehiliter.htm +++ b/Src/Help/HTML/dlg_savehiliter.htm @@ -34,7 +34,7 @@

          The dialogue box is used to save a custom syntax highlighter style. Provide a name for the style in the Save current highlighter as - combo box. You can overwrite an existing style by selecting its name from + combo box. You can overwrite any existing style by selecting its name from the combo box's drop down list.

          @@ -44,7 +44,7 @@

          You can use a named style by selecting it in the User Defined Highlighters dialogue box, accessed from the Syntax Highlighter - preferences tab. + preferences tab's Use Named Style drop-down button.

          From 2c75da0858bf83452c4a0e4f0c06950c50abed59 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 25 Apr 2020 11:20:00 +0100 Subject: [PATCH 277/714] Edit and correct bug report dialogue boxes --- Src/Help/HTML/dlg_trappedbugreport.htm | 16 ++++++++++------ Src/Help/HTML/dlg_userbugreport.htm | 10 ++++++---- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Src/Help/HTML/dlg_trappedbugreport.htm b/Src/Help/HTML/dlg_trappedbugreport.htm index f361da65b..50bdb520d 100644 --- a/Src/Help/HTML/dlg_trappedbugreport.htm +++ b/Src/Help/HTML/dlg_trappedbugreport.htm @@ -27,13 +27,15 @@

          Unexpected Error Dialogue Box

          - This dialogue box is displayed when CodeSnip encounters an unexpected error. It invites you to report the error using the online bug tracker which is located on GitHub. A GitHub account is required. + This dialogue box is displayed when CodeSnip encounters an + unexpected error. It invites you to report the error using the online bug + tracker which is located on GitHub. A GitHub account is required.

          The bug tracker is accessed by clicking the Go to the Bug Tracker link or by pressing Alt+B.

          -

          +

          T Click the Terminate CodeSnip button if you want to close the application down. A confirmation dialogue box is displayed before the application is finally closed. If you don't want to close the program @@ -55,14 +57,16 @@

          If the bug has not been reported, please create a new bug report and - provide as much information as you can. You should give steps to reproduce - the bug if possible. You can also upload a screenshot or other file that - helps to explain the bug. + provide as much information as you can. You should describe the steps to + take to reproduce the bug if possible. You can also upload a screenshot or + other file that helps to explain the bug.

          CodeSnip will have copied some information about the error onto the clipboard. Please paste this information into the - edit box where you described the error. Note that the pasted information is insufficient without additional information from you. + edit box where you described the error. Note that the pasted information + is insufficient on its own – additional information from you is + required.

          diff --git a/Src/Help/HTML/dlg_userbugreport.htm b/Src/Help/HTML/dlg_userbugreport.htm index ffc7d7231..17696b92c 100644 --- a/Src/Help/HTML/dlg_userbugreport.htm +++ b/Src/Help/HTML/dlg_userbugreport.htm @@ -31,7 +31,9 @@

          choosing the Tools | Report Bug Online menu option.

          - Bugs are not reported directly from the dialogue box. They are reported using CodeSnip's online bug tracker on GitHub (GitHub account required. + Bugs are not reported directly from the dialogue box. They are reported + using CodeSnip's online bug tracker on GitHub. A GitHub + account is required.

          The bug tracker is accessed by clicking the Go to the Bug Tracker @@ -53,9 +55,9 @@

          If the bug has not been reported, please create a new bug report and - provide as much information as you can. You should give steps to reproduce - the bug if possible. You can also upload a screenshot or other file that - helps to explain the bug. + provide as much information as you can. You should describe the steps to + take to reproduce the bug if possible. You can also upload a screenshot or + other file that helps to explain the bug.

          From 9bb725e23fc964a15d0e3a5050db06966ed01459 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 01:45:40 +0100 Subject: [PATCH 278/714] Edit and correct save snippet and save unit help topcs --- Src/Help/HTML/dlg_savesnippet.htm | 64 ++++++++++++++++++++++------- Src/Help/HTML/dlg_saveunit.htm | 68 +++++++++++++++++++++++-------- 2 files changed, 101 insertions(+), 31 deletions(-) diff --git a/Src/Help/HTML/dlg_savesnippet.htm b/Src/Help/HTML/dlg_savesnippet.htm index 59f5288ef..9ce3b2600 100644 --- a/Src/Help/HTML/dlg_savesnippet.htm +++ b/Src/Help/HTML/dlg_savesnippet.htm @@ -65,21 +65,23 @@

          • - A Pascal include file (.inc) - The code is written to a file with - extension *.inc that can be included in any Pascal source file. + A Pascal include file (.inc) – The code is written to a file with + extension .inc that can be included in any Pascal source file. The file + should be valid for inclusion in a Pascal unit using the + $INCLUDE (or $I) directive.
          • - A plain text file (.txt) - This is the same as the Pascal include file - except that the extension is .txt rather than .inc. + A plain text file (.txt) – This is the same as the Pascal include + file except that the extension is .txt rather than .inc.
          • - An HTML file (.html) - This option writes the source code out as a - valid XHTML document that uses CSS to format the code. The document can - be syntax highlighted if the Use syntax highlighting - check box is checked. + An HTML file (.html) – This option writes the source code out as a + valid XHTML document that uses embedded CSS to format the code. The + source code will be syntax highlighted if the Use syntax + highlighting check box is checked.
          • - A rich text file (.rtf) - The source code is written out as an RTF + A rich text file (.rtf) – The source code is written out as an RTF document. Again syntax highlighting can be used if the Use syntax highlighting check box is checked.
          • @@ -87,12 +89,39 @@

            Snippet descriptions can be written as a Pascal comment to the output file. Use the Comment style drop down list to specify the style - of commenting to be used. Comments can be inhibited using by selecting the - No comments option from the list. If the Truncate comments to - 1st paragraph check box is ticked then only the first paragraph of - the snippet's description is used. Clearing this check box means that all - of the description is used. + of commenting to be used. Such comments can be inhibited by selecting the + No descriptive comments option from the list. If the Truncate + comments to 1st paragraph check box is ticked then only the first + paragraph of the snippet's description is used. Clearing this check box + means that the full text of the description is used.

            +

            + The output file encoding can be be specified in the File Encoding + drop down list. Options vary depending on the file type. Some file types + support only a single encoding. The encodings are: +

            +
              +
            • + ANSI (Default) – the system default ANSI encoding. + Available for both plain text and Pascal include files and as the only + option for rich text files. +
            • +
            • + UTF-8 – UTF-8 encoding, with BOM. + Available for both plain text and Pascal include files and as the only + option for XHTML files. If used for Pascal include files be warned that + the files will only compile with compilers that support Unicode source + files. +
            • +
            • + Unicode (Little Endian) – UTF-16 LE encoding, with + BOM. Available for plain text files only. +
            • +
            • + Unicode (Big Endian) – UTF-16 BE encoding, with + BOM. Available for plain text files only. +
            • +

            The output can be previewed by clicking the Preview button. This displays the source code in a dialogue box, formatted according to your @@ -103,6 +132,13 @@

            Use the Save button to write the file to disk or press Cancel to abort.

            +

            + Footnote +

            +

            + † BOM = Byte Order Mark or Preamble: a sequence of bytes at the + start of a text file that identifies its encoding. +

            diff --git a/Src/Help/HTML/dlg_saveunit.htm b/Src/Help/HTML/dlg_saveunit.htm index 4e73f9eba..0e91dfdd0 100644 --- a/Src/Help/HTML/dlg_saveunit.htm +++ b/Src/Help/HTML/dlg_saveunit.htm @@ -29,7 +29,7 @@

            This dialogue box is displayed when the File | Save Unit menu option is clicked. It is used to specify the file name, file type and - formatting information for the source code unit that is to be saved. + formatting information for the unit that is to be saved.

            All currently selected snippets, with the exception of any @@ -43,7 +43,7 @@

            You specify the name and folder for the file where the unit will be saved - in in the usual way. Note that the chosen file name, minus its extension + in in the usual way. Warning: the chosen file name, minus its extension must be a valid Pascal unit name.

            @@ -52,21 +52,21 @@

            • - A Pascal unit file (.pas) - The code is written to a file with + A Pascal unit file (.pas) – The code is written to a file with extension .pas. The unit is given a name based on the file name.
            • - A plain text file (.txt) - This is the same as the Pascal unit file - except that the extension is .txt rather than .pas. + A plain text file (.txt) – This is the same as the Pascal unit + file except that the extension is .txt rather than .pas.
            • - An HTML file (.html) - This option writes the source code out as a - valid XHTML document that uses CSS to format the code. The document can - contain syntax highlighting if the Use syntax highlighting - check box is checked. + An HTML file (.html) – This option writes the source code out as a + valid XHTML document that uses embedded CSS to format the code. The + source code will be syntax highlighted if the Use syntax + highlighting check box is checked.
            • - A rich text file (.rtf) - The source code is written out as an RTF + A rich text file (.rtf) – The source code is written out as an RTF document. Again syntax highlighting can be used if the Use syntax highlighting check box is checked.
            • @@ -74,12 +74,39 @@

              Each snippet's description can be written as a Pascal comment to the output file. Use the Comment style drop down list to specify the - style of commenting to be used. Comments can be inhibited using by - selecting the No comments option from the list. If the - Truncate comments to 1st paragraph check box is ticked then only - the first paragraph of the snippet's description is used. Clearing this - check box means that all of the description is used. + style of commenting to be used. Such comments can be inhibited by + selecting the No descriptive comments option from the list. If + the Truncate comments to 1st paragraph check box is ticked then + only the first paragraph of each snippet's description is used. Clearing + this check box means that the full text of snippet descriptions are used.

              +

              + The output file encoding can be be specified in the File Encoding + drop down list. Options vary depending on the file type. Some file types + support only a single encoding. The encodings are: +

              +
                +
              • + ANSI (Default) – the system default ANSI encoding. + Available for both plain text and Pascal unit files and as the only + option for rich text files. +
              • +
              • + UTF-8 – UTF-8 encoding, with BOM. + Available for both plain text and Pascal unit files and as the only + option for XHTML files. If used for Pascal units be warned that the + unit will only compile with compilers that support Unicode source + files. +
              • +
              • + Unicode (Little Endian) – UTF-16 LE encoding, with + BOM. Available for plain text files only. +
              • +
              • + Unicode (Big Endian) – UTF-16 BE encoding, with + BOM. Available for plain text files only. +
              • +

              The output can be previewed by clicking the Preview button. This displays the source code in a dialogue box, formatted according to your @@ -87,8 +114,15 @@

              clipboard if required.

              - Use the Save button to write the source code to disk or - Cancel to abort. + Use the Save button to write the unit to disk or Cancel + to abort. +

              +

              + Footnote +

              +

              + † BOM = Byte Order Mark or Preamble: a sequence of bytes at the + start of a text file that identifies its encoding.

              From 21407c9798a694c23c06bbd178630eb1d435c93a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 02:00:50 +0100 Subject: [PATCH 279/714] Edit and correct Move User Database dialogue help topic --- Src/Help/HTML/dlg_moveuserdb.htm | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Src/Help/HTML/dlg_moveuserdb.htm b/Src/Help/HTML/dlg_moveuserdb.htm index fb7c8dc1a..90ceb0b7f 100644 --- a/Src/Help/HTML/dlg_moveuserdb.htm +++ b/Src/Help/HTML/dlg_moveuserdb.htm @@ -33,19 +33,19 @@

              Move User Database Dialogue Box

              - Note: This dialogue box is not available in the portable - edition of CodeSnip. + Note: This dialogue box is not available + in the portable edition of CodeSnip.

              The purpose of this dialogue box is to enable the user to move the user defined snippets database from its default location to a new directory. You may wish to do this to enable the database to be easily backed up. For example you could move the database to a sub-directory of a - Dropbox or GoogleDrive directory. + Dropbox or Google Drive directory.

              - You have the option to restore a previously moved database to its default - location. Both options are described below. + You also have the option to restore a previously moved database to its + default location. Both options are described below.

              Important: You a strongly advised to make a backup of the @@ -54,7 +54,7 @@

              Database menu option to do this.

              - Move the database to a new directory + Move database to new directory group box

              To move the database enter the full path of the new @@ -67,10 +67,10 @@

              • - the directory must be empty; + it must be empty;
              • - it must not be a sub-directory of the current database location; + it must not be a sub-directory of the current database location.

              @@ -82,22 +82,22 @@

              The new location of the database will be recorded in the per user config - file and it is important that this file is not modified or deleted + file. It is important that this config file is not modified or deleted otherwise the database will not be found.

              - Restore database to default directory + Restore database to default directory group box

              The database can be moved back to its default directory simply by clicking - the Restore Default Path button. If the default directory is not - empty this action will fail and an error message will be displayed. As - above, a progress bar gives an indication of how long the process may + the large Restore Default Path button. If the default directory + is not empty this action will fail and an error message will be displayed. + As above, a progress bar gives an indication of how long the process may take.

              - The Restore Default Path button will be disabled if database is - already in its default location. + The Restore Default Path button will be disabled if the database + is already in its default location.

              From 7b0918745be951aea48ebb70fe46f0b3512924ab Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 02:08:19 +0100 Subject: [PATCH 280/714] Edit Page Setup dialogue help topic --- Src/Help/HTML/dlg_pagesetup.htm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Src/Help/HTML/dlg_pagesetup.htm b/Src/Help/HTML/dlg_pagesetup.htm index da96377e0..6ed08b9bc 100644 --- a/Src/Help/HTML/dlg_pagesetup.htm +++ b/Src/Help/HTML/dlg_pagesetup.htm @@ -72,6 +72,11 @@

              Select the size of each margin by entering a value in the appropriate edit box.

              +

              + The default margin sizes can be specified using the + Printing tab of the + Preferences dialogue box. +

              The unit of measurement used to set margins is displayed in the group box label. This can be changed on the From e2290cd695ecfc1ef950d09bebcb01183142606e Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 02:20:51 +0100 Subject: [PATCH 281/714] Edit and correct load/save selection dialogue help topics --- Src/Help/HTML/dlg_loadselection.htm | 9 ++++----- Src/Help/HTML/dlg_saveselection.htm | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Src/Help/HTML/dlg_loadselection.htm b/Src/Help/HTML/dlg_loadselection.htm index 1cc155170..b01abfebb 100644 --- a/Src/Help/HTML/dlg_loadselection.htm +++ b/Src/Help/HTML/dlg_loadselection.htm @@ -31,15 +31,14 @@

              Selection menu option is chosen.

              - Use this dialogue box to specify the name of the file containing the - details of database selection to be loaded. By default only files with the + Use this dialogue box to specify the name of the file containing details + of the database selection to be loaded. By default only files with the ".cssel" extension are displayed. This can be changed using the Files of type drop-down list and chosing "All files".

              - Click OK to confirm the selection. If the file aleady exists you - will be prompted for permission to overwrite it. Choosing an invalid file - will result in an error message. + Click OK to load the selection. Choosing an invalid file will + result in an error message.

              diff --git a/Src/Help/HTML/dlg_saveselection.htm b/Src/Help/HTML/dlg_saveselection.htm index dcb4c1af0..1c2740986 100644 --- a/Src/Help/HTML/dlg_saveselection.htm +++ b/Src/Help/HTML/dlg_saveselection.htm @@ -37,8 +37,8 @@

              Save as type drop-down list and chosing "All files".

              - Click OK to confirm the selection. If the file aleady exists you - will be prompted for permission to overwrite it. Note that if the + Click OK to confirm the save. If the chosen file aleady exists + you will be prompted for permission to overwrite it. Note that if the "CodeSnip selection files" file type is selected and a file name with no extension is entered then ".cssel" will be appended to it. From 8ae1dd3ab09bb9e30242cbdc7bee7d29a8d71999 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 02:30:09 +0100 Subject: [PATCH 282/714] Edit and correct database backup and restore dialogue help topics --- Src/Help/HTML/dlg_backup.htm | 5 ++++- Src/Help/HTML/dlg_restore.htm | 14 +++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Src/Help/HTML/dlg_backup.htm b/Src/Help/HTML/dlg_backup.htm index c9f1f14fb..c73f8f8d2 100644 --- a/Src/Help/HTML/dlg_backup.htm +++ b/Src/Help/HTML/dlg_backup.htm @@ -35,7 +35,10 @@

              This Windows standard dialogue box is displayed when the Database | Backup User Database menu option is selected. Use the dialogue to - specify the name and location of the file the will store the backup. + specify the name and location of the file that will store the backup. +

              +

              + No extension is added to the specified file name.

              Note that the entire database is stored in a single file. diff --git a/Src/Help/HTML/dlg_restore.htm b/Src/Help/HTML/dlg_restore.htm index badddaffd..de14edeed 100644 --- a/Src/Help/HTML/dlg_restore.htm +++ b/Src/Help/HTML/dlg_restore.htm @@ -30,17 +30,21 @@ value="RestoreBackupDlg">

    - Open Backup Dialogue Box + Open Backup File Dialogue Box

    This Windows standard dialogue box is displayed when the Database | Restore User Database menu option is selected. Use the dialogue to - specify the name and location of the previously created backup file that - contains the database to be restored. + specify the name and location of the backup file that contains the + database to be restored. +

    +

    + An error message will be displayed if the selected file is not a valid + backup file.

    - Click OK restore the database. The existing user database will be - overwritten. + Click OK to restore the backup. The existing user database will + be overwritten.

    From 173ee8a4fc4bd212c7d9e65e22b473267bc181fb Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 02:52:08 +0100 Subject: [PATCH 283/714] Edit and correct dialogue boxes relating to categories --- Src/Help/HTML/dlg_addcategory.htm | 18 +++++++++--------- Src/Help/HTML/dlg_deletecategory.htm | 13 ++++++------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Src/Help/HTML/dlg_addcategory.htm b/Src/Help/HTML/dlg_addcategory.htm index b8fca3073..c3a46764a 100644 --- a/Src/Help/HTML/dlg_addcategory.htm +++ b/Src/Help/HTML/dlg_addcategory.htm @@ -38,20 +38,20 @@

    accessed from the Categories | New Category menu option.

    - Enter a description of the category in the edit box and click OK to add it - to the database. The description you provided will be used to identify the - category in program, so keep it brief. + Enter a description of the category in the edit box and click OK + to add it to the database. The description you provided will be used to + identify the category in the user interface, so keep it brief.

    - Leading and trailing spaces are ignored. If you enter an existing + Leading and trailing spaces are ignored. If you enter a pre-existing description a warning to that effect is displayed below the edit box. The - OK button will be disabled if you haven't entered any text or if - the entry is not valid. + OK button will be disabled if you haven't entered any text, if + the entry is not valid or if it is a duplicate.

    - Note that the new category may not appear in the - overview pane because it is empty. It will - however be available to use when editing snippets. + Depending on your settings, the new category may not appear in the + overview pane, because the category is + empty. It will however be available to use when editing snippets.

    diff --git a/Src/Help/HTML/dlg_deletecategory.htm b/Src/Help/HTML/dlg_deletecategory.htm index 2abfc0f36..021dbf917 100644 --- a/Src/Help/HTML/dlg_deletecategory.htm +++ b/Src/Help/HTML/dlg_deletecategory.htm @@ -39,19 +39,18 @@

    Select the category to be deleted from the list box. If the selected - category is non-empty, i.e. it contains snippets then it can't be deleted - and a message wil be displayed to that effect. Once a suitable category is - selected simply click the Delete button to delete it. + category is non-empty, i.e. it contains snippets, then it can't be deleted + and a message will be displayed to that effect. Once a suitable category + is selected simply click the Delete button to delete it.

    The Delete button will be disabled if you haven't selected a - category from the list box or if the category can't be deleted. + category from the list box or if the selected category can't be deleted.

    You may have noticed that some user defined categories do not appear in - the list of categories to be deleted. This is because some categories are - required by CodeSnip and cannot be deleted, although they can be - renamed. + the list. This is because those categories are reserved for use by + CodeSnip and cannot be deleted, although they can be renamed.

    From 4fe8af411ba7e4dd76338d08b7169869c2d6197b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 03:32:59 +0100 Subject: [PATCH 284/714] Correct and edit export and import dialogue box help topics --- Src/Help/HTML/dlg_export.htm | 10 ++++---- Src/Help/HTML/dlg_import.htm | 46 ++++++------------------------------ 2 files changed, 12 insertions(+), 44 deletions(-) diff --git a/Src/Help/HTML/dlg_export.htm b/Src/Help/HTML/dlg_export.htm index fb874069a..e7f86b2d7 100644 --- a/Src/Help/HTML/dlg_export.htm +++ b/Src/Help/HTML/dlg_export.htm @@ -39,10 +39,10 @@

    You specify the snippets to be exported by checking the required snippets in the Select snippets to be exported check list box. Only user - defined snippets are listed and any user defined snippet that is selected - in the main display when the dialogue box is displayed is pre-selected. - Checking or unchecking a category selects or deselects all the snippets in - that category. At least one snippet must be selected. + defined snippets are listed. Any user defined snippet that is selected in + the main display is pre-selected in the list. Checking or unchecking a + category selects or deselects all the snippets in that category. At least + one snippet must be selected.

    Next you specify the name of the export file by entering it in the @@ -54,7 +54,7 @@

    Click the OK button to export the snippets. If no snippet is selected or no file name is specified then an error message is displayed - and the dialogue box is not closed. The export can be aborted by clicking + and the dialogue box remains open. The export can be aborted by clicking the Cancel button.

    diff --git a/Src/Help/HTML/dlg_import.htm b/Src/Help/HTML/dlg_import.htm index 9b48ddb39..6461df660 100644 --- a/Src/Help/HTML/dlg_import.htm +++ b/Src/Help/HTML/dlg_import.htm @@ -63,43 +63,11 @@

    Files exported from CodeSnip usually have a .csexp extension.

    - Once a suitable file has be specified click the Next button to + Once a suitable file has been specified click the Next button to load the file and move to the next page of the wizard. The database is not updated at this stage, so if you made a mistake you can return to this page and choose another file.

    -

    - "User information" page -

    -

    - Note: This page is not shown if the selected import file - does not contain any user information. -

    -

    - The User information page simply displays any information that - the person who created the file provided. There are three items of - information that may be present: -

    -
      -
    1. - Name - the name or nickname of the person who created the file. -
    2. -
    3. - Email - the email address of the person who created the file. -
    4. -
    5. - Comments - any comments about the content of the file. -
    6. -
    -

    - Any of these items of information can be empty. Comments are for - information only but the name and email will be added to the end of the - imported snippet's Extra information field. This will be in the - form "Contributed by Name <Email>". -

    -

    - Click Next to go to the next page. -

    "Edit import and update database" page

    @@ -119,7 +87,7 @@

  • Import Using Name
    - This is that name that will be used for the snippet when it is imported. + This is the name that will be used for the snippet when it is imported. If there is already a snippet in your database with the same name as that given in the Snippet Name column, the entry in this column will have been altered to make it unique in your database. Any names in @@ -136,11 +104,11 @@

    Selecting one of the rows in the grid copies the snippet name from the Import Using Name column into the Selected Snippet edit - control. You can rename the snippet by entering a new name here then - clicking the Rename button. The new name is validated before - being displayed in the grid. You can't use the name of a snippet that is - already in your user database or is the name one of the other snippets in - the import list. + control. You can rename the snippet by entering a new name in the edit + control then clicking the Rename button. The new name is + validated before being displayed in the grid. You can't use the name of a + snippet that is already in your user database or is the name of another + snippet in the import list.

    When you are ready to perform the import click the Update button From 9803bc6a7cb8c29d9415533ca3b03137f8977469 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 03:47:31 +0100 Subject: [PATCH 285/714] Edit and correct the favourites dialogue help topic --- Src/Help/HTML/dlg_favourites.htm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Src/Help/HTML/dlg_favourites.htm b/Src/Help/HTML/dlg_favourites.htm index d622c2e50..6c3da92d9 100644 --- a/Src/Help/HTML/dlg_favourites.htm +++ b/Src/Help/HTML/dlg_favourites.htm @@ -40,13 +40,13 @@

    adjusted using the Transparency slider (see below).

    - Favourite snippets are listed in the main list view control. To the right - of each snippet is the date and time it was created or last accessed. As - usual snippets from the main and user database are displayed in different - colours (black and blue by default). + Favourite snippets are listed in the dialogue's list view control. To the + right of each snippet is the date and time it was created or last + accessed. As usual snippets from the main and user database are displayed + in different colours (black and blue by default).

    - Snippets can be sorted in either alphabetic order by clicking the + Snippets can be sorted in alphabetic order by clicking the "Snippet" header. You can also sort by accessed date if you click the "Last used" header.

    @@ -59,9 +59,9 @@

    By default snippets are displayed in a new tab in CodeSnip's detail pane. You change this to display all snippets in the same tab - by clearing the tick mark from the Open favourites in new tabs - check box. This setting is persistent. + >detail pane. You can change this to display all snippets in the same + tab by clearing the tick mark from the Open favourites in new + tabs check box. This setting is persistent.

    You can remove a snippet from favourites by selecting it and clicking the @@ -88,7 +88,7 @@

    fades down to the selected transparency when the Transparency slider is used and the transparency changes as the slider is moved. When the mouse or arrow key is released the dialogue's opacity is restored. To - view the current transparency without changing it press the + view the current transparency without changing it press and hold the Space key when the slider has focus.

    From 8e24e8a567eb6afc5bf617e860f3d891adbafc1b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 16:01:48 +0100 Subject: [PATCH 286/714] Edit and correct the Duplicate Snippet dialogue box help topic --- Src/Help/HTML/dlg_duplicatesnippet.htm | 28 ++++++++++++-------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/Src/Help/HTML/dlg_duplicatesnippet.htm b/Src/Help/HTML/dlg_duplicatesnippet.htm index a8bbff99f..63ac5f618 100644 --- a/Src/Help/HTML/dlg_duplicatesnippet.htm +++ b/Src/Help/HTML/dlg_duplicatesnippet.htm @@ -34,9 +34,9 @@

    name="dlg_duplicatesnippet">Duplicate Snippet Dialogue Box

    - This dialogue box is used to duplicate the currently selected snippet, - creating a new user defined snippet. The dialogue box is accessed from the - Snippet | Duplicate Snippet menu option. + This dialogue box is used to create a new, user-defined, snippet that is + a duplicate the currently selected snippet. The dialogue box is accessed + from the Snippet | Duplicate Snippet menu option.

    Enter a unique name for the duplicated snippet in the Unique name for @@ -44,7 +44,7 @@

    When duplicating a snippet from the main database it may be possible to use the same name, providing a snippet of that name does not already exist in the user database. If this is the case the suggested name will be - the same as the original snippet. + the same as that of the original snippet.

    The display name of the duplicated snippet can be edited or entered in the @@ -55,25 +55,23 @@

    edit box as the display name.

    - The new snippet's category can be changed using the Choose categegory - for duplicate snippet drop-down list. The category of the original - snippet will already be selected, making it easy to create the new snippet - in the same category. + The new snippet's category can be changed using the Category + drop-down list. The category of the original snippet will already be + selected, making it easy to create the new snippet in the same category.

    - Click OK to go ahead and create the new snippet. If the snippet - name is invalid or is not unique an error message will be displayed. + Click OK to create the new snippet. If the snippet name is + invalid or is not unique then an error message will be displayed.

    - The newly duplicated snippet can be edited in the Snippets Editor immediately after clicking the OK button. To do this tick the Edit in Snippets Editor check box. If you don't want to display the Snippets Editor leave the check box clear. - Note: The duplicated snippet is added to the database - when this dialogue box closes, before the Snippets Editor is - displayed. Therefore cancelling the Snippets Editor will not - remove the duplicated snippet from the database. + Note that when automatically opening the Snippets Editor the + duplicated snippet is added to the database before the + Snippets Editor is displayed.

    From 757fdea4c2825f71eee5180adf4f7e2d6855398e Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 17:45:36 +0100 Subject: [PATCH 287/714] Change and correct Snippet Editor help topic --- Src/Help/HTML/dlg_editsnippet.htm | 298 +++++++++++++++--------------- 1 file changed, 147 insertions(+), 151 deletions(-) diff --git a/Src/Help/HTML/dlg_editsnippet.htm b/Src/Help/HTML/dlg_editsnippet.htm index ebdf6b2be..e1c79a277 100644 --- a/Src/Help/HTML/dlg_editsnippet.htm +++ b/Src/Help/HTML/dlg_editsnippet.htm @@ -30,7 +30,7 @@

    This dialogue box is displayed when either the Snippets | New Snippet or Snippets | Edit Snippet menu options are - selected. It is used to enter details of a new user defined code snippet + selected. It is used to enter details of a new user-defined code snippet or to edit the details of an existing user-defined snippet.

    @@ -42,10 +42,10 @@

    Editing the snippet

    - The dialogue has multiple tabs. All but the Code tab are optional - – others can be used to provide additional information about the - snippet. However, if you plan to test compile the snippet you must ensure - that the snippet's dependencies and units are properly set up on the + The dialogue has multiple tabs. All but the Code tab are + optional: they are used to enter additional information that can be useful + but is not required. However, if you plan to test compile a Pascal snippet + you must ensure that the snippet's dependencies are properly set up on the References tab.

    @@ -53,116 +53,116 @@

    This tab gathers all the information needed to define a snippet. All the - fields are required. They are: + fields except Display Name are required. They are:

    • -
      +

      Name -

      -
      +

      +

      Enter a name for the snippet in the edit box. The name must be a valid Unicode Pascal identifier. It must also be unique within the user - database, it may duplicate names in the main database. -

      -
      + database, although it may duplicate names in the main database. +

      +

      It is customary to name functions or procedures using the routine's name. Overloaded routines are often named by suffixing the routine name with '_A', '_B', '_C' and so on. -

      +

    • -
      +

      Display Name -

      -
      +

      +

      Enter a display name for the snippet. When present this name will be - displayed in the main display instead of the snippet's name entered - above. This name may contain any characters and does not have to be + displayed in the main display instead of the name entered above. The + display name may contain any Unicode character and does not need to be unique. -

      -
      +

      +

      This is an optional entry. If it is not supplied the value of the Name control is used as the display name. -

      -
      - The display name is useful where the entry in Name field does - not display well. For example overloaded snippets named +

      +

      + The display name is useful where the entry in the Name field + does not display well. For example overloaded snippets named "Foo" may have names "Foo_A", "Foo_B", "Foo_C" etc., which are not too friendly. To improve this you could use display names like "Foo (Integer overload)", "Foo (string overload)", "Foo (Integer,string overload)" etc. -

      +

    • -
      +

      Description -

      -
      +

      +

      Enter a description of the code snippet in the - markup editor. You can use more than - one paragraph of text. You have the choice of styling the text and - using hyperlinks. -

      -
      + markup editor. More than one paragraph + of text can be used. You can enter either plain text or text formatted + using CodeSnip's REML markup language. +

      +

      The description field should not contain "}" characters - since the field's text is used in comments in exported Pascal code and - the "}" character will terminate the comment early. -

      -
      + since the field's text may be enclosed in comments in exported Pascal + code and the "}" character will terminate the comment early. +

      +

      The description can be previewed using the Preview button. Clicking this button also validates markup if you have used it. -

      +

    • -
      +

      Kind -

      -
      +

      +

      Select the kind of snippet from the drop down list. -

      +

    • -
      +

      Category -

      -
      +

      +

      Select the category to which the snippet belongs from the drop down list. -

      +

    • -
      +

      Source code -

      -
      +

      +

      Enter the snippet's source code in this text box. The format of the source code is important unless you are using the freeform snippet kind. Learn more. -

      +

    • -
      +

      Syntax highlight this snippet as Pascal code -

      -
      +

      +

      Tick this box if your snippet is written in Pascal and you would like the source to be syntax highlighted. Otherwise clear the box. Note that the built in highlighter only understands Pascal code and will not render code in other languages correctly. -

      -
      +

      +

      If you prefer to turn off syntax highlighting completely go to the Syntax Highlighter tab of the Preferences dialogue box, click the Use Predefined Styles button and select the No Highliter option. -

      +

    References Tab @@ -171,132 +171,124 @@

    Use this tab to specify the snippets and units that are associated with the snippet being edited. If it is intended to test compile the snippet then the Dependencies and Units list boxes must be - completed if the snippet depends on a Delphi unit or if it uses another - snippet from the database. + completed correctly whenever the snippet depends on a Delphi unit or if it + relies upon another snippet from the database.

    The available controls are:

    • -
      +

      Cross-references list box -

      -
      +

      +

      Use this list box to specify any other snippets to be cross-referenced - from this snippet. Check the boxes next to desired snippets. Cross + from this snippet. Check the boxes next to the desired snippets. Cross references are for information only. All snippets are listed, except for the one being edited. -

      -
      +

      +

      To deselect all cross-references right click the list box and select the Deselect All Cross-References option from the context menu. -

      -
      - User defined snippets are displayed in blue. -
      +

    • -
      +

      Dependencies list box -

      -
      +

      +

      Specify any other snippets that this snippet depends upon by checking the boxes next to the desired snippets in this list box. If this snippet is to be test compiled then any other snippets it requires must be specified here or the test compile will fail. The exception is that unit snippets never have any dependencies. -

      -
      +

      +

      To deselect all dependencies right click the list box and select the Deselect All Dependencies option from the context menu. -

      -
      - You can use the context menu to to see all dependencies for the - snippet being edited. This displayed the +

      +

      + You can use the context menu to see all dependencies for the + snippet being edited. This information is displayed in the Dependencies dialogue box. All entries checked in the Dependencies list box are included, along with all their own dependencies, and so on. You must not create a circular dependency; the Dependencies dialogue box will help you detect them. -

      -
      - The available entries in this list box will vary according to the - snippet kind and the kind of snippets - it can depend on. For example, constant - snippets can't depend on routine - snippets and unit snippets can't depend - on anything, so the list is empty. - Freeform snippets are never - included. -
      -
      - User defined snippets are displayed in blue. -
      +

      +

      + The available snippets in this list box will vary according to the + snippet kind. For example, + constant snippets can't depend on + routine snippets and unit snippets can't depend on anything, so the + list will be empty. Freeform + snippets are never included in the list. +

    • -
      +

      Units list box -

      -
      - Select any units that this snippet requires in order to compile using - this list box. Required units must be specified if test compilation is - to be attempted. A selection of common units is provided, along with - any units already associated with the snippet. -
      -
      - If the unit you need is not in the list box simply enter its name in +

      +

      + Use this list box to select any units that this snippet requires in + order to compile. Required units must be specified if test compilation + is to be attempted. A selection of common units is provided, along + with any units already associated with the snippet. +

      +

      + If the unit you need is not in the list box, simply enter its name in the edit box next to the Add Unit button and click the button. -

      -
      +

      +

      Each unit you use is remembered and will appear in the list box in future. If the list box is getting too full you can remove most units by right clicking them and selecting Delete Selected Unit from the context menu. Note that the SysUtils, Classes, Windows and Graphics units cannot be deleted. -

      -
      +

      +

      The list box's context menu also gives options to restore the unit list to it's "factory" default and to deselect all the units in the list. -

      -
      +

      +

      Units are "used" in the order they appear in the list. If - this order causes namespace clashes you should prefix ambiguous + this ordering causes namespace clashes you should prefix ambiguous identifiers in the source code with the unit name, e.g. Graphics.TBitmap. -

      -
      - If you intend to test compile your snippet with Delphi XE2 or later - you will need to make sure the appropriate compiler is configured to - search the namespaces containing the units you list here. Do this in - the Configure Compilers dialogue - box. Use the Namespaces tab to enter the required namespaces. - Click the Defaults button to use a set of namespaces that - works with many of the commonly used units. You can see a list of - namespaces with the units they contain in the Unit Scope Names topic of the Embarcadero RADStudio - documentation. -
      -
      - If any unit is not part of the Delphi RTL or VCL you will need to let - the compiler know where to find the unit. Use the Search - Paths tab of the Configure - Compilers dialogue box to specify the required path. You need to - do this for each compiler separately. -
      -
      - Notes: Unit snippets +

      +

      + If you intend to test compile your snippet with Delphi XE2 or later + you will need to make sure the appropriate compiler is configured to + search the namespaces containing the units you list here. Do this + using the Namespaces tab of the + Configure Compilers dialogue + box. You need to do this for each compiler separately. You can + find a list of namespaces and the units they contain in the + Unit Scope Names topic of the Embarcadero RADStudio + documentation. +

      +

      + If any unit is not part of the Delphi RTL or VCL you will need to let + the compiler know where to find the unit. Use the Search + Paths tab of the Configure + Compilers dialogue box to specify the required path. You need to + do this for each compiler separately. +

      +

      + Notes: Unit snippets must declare their used units in the unit source code, so this list box is disabled when the snippet kind is unit. -

      +

    @@ -310,7 +302,7 @@

    Enter the required information in the Extra information markup editor. You can enter either plain - text of formatted text and hyperlinks using the custom + text or text formatted using CodeSnip's REML markup language.

    @@ -321,19 +313,23 @@

    Compile Results Tab

    - Use this tab to specify any known compiler results for the snippet. You - can specify the required compiler in several ways: + Use this tab to specify any known compilation results for the snippet. You + can specify such results in several ways:

    • - Manually, one compiler at a time using the Set a compile - results list box. Click the drop down button next to the required - compiler then choose the required compile result from the drop down - menu, i.e. one of Success, Warning, Error and - Unknown. To use the keyboard to modify compile results proceed - as follows: +

      + Manually, one compiler at a time using the Set compile + results list box. Click the drop down button next to the required + compiler then choose a compilation result from the drop down + menu, i.e. one of Success, Warning, Error + and Unknown. +

      +

      + To use the keyboard to modify compile results proceed as follows: +

        -
      1. +
      2. Move the keyboard focus to the list box using the Tab key.
      3. @@ -365,22 +361,22 @@

        result "query" (grey LED).
      4. -
        +

        Use the Test Compile button to compile the snippet and set - the compile results accordingly. This button is disabled if no + the compile results automatically. This button is disabled if no compilers are configured or if the snippet is freeform. -

        -
        +

        +

        If one or more compilers report warnings or errors, a link appears below the Test Compile button that can be clicked to display details of the warnings or errors. -

        -
        +

        +

        You can display the unit used to perform the test compilation by clicking the View Test Unit button. This can be useful when tracking down errors. -

        +

    From 27b38e42863511495ba847ec4488775dda756e5a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 17:59:14 +0100 Subject: [PATCH 288/714] Edit and correct help topics for both versions of the Dependencies dialogue --- Src/Help/HTML/dlg_dependencies.htm | 9 +++++---- Src/Help/HTML/dlg_dependencies_edit.htm | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Src/Help/HTML/dlg_dependencies.htm b/Src/Help/HTML/dlg_dependencies.htm index 0a3812e10..d438ef605 100644 --- a/Src/Help/HTML/dlg_dependencies.htm +++ b/Src/Help/HTML/dlg_dependencies.htm @@ -28,14 +28,15 @@

    This dialogue box is displayed by choosing the View | - Dependencies main menu item. It has two tabs: Depends Upon - and Required By. + Dependencies menu item or by pressing + Ctrl+D. It has two tabs: + Depends Upon and Required By.

    Depends Upon Tab

    - If the selected snippet has dependenciess (i.e. snippets it requires in + If the selected snippet has dependencies (i.e. snippets it depends upon in order to compile) a tree of snippets is displayed that shows the direct and indirect dependencies. When there are no dependencies a message is displayed to that effect. @@ -51,7 +52,7 @@

    This tab displays a simple list of snippets that immediately depend on the - selected snippet. Again, if there are no snippets to list a message is + selected snippet. Again, if there are no snippets to list, a message is displayed to that effect.

    diff --git a/Src/Help/HTML/dlg_dependencies_edit.htm b/Src/Help/HTML/dlg_dependencies_edit.htm index 3bb97dec9..a765a1a39 100644 --- a/Src/Help/HTML/dlg_dependencies_edit.htm +++ b/Src/Help/HTML/dlg_dependencies_edit.htm @@ -33,9 +33,9 @@

    Snippets Editor.

    - If the snippet being edited has dependenciess selected in the + If the snippet being edited has dependencies selected in the Dependencies list box then a tree of those snippets is displayed - that shows both the direct and indirect dependencies. When there are no + that shows both direct and indirect dependencies. When there are no dependencies a message is displayed to that effect.

    From 37334906cb7c5a18a5bb092b1eb18d4ca71ce3a1 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 21:14:32 +0100 Subject: [PATCH 289/714] Edit and correct about box's help topic --- Src/Help/HTML/dlg_about.htm | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Src/Help/HTML/dlg_about.htm b/Src/Help/HTML/dlg_about.htm index 12dd727fd..2fa669119 100644 --- a/Src/Help/HTML/dlg_about.htm +++ b/Src/Help/HTML/dlg_about.htm @@ -27,12 +27,12 @@

    This dialogue box provides various pieces of information about - CodeSnip and the Code Snippets Database. It is accessed - from the Help | About menu option. + CodeSnip and the DelphiDabbler Code Snippets Database. + It is accessed from the Help | About menu option.

    - The program's version number is displayed in the heading of the dialogue - box. + The program's name and version number is displayed in the heading of the + dialogue box.

    In addition the dialogue has three tabs, each of which is described below. @@ -59,7 +59,8 @@

    • - Where to find the Code Snippets Database online. + A brief description of the database with a link to its GitHub + project page.
    • Licensing information. @@ -89,8 +90,8 @@

    • Main Database Directory – the directory containing a - local copy of the DelphiDabbler Code Snippets Database database. This - directory may be empty if the user has not downloaded the database. + copy of the DelphiDabbler Code Snippets Database. This directory may be + empty if the database has not been installed.
    • User Database Directory – the directory containing the @@ -113,16 +114,16 @@

      The content of the program's application wide and per-user config files - can be displayed by clicking the View Application Config File and - View Per-User Config File buttons respectively. + can be displayed by clicking the View Application Config File + and View Per-User Config File buttons respectively.

      - You can find documentation of the meaning of the config file entries in - CodeSnip's CodeSnip's Git repository. + >GitHub repository.

      From c4568cacb0832adce87afba176f8b0ca16ebbfe7 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 23:05:44 +0100 Subject: [PATCH 290/714] Edit and correct the First Run dialogue help topic --- Src/Help/HTML/dlg_firstrun.htm | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/Src/Help/HTML/dlg_firstrun.htm b/Src/Help/HTML/dlg_firstrun.htm index b409696bd..de0a0a181 100644 --- a/Src/Help/HTML/dlg_firstrun.htm +++ b/Src/Help/HTML/dlg_firstrun.htm @@ -33,12 +33,13 @@

      Its purpose is to enable you to preserve preferences from the earlier - version of CodeSnip and to import any user snippets database you - may have created. + version of CodeSnip and to import any user defined snippets + database you may have created.

      - Notes: If you run CodeSnip 4 as a different user you may see this - dialogue box again since it performs configuration on a per-user basis. + Note: If you run CodeSnip 4 as a different user + you may see this dialogue box again since it performs configuration on a + per-user basis.

      The dialogue box takes the form of a multi-page wizard. You can't cancel @@ -104,7 +105,7 @@

    - Once you have decided whether to preserve preferences or not, click the + Once you have decided whether to preserve preferences, click the Next button. This will take you to the Snippets database page or the Summary page, depending on whether a user defined snippets database has been found. @@ -119,18 +120,19 @@

    you prefer to abandon the database, clear the check box.

    - If you do create a copy of the database any changes you make to it will - not be reflected in the earlier copy, or vice versa. This is because a - snippets database updated by CodeSnip 4 ceases to be readable by - earlier versions. + If you do create a copy of the database any changes you make to it in + CodeSnip 4 will not be reflected in the earlier copy, and vice + versa. This is because a snippets database updated by CodeSnip 4 + ceases to be readable by earlier versions.

    Note: If you don't install the old database you can still - export snippets from it later that can be imported into CodeSnip - 4 at a later date, provided you don't uninstall the older version of - CodeSnip. See CodeSnip + and then import them with CodeSnip 4. If you think you may need + to do this do not uninstall the older version of CodeSnip. See Exporting and Importing Snippets for further information. + >Exporting and Importing Snippets for further information about + importing and exporting.

    "Summary" page @@ -154,14 +156,14 @@

    This page is displayed after the configuration is complete.

    - If you preversed your preference and any loss of information has been - detected, or is possible, the information is listed here. See the + If you preserved your preferences and any loss of information has been + detected, or is possible, that information is listed here. See the "Preferences" page section above for details. Otherwise the page simply reports that the process is complete.

    Click Finish to close the wizard. CodeSnip 4 will now - load. + load normally.

    From a0bafe963e848202a1c576107b08013c045dec4e Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 26 Apr 2020 23:50:52 +0100 Subject: [PATCH 291/714] Edit and correct help topics relating to three search related dialogue boxes The dialogue boxes are: Find Text, Find Cross Refs and Select Snippets --- Src/Help/HTML/dlg_findtext.htm | 36 ++++++----- Src/Help/HTML/dlg_findxrefs.htm | 97 ++++++++++++++++++++-------- Src/Help/HTML/dlg_selectroutines.htm | 35 +++++----- 3 files changed, 107 insertions(+), 61 deletions(-) diff --git a/Src/Help/HTML/dlg_findtext.htm b/Src/Help/HTML/dlg_findtext.htm index 249bb5e48..ed48ce94e 100644 --- a/Src/Help/HTML/dlg_findtext.htm +++ b/Src/Help/HTML/dlg_findtext.htm @@ -41,17 +41,18 @@

    Enter the text you want to search for in the Text to find combo - box. + box. Recent search text can be accessed from the drop down list.

    When more than one search word is entered you have a choice of whether to search for snippets containing all the words, or any of them. You specify which of these options you want by choosing the relevant radio button in the Search logic group box. For example, choosing the Find - all words option and searching for "Foo Bar" would match - the text "Foo and Bar" but would not match "Foo" or - "Bar". Choosing Find and word instead and again - searching for "Foo Bar" would match all the previous examples. + all words option and searching for "Foo Bar" + would match the text "Foo and Bar" but would not match + "Foo" or "Bar". Choosing Find any word + instead and again searching for "Foo Bar" would + match all the previous examples.

    There are two more options for further refining the search: @@ -59,18 +60,20 @@

    1. Use the Whole words only check box to ensure that the search - only looks up words that exactly match those specified. If the check box + only matches words that exactly match those specified. If the check box is cleared then words containing the specified text will also be found. - For example when the check box is ticked search for "Foo" will - not match "FooBar", but when the check box is cleared, the two - words will match. + For example when the check box is ticked a search for + "Foo" will match "Foo" in + "Foo Bar" but will not match "FooBar". When the + check box is cleared, "Foo" will match both + examples.
    2. Make the search case sensitive by checking the Case sensitive - check box. In this case searching for "Foo" would only match - the exact text and would not match "foo" or "FOO". - If the check box is cleared then case is ignored. Now searching for - "Foo;" will match both "foo" and "FOO". + check box. In this case searching for "Foo" will + match "Foo" but not "foo" or "FOO". If the + check box is cleared then case is ignored and searching for + "Foo" again will match all three examples.

    @@ -88,10 +91,9 @@

    remains unchanged.

    - The Search scope group box is disabled if there was no existing - search when this dialogue box was opened, and the search operates on the - entire database. + The Search scope group box is disabled if there was no previous + search active when this dialogue box was opened. The search will operate + on the entire database.

    - diff --git a/Src/Help/HTML/dlg_findxrefs.htm b/Src/Help/HTML/dlg_findxrefs.htm index 860f401b1..7eb280b2c 100644 --- a/Src/Help/HTML/dlg_findxrefs.htm +++ b/Src/Help/HTML/dlg_findxrefs.htm @@ -28,45 +28,86 @@

    Use this dialogue box to find snippets that are referenced by the - currently selected snippet and / or those snippets reference that snippet. - The dialogue is displayed from the Search | Find Cross Refs menu - option. + currently selected snippet and / or those snippets that reference the + snippet. The dialogue is displayed from the Search | Find Cross + Refs menu option.

    - The search can be customised by checking or clearing the following check + The dialogue enables two kinds of cross-references to be found: +

    +
      +
    1. + Snippet dependencies, which are snippets that the selected snippet + depends upon in order to compile. Alternatively the search can find + snippets that depend on the selected one. +
    2. +
    3. + "See also" references, which are snippets that are related to + the selected snippet conceptually. Such snippets are not necessarily + needed to compile the selected snippet. Alternatively the search can + find snippets that refer to the selected one as a "see also" + snippet. +
    4. +
    +

    + The search is customised by checking or clearing the following check boxes:

    • - Search for required snippets. Selecting this option causes - all snippets that are needed to compile the selected snippet to be - included in the search result. If the related Search - recursively box is checked the search continues through the found - snippets. +

      + Search for required snippets +

      +

      + Selecting this option includes all snippets that the selected snippet + depends upon in the search result. +

      +

      + If the related Search recursively box is checked the search + is applied recursively to all the found snippets. +

    • - Search for snippets that depend on this one. Choose this option - to include in the search results all snippets that depend upon (i.e. - require) this one. +

      + Search for snippets that depend on this one +

      +

      + Choose this option to include in the search results all snippets that + depend upon this one. +

    • - Search for "see also" cross references. This option - includes snippets referenced as "see also" to be included in - the search result. These snippets are not necessarily needed to compile - the selected snippet, but are related to it conceptually. Again, - checking the related Search recursively check box causes the - search to recurse through the found "see also" cross - references. +

      + Search for "see also" cross references +

      +

      + This option includes all snippets referenced as "see also" + in the search result. +

      +

      + Checking the related Search recursively check box causes the + search to recurse through all the found snippets' "see also" + cross references. +

    • - Search for snippets that cross-reference this one. Choose this - option to include in the search results all snippets that - cross-reference this one. +

      + Search for snippets that cross-reference this one +

      +

      + Choose this option to include all snippets that cross-reference this + one in the search results. +

    • - Include "xxxx" in search (where xxxx is the name of - the selected snippet). Checking this box simply includes the selected - snippet in the search results. +

      + Include "xxxx" in search (where xxxx is the name of + the selected snippet). +

      +

      + Checking this box simply includes the selected snippet in the search + results. +

    @@ -74,10 +115,10 @@

    or Search for "see also" cross references options.

    - NOTE: Any cross references selected using this dialogue - box will replace any search results that were previously displayed. A + Note: Snippets selected by the use of this dialogue box + will replace any search results that were previously displayed. A message to this effect will be displayed in the dialogue box if it is - displayed when search results are being displayed. + opened while a previous search is active.

    diff --git a/Src/Help/HTML/dlg_selectroutines.htm b/Src/Help/HTML/dlg_selectroutines.htm index 294b39704..c9047d65f 100644 --- a/Src/Help/HTML/dlg_selectroutines.htm +++ b/Src/Help/HTML/dlg_selectroutines.htm @@ -41,18 +41,18 @@

    Snippets are displayed sorted under categories. When the dialogue box opens only the categories are shown. They can be expanded and collapsed in the usual way: by clicking the arrow symbols (or plus/minus symbols) - that appear to the left of the categories; by double clicking the - category; by using the Left, + that appear to the left of the categories, by double clicking the + category or by using the Left, Right and Enter keys. Alternatively use the Expand All and Collapse All buttons on the right of the dialogue box.

    - Snippets are selected simply by placing a check mark next to the name of - the required snippets. Checking or unchecking a category will select or + Snippets are selected by placing a check mark next to the name of the + required snippets. Checking or unchecking a category will select or de-select all the snippets in the category. When the dialogue box appears - all snippets currently displayed by the program are selected. + all snippets currently displayed by the program are pre-selected.

    There are also four buttons that can be used to select or deselect groups @@ -60,29 +60,32 @@

    • - Select All selects all the snippets in the database. + Select All
      + Selects all the snippets in the database.
    • - Clear All deselects all the snippets in the database. + Clear All
      + Deselects all the snippets in the database.
    • - User Defined selects all the user defined snippets in the - database. The button will be disabled if there are no user defined - snippets. + User Defined
      + Selects all the user defined snippets in the database. The button will + be disabled if there are no user defined snippets.
    • - Main selects all the snippets in the main database. + Main
      + Selects all the snippets in the main database.

    - When the selection has been made, click the OK to accept the - changes. At least one snippet must be selected. Click Cancel to - abort your selection. + When the selection has been made, click the OK button to accept + the changes. At least one snippet must be selected. Click Cancel + to abort your selection.

    - NOTE: Any selection made using this dialogue box will + Note: Any selection made using this dialogue box will replace any search results that were previously displayed. A message to - this effect will be displayed in the dialogue box if it is displayed when + this effect will be displayed in the dialogue box if it is opened while search results are being displayed.

    From b835b1b5237561f6dd54e1b5556c5ab340799e3c Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 27 Apr 2020 00:39:02 +0100 Subject: [PATCH 292/714] Fix erroneous name attribute in help topic

    headings --- Src/Help/HTML/dlg_findxrefs.htm | 2 +- Src/Help/HTML/dlg_hilitemgr.htm | 2 +- Src/Help/HTML/dlg_loadselection.htm | 2 +- Src/Help/HTML/dlg_savehiliter.htm | 2 +- Src/Help/HTML/dlg_saveselection.htm | 2 +- Src/Help/HTML/explain_all_compilers_hidden.htm | 2 +- Src/Help/HTML/menu_compile.htm | 2 +- Src/Help/HTML/task_generateunit.htm | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Src/Help/HTML/dlg_findxrefs.htm b/Src/Help/HTML/dlg_findxrefs.htm index 7eb280b2c..350693a33 100644 --- a/Src/Help/HTML/dlg_findxrefs.htm +++ b/Src/Help/HTML/dlg_findxrefs.htm @@ -24,7 +24,7 @@

    - Find Cross References Dialogue Box + Find Cross References Dialogue Box

    Use this dialogue box to find snippets that are referenced by the diff --git a/Src/Help/HTML/dlg_hilitemgr.htm b/Src/Help/HTML/dlg_hilitemgr.htm index bcbd8e4de..569d86bb5 100644 --- a/Src/Help/HTML/dlg_hilitemgr.htm +++ b/Src/Help/HTML/dlg_hilitemgr.htm @@ -24,7 +24,7 @@

    - User Defined Highlighters Dialogue Box + User Defined Highlighters Dialogue Box

    This dialogue box is displayed from the User Defined Styles diff --git a/Src/Help/HTML/dlg_loadselection.htm b/Src/Help/HTML/dlg_loadselection.htm index b01abfebb..0f64310f8 100644 --- a/Src/Help/HTML/dlg_loadselection.htm +++ b/Src/Help/HTML/dlg_loadselection.htm @@ -24,7 +24,7 @@

    - Load Selection Dialogue Box + Load Selection Dialogue Box

    This Windows standard dialogue box is displayed when the File | Load diff --git a/Src/Help/HTML/dlg_savehiliter.htm b/Src/Help/HTML/dlg_savehiliter.htm index 27f022aa9..a2836387b 100644 --- a/Src/Help/HTML/dlg_savehiliter.htm +++ b/Src/Help/HTML/dlg_savehiliter.htm @@ -24,7 +24,7 @@

    - Save Highlighter Dialogue Box + Save Highlighter Dialogue Box

    This dialogue box is displayed by clicking the Save Style button diff --git a/Src/Help/HTML/dlg_saveselection.htm b/Src/Help/HTML/dlg_saveselection.htm index 1c2740986..f457794d3 100644 --- a/Src/Help/HTML/dlg_saveselection.htm +++ b/Src/Help/HTML/dlg_saveselection.htm @@ -24,7 +24,7 @@

    - Save Selection Dialogue Box + Save Selection Dialogue Box

    This Windows standard dialogue box is displayed when the File | Save diff --git a/Src/Help/HTML/explain_all_compilers_hidden.htm b/Src/Help/HTML/explain_all_compilers_hidden.htm index 1139f2583..4d4a1a143 100644 --- a/Src/Help/HTML/explain_all_compilers_hidden.htm +++ b/Src/Help/HTML/explain_all_compilers_hidden.htm @@ -25,7 +25,7 @@

    - All Compiler Results Hidden: Explanation + All Compiler Results Hidden: Explanation

    If you see a message similar to this diff --git a/Src/Help/HTML/menu_compile.htm b/Src/Help/HTML/menu_compile.htm index 3694dc72c..b6b321a3a 100644 --- a/Src/Help/HTML/menu_compile.htm +++ b/Src/Help/HTML/menu_compile.htm @@ -18,7 +18,7 @@

    - Compile Menu + Compile Menu

    The Compile menu contains the following options: diff --git a/Src/Help/HTML/task_generateunit.htm b/Src/Help/HTML/task_generateunit.htm index 1812fedb9..bbd8e23a0 100644 --- a/Src/Help/HTML/task_generateunit.htm +++ b/Src/Help/HTML/task_generateunit.htm @@ -18,7 +18,7 @@

    - Generate a Pascal Unit + Generate a Pascal Unit

    You can generate source code for a Pascal unit and save it to disk as From 1f512e23af2c8dcd99381be7c7b527955969a115 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 27 Apr 2020 02:28:17 +0100 Subject: [PATCH 293/714] Change help topic ALink keyword to match calling dialog box form name --- Src/Help/HTML/dlg_update.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Help/HTML/dlg_update.htm b/Src/Help/HTML/dlg_update.htm index 74fd4a96c..d7a41ac88 100644 --- a/Src/Help/HTML/dlg_update.htm +++ b/Src/Help/HTML/dlg_update.htm @@ -21,7 +21,7 @@ type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" > - +

    Update From Web Dialogue Box From e313322ae5ab9b13e0343ec5c40f79094fa707be Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 27 Apr 2020 11:56:50 +0100 Subject: [PATCH 294/714] Revise help topics concerned with SWAG database re changes to how accessed Topics are: "About SWAG" and "SWAG Import Wizard" --- Src/Help/HTML/about_swag.htm | 11 +++- Src/Help/HTML/dlg_swagimport.htm | 97 +++++++++++++++++++++----------- 2 files changed, 73 insertions(+), 35 deletions(-) diff --git a/Src/Help/HTML/about_swag.htm b/Src/Help/HTML/about_swag.htm index 6df6d4807..97217312f 100644 --- a/Src/Help/HTML/about_swag.htm +++ b/Src/Help/HTML/about_swag.htm @@ -37,8 +37,15 @@

    CodeSnip provides the SWAG Import Wizard that enables you to - browse the SWAG database and import any of its snippets into your own - snippets database. + browse a local copy of the SWAG database and import any of its snippets + into your snippets database. +

    +

    + You can download the database from the delphidabbler/swag project on GitHub. Go to the releases tab and download the latest version. Unpack the zip file into an empty folder then run the SWAG Import Wizard and navigate to the folder where you extracted the zip file contents.

    diff --git a/Src/Help/HTML/dlg_swagimport.htm b/Src/Help/HTML/dlg_swagimport.htm index b9bf813b5..3f3aefe42 100644 --- a/Src/Help/HTML/dlg_swagimport.htm +++ b/Src/Help/HTML/dlg_swagimport.htm @@ -27,78 +27,109 @@

    SWAG Import Wizard

    - This wizard is used to enable you import snippets from the + This wizard is used to enable you to import snippets from the SWAG Database into your code snippets database. The wizard is accessed from the Snippets | Import Snippets From SWAG menu option.

    - First page + Page 1: Import snippets from SWAG

    - This page simply gives an overview of how to use the wizard. Click the - Next button to display the Select required snippets - page. + This page gives an overview of how to use the wizard. +

    +

    + The wizard requires that you have a suitable copy of SWAG stored on your + computer. If you haven't yet got it then you need to download it before + continuing. The instructions shown in the box on this page of the wizard + explain how to do this. +

    +

    + When you are ready, click the Next button. +

    +

    + Page 2: Select SWAG database download folder +

    +

    + On this page you need to provide the full path to the folder where you + downloaded the SWAG database. Enter the path in the edit box. You can + click the ellipsis button to the right of the edit box to display a + standard browse for folder dialogue box and choose the folder from there. + The chosen folder will be entered into the edit box for you. +

    +

    + Once you have entered the path click Next. The data in the folder + will then be read and, if valid, the next page of the wizard will be + displayed. A progress bar may be displayed if the process of reading the + data takes some time. If the data is invalid an error message will be + displayed and the page will not change.

    - "Select required snippets" page + Page 3: Select required snippets

    - When this page is first displayed it downloads information about the - available categories from the SWAG database. A list of categories is then - displayed in the left hand, SWAG categories, list box. + When this page is first displayed it displays all the categories of + snippets available in the SWAG database in the SWAG categories + list box.

    Choose a category in the list and click the Show Snippets In Category button to display a list of its snippets in the right - hand list box. The first time you choose a category the wizard will - download the snippet list from the SWAG database. Note that - double-clicking a category has the same effect as clicking the Show - Snippets In Category button. + hand list box. Alternatively just double-click the category name. The + first time you choose a category the wizard will read the list of snippets + from the database and a progress bar may be displayed while this is done.

    Select any snippets you want to import by ticking the check box next to the snippet's name. If you want to preview the snippet before deciding - whether to import it highlight the snippet and click the Preview - Selected Snippet button. The snippet will then be downloaded (if - necessary) and displayed in a dialogue box. Note that double-clicking a - snippet has the same effect as clicking the Preview Selected - Snippet button. + whether to import it, highlight the snippet and click the Preview + Selected Snippet button. Alternatively just double click the snippet + name. The snippet will then be read from the database (if necessary) and + displayed in a dialogue box.

    Repeat this process for further categories if you wish. When you are ready to import your chosen snippets click the Next button to - display the Ready to import page. + display the next page. Note that you must select at least one snippet in + order to move on. +

    +

    + Warning: Do not select too many snippets + to be imported at one time because the import process is not very + efficient and can take a long time.

    - "Ready to import" page + Page 4: Ready to import

    This page lists all the snippets you have selected for import along with the unique ID (i.e. snippet name) that will be assigned to it after - import. Note that snippets may be downloaded from the SWAG database when - the page is displayed. + import. Note that some snippets may need to be retrieved from the SWAG + database when the page is displayed and a progress bar may be displayed + while this happens.

    You should review your selection. If you want to make any changes use the - Back button to go back Select required snippets page. + Back button to go back to the previous page and de-select any + unwanted snippets or select any snippets you may have missed.

    - When you are ready to import click the Import button. Once - Import has been clicked the wizard will perform the import. A - dialogue box will be displayed while the import proceeds. When the import - has finished the Import complete page. + When you are ready to proceed, click the Import button. Once + Import has been clicked the wizard will perform the import + – there is no going back. A dialogue box will be displayed while the + import proceeds. When the import has finished the final page of the wizard + will be displayed.

    - Import complete + Page 5: Import complete

    This page simply confirms the import has completed. You should note that - the snippets will have been imported into a special category named - "SWAG Imports" by default. + all the snippets will have been imported into the same special category, + the name of which will be displayed.

    - Click the Finish to close the wizard. + Click the Finish button to close the wizard.

    The imported snippets are fully editable like any other user defined @@ -106,9 +137,9 @@

    Note: CodeSnip does not track snippets imported - from SWAG, so if you import same snippet more than once it will be + from SWAG, so if you import the same snippet more than once it will be duplicated in your local database – it will not overwrite the - original. + original. You will not be warned about such duplications.

    From 138e903b0b868ad90483224e5a5e381317eac67c Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 27 Apr 2020 14:28:57 +0100 Subject: [PATCH 295/714] Rewrite database update help topic Rewritten for new way of updating database from local download rather than directly from internet --- Src/Help/HTML/dlg_update.htm | 103 ++++++++++++++++++++++++----------- 1 file changed, 71 insertions(+), 32 deletions(-) diff --git a/Src/Help/HTML/dlg_update.htm b/Src/Help/HTML/dlg_update.htm index d7a41ac88..586f1ccc0 100644 --- a/Src/Help/HTML/dlg_update.htm +++ b/Src/Help/HTML/dlg_update.htm @@ -11,7 +11,7 @@ - Update From Web Dialogue Box + Install or Update DelphiDabbler Snippets Database Wizard @@ -24,57 +24,96 @@

    - Update From Web Dialogue Box + Install or Update DelphiDabbler Snippets Database + Wizard

    - This dialogue box is used to update the CodeSnip database from - the internet. It is displayed using the Database | Update From - Web menu option. + This wizard dialogue box is used to install or update CodeSnip's + main snippets database. It is displayed using the Database | Install + or Update DelphiDabbler Snippets Database menu option.

    - The Update from Web button should be clicked to initiate the - update. Note: you must ensure you are connected to the - internet before clicking this button otherwise a "Connection - Error" message will be displayed. + The wizard navigates you through the installation process, with each page + appearing in a fixed sequence.

    - Once the Update from Web button has been clicked it will be - replaced by a progress report pane. The update will then begin. + Warning: if you are using the standard + version of CodeSnip updating this database will affect all users + of this computer because each user shares the same copy of the database.

    +

    + Page 1: Download the database +

    +

    + Before the database can be installed it must first be downloaded from the + internet and stored in a folder on your local computer. This page explains + how. +

    +

    + Follow the instructions on how to download and unpack the database into a + folder then come back to the wizard and press the Next button to + go to the next page. +

    +

    + Page 2: Select database download folder +

    +

    + On this page you need to provide the full path to the folder where you + downloaded the DelphiDabbler Code Snippets Database. Enter the path in the + edit box. You can click the ellipsis button to the right of the edit box + to display a standard browse for folder dialogue box and choose the folder + from there. The chosen folder will be entered into the edit box for you. +

    +

    + Once you have entered the path click Next. The data in the folder + will then be checked and, if valid, the next page of the wizard will be + displayed. If the data is invalid an error message will be displayed and + the page will not change. +

    +

    + Page 3: Install the database +

    - CodeSnip first logs on to the web server and then determines if - your copy of the database is out of date. If so the latest version is - downloaded. A progress bar is displayed while the database is being - downloaded. A confirmatory message is displayed once the process is - complete. + You are now ready to install the latest version of the database.

    - Note: The database will be updated for all users, since - each user accesses the same copy of the database. + Simply click the Load button when you are ready to proceed. + Note: this is the last chance to change your mind – + you can't go back once the Load button has been pressed. +

    +

    + On pressing Load a progress bar will be displayed while the + database is installed. +

    +

    + Once the installation is complete the final page of the wizard will be + displayed.

    - Cancelling the update + Page 4: Database installed

    - The Close button is replaced by a larger Cancel Update - button while the update is in progress. This button can be clicked at any - time to cancel the update. CodeSnip will restore the previous - database. Note: database downloads can't be - interupted. + This page confirms that the installation is complete. +

    +

    + If you were updating an older version of the database it will have been + overwritten. +

    +

    + Click the Finish button to close the wizard.

    - Update errors + Finishing up

    - If CodeSnip detects an error while updating it aborts the - update, restores the old database and displays a brief error message at - the top of the the dialogue box. More details of the error are displayed - in the progress report pane. + Once the wizard has closed CodeSnip will close all open tabs and + then reload the database with the changes made by the wizard. If you have + unsaved changes in your user database CodeSnip will offer to save + them before reloading the database.

    - If you see a "Connection Error" check your internet connection - and try again. If you receive web server or time out errors this may be - due to the server being down or busy so it is worth trying later. + Once the database has been reloaded a single tab will be opened that + confirms the database was updated.

    From aadf4598bdd1fcf356cfffa07fe272b929b8e6e3 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 27 Apr 2020 14:29:53 +0100 Subject: [PATCH 296/714] Fix Alink keyword in first run dialogue help topic Keyword now matches keyword use to access this topic from first run dialogue box. --- Src/Help/HTML/dlg_firstrun.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Help/HTML/dlg_firstrun.htm b/Src/Help/HTML/dlg_firstrun.htm index de0a0a181..eec10a49c 100644 --- a/Src/Help/HTML/dlg_firstrun.htm +++ b/Src/Help/HTML/dlg_firstrun.htm @@ -21,7 +21,7 @@ type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" > - +

    From b1626b0481f82c5ada7161eac0f2e02c4357ba92 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 27 Apr 2020 14:37:41 +0100 Subject: [PATCH 297/714] Add new backup and restore task help topic and reference it Task referenced from help project, help index, help TOC, task list help topic and intro page of Install or Update DelphiDabbler Snippets Database wizard. --- Src/Help/CodeSnip.hhp | 1 + Src/Help/HTML/task_backup.htm | 84 +++++++++++++++++++++++ Src/Help/HTML/tasks.htm | 3 + Src/Help/Index.hhk | 4 ++ Src/Help/TOC.hhc | 4 ++ Src/Res/HTML/dlg-dbupdate-intro-tplt.html | 4 +- 6 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 Src/Help/HTML/task_backup.htm diff --git a/Src/Help/CodeSnip.hhp b/Src/Help/CodeSnip.hhp index f8f9b376d..429f539f0 100644 --- a/Src/Help/CodeSnip.hhp +++ b/Src/Help/CodeSnip.hhp @@ -94,6 +94,7 @@ HTML\snippet_routine.htm HTML\snippet_type.htm HTML\snippet_unit.htm HTML\task_addsnippets.htm +HTML\task_backup.htm HTML\task_copysnippet.htm HTML\task_customise.htm HTML\task_export.htm diff --git a/Src/Help/HTML/task_backup.htm b/Src/Help/HTML/task_backup.htm new file mode 100644 index 000000000..9fbc66d42 --- /dev/null +++ b/Src/Help/HTML/task_backup.htm @@ -0,0 +1,84 @@ + + + + + + + Backup and Restore User Database + + + + + + + +

    + Backup and Restore the User Database +

    +

    + To protect against unexpected errors like hard disk failure it is wise to + periodically backup your user database. CodeSnip has a tool to + help with this: it can write your complete user database to a single file + that you can archive safely. CodeSnip can recreate the user + database from such backup files if necessary. +

    +

    + Note that backups do not include the main DelphiDabbler + Snippets Database. This is because you can just download a fresh copy of + it from the internet if you need to replace it. Use the Database | + Install or Update DelphiDabbler Snippets Database menu option to do + that. +

    +

    + How to create a backup +

    +

    + To perform the backup just select the Database | Backup User + Database menu option. This displays a + file dialogue box where you specify a file to + use for the backup. It is up to you how to name the file. Including the + date of the backup may be a good idea. +

    +

    + You can save the file to a USB drive or portable hard drive or put it + something like a Dropbox or Google Drive folder. +

    +

    + How to restore a backup +

    +

    + Should the worst happen and you loose your user defined database you can + recreate it from your latest backup. +

    +

    + To do this use the Database | Restore Backup menu option. This + displays a file dialogue box where you can + navigate to your chosen backup file. Select the file and click OK + to restore the backup. +

    +

    + If the backup file is valid it will replace any existing user database and + then the whole database will be reloaded. All existing tabs in the user + interface will be closed. When the database has finished reloading a + new tab will open with a message informing that the database has been + updated. +

    + + diff --git a/Src/Help/HTML/tasks.htm b/Src/Help/HTML/tasks.htm index d5026cae9..50150e441 100644 --- a/Src/Help/HTML/tasks.htm +++ b/Src/Help/HTML/tasks.htm @@ -61,6 +61,9 @@

  • Export and Import Snippets
  • +
  • + Backup and Restore the User Database +
  • diff --git a/Src/Help/Index.hhk b/Src/Help/Index.hhk index c43d31b15..71cfc8490 100644 --- a/Src/Help/Index.hhk +++ b/Src/Help/Index.hhk @@ -63,6 +63,10 @@ +
  • + + +
  • diff --git a/Src/Help/TOC.hhc b/Src/Help/TOC.hhc index aac5a17f2..cafaf1055 100644 --- a/Src/Help/TOC.hhc +++ b/Src/Help/TOC.hhc @@ -140,6 +140,10 @@ +
  • + + +
  • diff --git a/Src/Res/HTML/dlg-dbupdate-intro-tplt.html b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html index b8640a148..062f7d609 100644 --- a/Src/Res/HTML/dlg-dbupdate-intro-tplt.html +++ b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html @@ -24,9 +24,7 @@

    - Warning: you are strongly advised to back up your user database before going ahead with this installation. To do this cancel this dialogue box then use the Database | Backup User Database menu option to create a backup. When you have done that please come back here. - - + Warning: you are strongly advised to back up your user database before going ahead with this installation. To do this cancel this dialogue box then use the Database | Backup User Database menu option to create a backup. When you have done that please come back here.

    From 75fa6e34de414d5e1ac9d7513e287e5728e99b56 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 27 Apr 2020 15:36:47 +0100 Subject: [PATCH 298/714] Remove completed TODO item --- Src/CodeSnip.todo | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index 28079a010..eca2033cd 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,9 +1,2 @@ {TODO -cUI : Remove unused tool bar button in main window} - - -{TODO -cHelp : -Add a Backup Database task help topics that describes how to backup and restore databases. -Then add help link to Res/HTML/dlg-dbupdate-intro-tplt.html} - - {TODO -cPreRelease : Remove -[**dev**] from product and file versions in .vi files before bumping release number} From c7d96a534e794f5ec4ad6fb692e130447a15aab5 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 27 Apr 2020 22:18:44 +0100 Subject: [PATCH 299/714] Remove unused tool button in main window Also remove related TODO --- Src/CodeSnip.todo | 1 - Src/FmMain.dfm | 15 +-------------- Src/FmMain.pas | 2 -- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index eca2033cd..0212d37f5 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1,2 +1 @@ -{TODO -cUI : Remove unused tool bar button in main window} {TODO -cPreRelease : Remove -[**dev**] from product and file versions in .vi files before bumping release number} diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 05f86d9aa..6a7732146 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -166,21 +166,8 @@ inherited MainForm: TMainForm ImageIndex = 12 Style = tbsSeparator end - object tbUpdateDbase: TToolButton - Left = 423 - Top = 0 - Action = actUpdateDbase - end - object tbSpacer4: TToolButton - Left = 446 - Top = 0 - Width = 8 - Caption = 'tbSpacer4' - ImageIndex = 12 - Style = tbsSeparator - end object tbHelpContents: TToolButton - Left = 454 + Left = 423 Top = 0 Action = actHelpContents end diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 130546c03..7ac3edc9f 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -233,13 +233,11 @@ TMainForm = class(THelpAwareForm) tbSelectSnippets: TToolButton; tbSpacer1: TToolButton; tbSpacer3: TToolButton; - tbSpacer4: TToolButton; tbSpacer5: TToolButton; tbSpacer6: TToolButton; tbSpacer7: TToolButton; tbSpacer8: TToolButton; tbTestCompile: TToolButton; - tbUpdateDbase: TToolButton; actBlog: TBrowseURL; miBlog: TMenuItem; ///

    Displays About Box. From 6fea6bc587e138417ad7f347c9d9e5af5cc15d8c Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 27 Apr 2020 22:23:44 +0100 Subject: [PATCH 300/714] Make help button visible in DB update dialogue --- Src/FmDBUpdateDlg.dfm | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/Src/FmDBUpdateDlg.dfm b/Src/FmDBUpdateDlg.dfm index f8429c168..3ad0faecc 100644 --- a/Src/FmDBUpdateDlg.dfm +++ b/Src/FmDBUpdateDlg.dfm @@ -3,6 +3,8 @@ inherited DBUpdateDlg: TDBUpdateDlg Top = 0 Caption = 'Install or Update DelphiDabbler Snippets Database' Position = poDesigned + ExplicitWidth = 565 + ExplicitHeight = 436 PixelsPerInch = 96 TextHeight = 13 inherited pnlBody: TPanel @@ -19,10 +21,6 @@ inherited DBUpdateDlg: TDBUpdateDlg object tsIntro: TTabSheet Caption = 'tsIntro' TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frmIntro: THTMLTpltDlgFrame Left = 0 Top = 0 @@ -52,10 +50,6 @@ inherited DBUpdateDlg: TDBUpdateDlg Caption = 'tsFolder' ImageIndex = 1 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object lblFolder: TLabel Left = 0 Top = 8 @@ -99,10 +93,6 @@ inherited DBUpdateDlg: TDBUpdateDlg Caption = 'tsLoad' ImageIndex = 2 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frmLoad: TFixedHTMLDlgFrame Left = 0 Top = 0 @@ -126,10 +116,6 @@ inherited DBUpdateDlg: TDBUpdateDlg Caption = 'tsFinish' ImageIndex = 3 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frmFinish: TFixedHTMLDlgFrame Left = 0 Top = 0 @@ -166,9 +152,6 @@ inherited DBUpdateDlg: TDBUpdateDlg end end end - inherited btnHelp: TButton - Visible = False - end object alMain: TActionList Left = 448 Top = 208 From df3df9cd7fd0a206b08f012bce9abd851f19f9c2 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 27 Apr 2020 22:35:04 +0100 Subject: [PATCH 301/714] Prevent category names in labels with ampersands being treated as accel chars Fixes issue #4 --- Src/FmSWAGImportDlg.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index d87ce6685..c9cf0f444 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -510,7 +510,9 @@ procedure TSWAGImportDlg.DisplaySnippetsForCategory; Exit; fCurrentCatID := fSortedCategories[CatIdx].ID; lblSelectSnippets.Caption := Format( - sSnippetListCaption, [fSortedCategories[CatIdx].Title] + sSnippetListCaption, + // double up ampersands to avoid being treated as accelerator characters + [StrReplace(fSortedCategories[CatIdx].Title, '&', '&&')] ); Snippets := TList.Create; try From 604543d25497ce505eff3b96421513cca6c8a4b1 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 27 Apr 2020 23:34:55 +0100 Subject: [PATCH 302/714] Tweak some desciptive text --- Src/FmCodeImportDlg.dfm | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Src/FmCodeImportDlg.dfm b/Src/FmCodeImportDlg.dfm index 34cfa4618..f3cc01a43 100644 --- a/Src/FmCodeImportDlg.dfm +++ b/Src/FmCodeImportDlg.dfm @@ -9,15 +9,11 @@ inherited CodeImportDlg: TCodeImportDlg ExplicitHeight = 321 inherited pcWizard: TPageControl Height = 288 - ActivePage = tsFile + ActivePage = tsInfo ExplicitHeight = 288 object tsInfo: TTabSheet Caption = 'tsInfo' TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object lblIntro: TLabel Left = 0 Top = 8 @@ -98,9 +94,9 @@ inherited CodeImportDlg: TCodeImportDlg Height = 40 AutoSize = False Caption = - 'The imported functions are listed below. Select, deselect and re' + - 'name as required then click the "Update" button to update the da' + - 'tabase. Use "Cancel" to abandon the import.' + 'The functions to be imported are listed below. Select, deselect ' + + 'and rename as required then click the "Update" button to update ' + + 'the database. Use "Cancel" to abandon the import.' WordWrap = True end object lvImports: TListView @@ -153,10 +149,6 @@ inherited CodeImportDlg: TCodeImportDlg Caption = 'tsFinish' ImageIndex = 5 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object lblFinish: TLabel Left = 0 Top = 8 From fb6aee54a4aa8511c21d84c6c62bae4adbe27dc7 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 00:24:24 +0100 Subject: [PATCH 303/714] Tweaked some descriptive text in Database update and SWAG import wizards --- Src/FmDBUpdateDlg.dfm | 6 +++--- Src/FmSWAGImportDlg.dfm | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Src/FmDBUpdateDlg.dfm b/Src/FmDBUpdateDlg.dfm index 3ad0faecc..73d2af7ba 100644 --- a/Src/FmDBUpdateDlg.dfm +++ b/Src/FmDBUpdateDlg.dfm @@ -16,7 +16,7 @@ inherited DBUpdateDlg: TDBUpdateDlg end inherited pcWizard: TPageControl Width = 409 - ActivePage = tsFinish + ActivePage = tsFolder ExplicitWidth = 409 object tsIntro: TTabSheet Caption = 'tsIntro' @@ -63,9 +63,9 @@ inherited DBUpdateDlg: TDBUpdateDlg object lblFolderPageInfo: TLabel Left = 0 Top = 72 - Width = 246 + Width = 220 Height = 13 - Caption = 'Click the Next button to update the local database.' + Caption = 'Click the Next button when ready to proceed.' end object edPath: TEdit Left = 0 diff --git a/Src/FmSWAGImportDlg.dfm b/Src/FmSWAGImportDlg.dfm index 9249bf9f5..72874178a 100644 --- a/Src/FmSWAGImportDlg.dfm +++ b/Src/FmSWAGImportDlg.dfm @@ -19,7 +19,7 @@ inherited SWAGImportDlg: TSWAGImportDlg inherited pcWizard: TPageControl Width = 671 Height = 456 - ActivePage = tsIntro + ActivePage = tsUpdate ExplicitWidth = 671 ExplicitHeight = 456 object tsIntro: TTabSheet @@ -33,10 +33,10 @@ inherited SWAGImportDlg: TSWAGImportDlg Align = alTop TabOrder = 0 TabStop = True - ExplicitLeft = 8 - ExplicitTop = 8 + ExplicitWidth = 663 inherited pnlBrowser: TPanel Width = 663 + ExplicitWidth = 663 inherited wbBrowser: TWebBrowser Width = 663 ExplicitWidth = 320 @@ -178,10 +178,10 @@ inherited SWAGImportDlg: TSWAGImportDlg AutoSize = False Caption = 'You have chosen to import the following SWAG snippets. They will' + - ' be imported with the given Display Names and Unique IDs. You ca' + - 'n change these if you wish using the Snippets Editor. To make ch' + - 'anges go back to the previous page. When you are ready to import' + - ' the snippets click "Import". This step can'#39't be undone.' + ' be imported with the given Display Names and Snippet IDs. You c' + + 'an change these if you wish using the Snippets Editor. To make c' + + 'hanges go back to the previous page. When you are ready to impor' + + 't the snippets click "Import". This step can'#39't be undone.' WordWrap = True end object lvImports: TListView From 0b420de3749618c7c1d20b0216df22059adf56cb Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 00:43:14 +0100 Subject: [PATCH 304/714] Tweak and correct hints displayed in main window's status bar --- Src/FmMain.dfm | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 6a7732146..9302f9eee 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -310,7 +310,7 @@ inherited MainForm: TMainForm Caption = 'Save Annotated Source...' Hint = 'Save annotated source code|Save the annotated source code of the' + - ' selected snippet or category to a file' + ' selected routine or category to a file' ImageIndex = 18 ShortCut = 24654 OnExecute = actSaveSnippetExecute @@ -341,8 +341,8 @@ inherited MainForm: TMainForm Category = 'File' Caption = 'Save Unit...' Hint = - 'Save unit|Generate and save a Pascal unit containing the snippet' + - 's in the current selection' + 'Save unit|Generate and save a Pascal unit containing valid snipp' + + 'ets in the current selection' ImageIndex = 14 ShortCut = 16469 OnExecute = actSaveUnitExecute @@ -437,7 +437,7 @@ inherited MainForm: TMainForm Caption = 'Copy Annotated Source' Hint = 'Copy annotated source code|Copy the annotated source code of the' + - ' selected snippet or category to the clipboard' + ' selected routine or category to the clipboard' ShortCut = 16462 OnExecute = actCopySnippetExecute OnUpdate = actCopySnippetUpdate @@ -482,7 +482,7 @@ inherited MainForm: TMainForm object actHelpQuickStart: TAction Category = 'Help' Caption = 'QuickStart Guide' - Hint = 'QuickStart guide|Display the QuickStart help page' + Hint = 'QuickStart guide|Display the QuickStart help topic' OnExecute = actHelpQuickStartExecute end object actCompilers: TAction @@ -518,7 +518,7 @@ inherited MainForm: TMainForm object actLicense: TAction Category = 'Help' Caption = 'License' - Hint = 'View license|View the end user license agreement' + Hint = 'View license|View a summary of the end user license agreement' ImageIndex = 35 OnExecute = actLicenseExecute end @@ -682,7 +682,7 @@ inherited MainForm: TMainForm Caption = 'Dependencies...' Hint = 'View dependencies|Display the names of snippets that depend on, ' + - 'or are required, by the selected snippet' + 'or are required by, the selected snippet' ImageIndex = 31 ShortCut = 16452 OnExecute = actViewDependenciesExecute @@ -781,7 +781,7 @@ inherited MainForm: TMainForm Caption = 'FAQs' Hint = 'FAQs|Display CodeSnip'#39's online Frequently Asked Questions in the' + - ' default browser' + ' default web browser' ImageIndex = 6 end object actDuplicateSnippet: TAction @@ -799,8 +799,8 @@ inherited MainForm: TMainForm Category = 'File' Caption = 'Save Selection...' Hint = - 'Save current selection|Save information about the current snippe' + - 't selection to a file' + 'Save current selection|Save information about the currently sele' + + 'cted snippets to a file' ShortCut = 41043 OnExecute = actSaveSelectionExecute OnUpdate = actSaveSelectionUpdate @@ -820,7 +820,7 @@ inherited MainForm: TMainForm Caption = 'Close All Other Tabs' Hint = 'Close all other tabs|Close all tabs in the Details pane except f' + - 'or the current tab' + 'or the current one' ShortCut = 24691 OnExecute = actCloseUnselectedDetailsTabsExecute OnUpdate = actCloseDetailsTabsUpdate @@ -861,7 +861,7 @@ inherited MainForm: TMainForm Caption = 'Import Snippets From SWAG...' Hint = 'Import snippets from SWAG|Import one or more snippets into the u' + - 'ser database from the online SWAG database' + 'ser database from the SWAG database' OnExecute = actSWAGImportExecute end object actBlog: TBrowseURL From 7c3a5032f4638cb6b863b54751643b8d19315851 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 00:50:00 +0100 Subject: [PATCH 305/714] Correct text of a menu option --- Src/FmMain.dfm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 9302f9eee..4af11de8e 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -786,7 +786,7 @@ inherited MainForm: TMainForm end object actDuplicateSnippet: TAction Category = 'Snippets' - Caption = 'Duplicate Snippet' + Caption = 'Duplicate Snippet...' Hint = 'Duplicate snippet|Duplicate the selected snippet and add it to t' + 'he user-defined database' From b822098ceacf979fc028441625177968a6acdc40 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 02:15:31 +0100 Subject: [PATCH 306/714] Fix error in meta data code that was raising exception when main database not installed This caused About Box display to be corrupted --- Src/DB.UMetaData.pas | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Src/DB.UMetaData.pas b/Src/DB.UMetaData.pas index 75255c5c6..d6c2c6870 100644 --- a/Src/DB.UMetaData.pas +++ b/Src/DB.UMetaData.pas @@ -391,10 +391,10 @@ TLaterDBMetaFiles = class sealed(TDBMetaFiles) end; /// Class that is present to represent unknown database meta file - /// formats. + /// formats. Also used when database is not present. /// Accesses no files and returns null results for all methods /// except IsVersionSupported. - TUnknownMetaFiles = class sealed(TDBMetaFiles) + TUnknownOrMissingMetaFiles = class sealed(TDBMetaFiles) public /// Returns the empty string. /// The file format is unknown, so the version file cannot be read @@ -852,37 +852,37 @@ function TLaterDBMetaFiles.Version: string; Result := StrTrim(ReadFileText(cVersionFile)); end; -{ TUnknownMetaFiles } +{ TUnknownOrMissingMetaFiles } -function TUnknownMetaFiles.AreAllFilesPresent: Boolean; +function TUnknownOrMissingMetaFiles.AreAllFilesPresent: Boolean; resourcestring sNotSupportedError = 'Calling %s.AreAllFilesPresent is not supported for an ' - + 'unrecognised database format'; + + 'unrecognised database format or missing database'; begin raise ENotSupportedException.CreateFmt(sNotSupportedError, [ClassName]); end; -function TUnknownMetaFiles.Contributors: TStringDynArray; +function TUnknownOrMissingMetaFiles.Contributors: TStringDynArray; begin SetLength(Result, 0); end; -function TUnknownMetaFiles.LicenseInfo: TStringDynArray; +function TUnknownOrMissingMetaFiles.LicenseInfo: TStringDynArray; begin SetLength(Result, 0); end; -function TUnknownMetaFiles.LicenseText: string; +function TUnknownOrMissingMetaFiles.LicenseText: string; begin Result := ''; end; -function TUnknownMetaFiles.Testers: TStringDynArray; +function TUnknownOrMissingMetaFiles.Testers: TStringDynArray; begin SetLength(Result, 0); end; -function TUnknownMetaFiles.Version: string; +function TUnknownOrMissingMetaFiles.Version: string; begin Result := ''; end; @@ -891,8 +891,6 @@ function TUnknownMetaFiles.Version: string; class function TDBMetaFilesFactory.GetInstance(const DBDir: string): TDBMetaFiles; -resourcestring - sBadDirError = 'Database directory "%s" does not exist'; var VersionFile: string; VersionStr: string; @@ -900,7 +898,8 @@ class function TDBMetaFilesFactory.GetInstance(const DBDir: string): DBPath: string; begin if not TDirectory.Exists(ExcludeTrailingPathDelimiter(DBDir)) then - raise EDBMetaData.CreateFmt(sBadDirError, [DBDir]); + // Database is not installed + Exit(TUnknownOrMissingMetaFiles.Create(DBDir)); DBPath := IncludeTrailingPathDelimiter(DBDir); @@ -917,7 +916,7 @@ class function TDBMetaFilesFactory.GetInstance(const DBDir: string): begin VersionStr := TFileIO.ReadAllText(VersionFile, TEncoding.UTF8, True); if not TVersionNumber.TryStrToVersionNumber(VersionStr, Version) then - Result := TUnknownMetaFiles.Create(DBDir) + Result := TUnknownOrMissingMetaFiles.Create(DBDir) else if Version.V1 = 2 then Result := TV2DBMetaFiles.Create(DBDir) else @@ -929,7 +928,7 @@ class function TDBMetaFilesFactory.GetInstance(const DBDir: string): and TFile.Exists(DBPath + TDBMetaFileNames.TestersV1, False) then Result := TV1DBMetaFiles.Create(DBDir) else - Result := TUnknownMetaFiles.Create(DBDir); + Result := TUnknownOrMissingMetaFiles.Create(DBDir); end; end; From ace8b38150c8dfb3c5dc446e1e9ead6e42184e9a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 02:17:17 +0100 Subject: [PATCH 307/714] Modify text displayed on About Box Database tab to link to help topic about installing DB. Needed to add an a-link help keyword to update task help topic to permit it to be displayed from a link in About Box --- Src/Help/HTML/task_update.htm | 6 ++++++ Src/Res/HTML/dlg-about-database-tplt.html | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Src/Help/HTML/task_update.htm b/Src/Help/HTML/task_update.htm index d7f100175..709672fac 100644 --- a/Src/Help/HTML/task_update.htm +++ b/Src/Help/HTML/task_update.htm @@ -17,6 +17,12 @@ + + +

    Install or Update the DelphiDabbler Code Snippets Database

    diff --git a/Src/Res/HTML/dlg-about-database-tplt.html b/Src/Res/HTML/dlg-about-database-tplt.html index e2585e2d4..e83157a72 100644 --- a/Src/Res/HTML/dlg-about-database-tplt.html +++ b/Src/Res/HTML/dlg-about-database-tplt.html @@ -99,7 +99,11 @@

    - The database is not loaded. You can get it by following the instructions in the Install or Update DelphiDabbler Snippets Database dialogue box that is displayed from the Database | Install or Update DelphiDabbler Snippets Database menu option. + The database is not installed. +

    + +

    + You can install it from the Database | Install or Update DelphiDabbler Snippets Database menu option. Learn more.

    From 2e6a9ac86b24bda99933e5b94e41a69871e6e8e8 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 02:43:33 +0100 Subject: [PATCH 308/714] Remove reference to privacy statement from README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index ce8b04d42..04ae179ef 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,6 @@ The following support is available for CodeSnip: * A [read-me file](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/ReadMe.txt) * that discusses installation, configuration, updating and known issues. * An [FAQ](https://github.com/delphidabbler/codesnip-faq/blob/master/UsingCodeSnip.md) * A [Blog](http://codesnip-app.blogspot.co.uk/). -* A [privacy statement](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/Privacy.txt)* that provides information about any personal information stored by the program and what info is transmitted over the net. There's also plenty of info available on how to compile CodeSnip from source - see below. From 024bd4ccf0699667294aa3a7deffa3652ef2dd9f Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 02:44:35 +0100 Subject: [PATCH 309/714] Add brief privacy section to ReadMe.txt This section explains why privacy statement was removed. --- Docs/ReadMe.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt index 4e66436ba..c7ea1869e 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe.txt @@ -343,6 +343,20 @@ There are Frequently Asked Questions pages for CodeSnip on the web, at https://github.com/delphidabbler/codesnip-faq/blob/master/README.md +Privacy +================================================================================ + +As of v4.16.0 CodeSnip no longer stores or transmits any personally identifiable +data. + +Because of this change the privacy statement that used to be provided with the +program has been removed. + +Do note though that CodeSnip can display web pages via your default web +browser, but only in response to user input. No guarantee is made about any +personal data collected by such web pages. + + Thanks ================================================================================ From ab7f03445d563f84e615ea71fcf4c0d9acd4f8ff Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 02:55:03 +0100 Subject: [PATCH 310/714] Delete privacy statement help topic and removed all references to it Removed link from main menu help topic, help TOC and help Index. Also removed menu item from main menu and related action --- Src/FmMain.dfm | 9 --- Src/FmMain.pas | 9 --- Src/Help/CodeSnip.hhp | 1 - Src/Help/HTML/menu_help.htm | 13 ---- Src/Help/HTML/privacy_statement.htm | 92 ----------------------------- Src/Help/Index.hhk | 4 -- Src/Help/TOC.hhc | 4 -- 7 files changed, 132 deletions(-) delete mode 100644 Src/Help/HTML/privacy_statement.htm diff --git a/Src/FmMain.dfm b/Src/FmMain.dfm index 4af11de8e..0128f4c4f 100644 --- a/Src/FmMain.dfm +++ b/Src/FmMain.dfm @@ -613,12 +613,6 @@ inherited MainForm: TMainForm OnExecute = actPrintExecute OnUpdate = actPrintUpdate end - object actPrivacy: TAction - Category = 'Help' - Caption = 'Privacy Statement' - Hint = 'View privacy statement|View the program'#39's privacy statement' - OnExecute = actPrivacyExecute - end object actBackupDatabase: TAction Category = 'Database' Caption = 'Backup User Database...' @@ -1139,9 +1133,6 @@ inherited MainForm: TMainForm object miHelpCompChecks: TMenuItem Action = actHelpCompChecks end - object miPrivacy: TMenuItem - Action = actPrivacy - end object miLicense: TMenuItem Action = actLicense end diff --git a/Src/FmMain.pas b/Src/FmMain.pas index 7ac3edc9f..d085b8b7b 100644 --- a/Src/FmMain.pas +++ b/Src/FmMain.pas @@ -96,7 +96,6 @@ TMainForm = class(THelpAwareForm) actPreferences: TAction; actPreviousTab: TAction; actPrint: TAction; - actPrivacy: TAction; actRenameCategory: TAction; actRestoreDatabase: TAction; actSaveDatabase: TAction; @@ -167,7 +166,6 @@ TMainForm = class(THelpAwareForm) miNewDetailsTab: TMenuItem; miPreferences: TMenuItem; miPrint: TMenuItem; - miPrivacy: TMenuItem; miRenameCategory: TMenuItem; miReportBug: TMenuItem; miRestoreDatabase: TMenuItem; @@ -383,8 +381,6 @@ TMainForm = class(THelpAwareForm) procedure actPrintExecute(Sender: TObject); /// Determines whether the Print action can be enabled. procedure actPrintUpdate(Sender: TObject); - /// Displays the Privacy Statement help topic. - procedure actPrivacyExecute(Sender: TObject); /// Displays a dialogue box that can be used to rename a user /// defined category. procedure actRenameCategoryExecute(Sender: TObject); @@ -958,11 +954,6 @@ procedure TMainForm.actPrintUpdate(Sender: TObject); TPrintMgr.CanPrint(fMainDisplayMgr.CurrentView); end; -procedure TMainForm.actPrivacyExecute(Sender: TObject); -begin - DisplayHelp('PrivacyStatement'); -end; - procedure TMainForm.actRenameCategoryExecute(Sender: TObject); begin TUserDBMgr.RenameACategory; diff --git a/Src/Help/CodeSnip.hhp b/Src/Help/CodeSnip.hhp index 429f539f0..3a3d15bfe 100644 --- a/Src/Help/CodeSnip.hhp +++ b/Src/Help/CodeSnip.hhp @@ -83,7 +83,6 @@ HTML\menu_view.htm HTML\navigation.htm HTML\new.htm HTML\overview_pane.htm -HTML\privacy_statement.htm HTML\quickstart.htm HTML\reml.htm HTML\snippet_class.htm diff --git a/Src/Help/HTML/menu_help.htm b/Src/Help/HTML/menu_help.htm index e483567ee..f4b548a92 100644 --- a/Src/Help/HTML/menu_help.htm +++ b/Src/Help/HTML/menu_help.htm @@ -63,19 +63,6 @@

    CodeSnip's ability to test compile snippets. - - -   - - - Privacy Statement - - - Selecting this option displays CodeSnip's - privacy statement in the help - file. - - Menu icon diff --git a/Src/Help/HTML/privacy_statement.htm b/Src/Help/HTML/privacy_statement.htm deleted file mode 100644 index bd54228e3..000000000 --- a/Src/Help/HTML/privacy_statement.htm +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - Privacy Statement - - - - - - - -

    - Privacy Statement - for DelphiDabbler Codesnip -

    -

    - Offline Privacy -

    -

    - CodeSnip stores some personal information in two configuration - files. The location of the files differs depending on whether you are - using the standard or portable edition. -

    -

    - Common.config -

    -

    - Common.config is located in the in the - %ProgramData%\DelphiDabbler\CodeSnip.4 folder for the - standard edition. It is not used by the portable edition. -

    -

    - Only version information is stored in Common.config. -

    -

    - User.config -

    -

    - User.config is found in the current user's - %AppData%\DelphiDabbler\CodeSnip.4 folder for the standard - edition or in the AppData sub folder of the install directory - for the portable edition. -

    -

    - The file stores several user-specific application data settings such as - your preferences. None of this information is personally identifiable. -

    -

    - Spyware -

    -

    - No spyware or other software that threatens your privacy has been - deliberately or knowingly included with CodeSnip or its - installer. If the program is found to contain spyware it will have been - added by third parties without permission. Please inform the author of any - such occurrence or any suspicious behaviour by creating an issue on the CodeSnip GitHub repository (GitHub account required). -

    -

    - CodeSnip never tries to "phone home" of its own - accord. It only goes online in response to user requests. Should you - notice any unauthorised activity please inform the author since it is - likely that your copy of the program has been hacked by some third party. -

    -

    - CodeSnip Online Activity -

    -

    - CodeSnip's Help menu and several other parts of the user - interface contain menu items and links that cause various third party web - pages to be displayed in your default web browser. The author takes no - responsibility for any data collected by your web browser or the - individual web sites. -

    - - diff --git a/Src/Help/Index.hhk b/Src/Help/Index.hhk index 71cfc8490..2becf62be 100644 --- a/Src/Help/Index.hhk +++ b/Src/Help/Index.hhk @@ -296,10 +296,6 @@
    -
  • - - -
  • diff --git a/Src/Help/TOC.hhc b/Src/Help/TOC.hhc index cafaf1055..4d5a8ce60 100644 --- a/Src/Help/TOC.hhc +++ b/Src/Help/TOC.hhc @@ -179,10 +179,6 @@ -
  • - - -
  • From 1d3610c466d10b15359b4011d1ed1e15ee2368fc Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 03:01:22 +0100 Subject: [PATCH 311/714] Remove privacy.txt file from installer The privacy statement text file was previously installed with CodeSnip. --- Src/Install/CodeSnip.iss | 2 -- 1 file changed, 2 deletions(-) diff --git a/Src/Install/CodeSnip.iss b/Src/Install/CodeSnip.iss index f01c01f66..446495472 100644 --- a/Src/Install/CodeSnip.iss +++ b/Src/Install/CodeSnip.iss @@ -25,7 +25,6 @@ #define ReadMeFile "ReadMe.txt" #define LicenseFile "License.rtf" #define LicenseTextFile "License.html" -#define PrivacyFile "Privacy.txt" #define OutDir SourcePath + "..\..\Exe" #define SrcDocsPath SourcePath + "..\..\Docs\" #define SrcAssetsPath SourcePath + '\Assets\" @@ -91,7 +90,6 @@ Source: {#SrcExePath}{#ExeFile}; DestDir: {app} Source: {#SrcExePath}{#HelpFile}; DestDir: {app}; Flags: ignoreversion Source: {#SrcDocsPath}{#LicenseTextFile}; DestDir: {app}; Flags: ignoreversion Source: {#SrcDocsPath}{#ReadMeFile}; DestDir: {app}; Flags: ignoreversion -Source: {#SrcDocsPath}{#PrivacyFile}; DestDir: {app}; Flags: ignoreversion Source: {#SrcAssetsPath}UpdatingPreview.rtf; Flags: dontcopy Source: {#SrcAssetsPath}AutoUpdateChecks.rtf; Flags: dontcopy From 6c9a7f8842563a59b73c0b664c5e94ef9f3fafe3 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 03:03:49 +0100 Subject: [PATCH 312/714] Remove privacy statement from portable edition release zip package --- Src/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Src/Makefile b/Src/Makefile index 64845b682..39c1dad85 100644 --- a/Src/Makefile +++ b/Src/Makefile @@ -184,7 +184,6 @@ release: @$(ZIP) -j -9 $(OUTFILE) Exe\CodeSnip-p.exe @$(ZIP) -j -9 $(OUTFILE) Exe\CodeSnip.chm @$(ZIP) -j -9 $(OUTFILE) Docs\ReadMe.txt - @$(ZIP) -j -9 $(OUTFILE) Docs\Privacy.txt @$(ZIP) -j -9 $(OUTFILE) Docs\License.html !endif @cd Src From 86769a933712b7ad0b9ac0b7ae2743de266415d8 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 03:05:23 +0100 Subject: [PATCH 313/714] Delete privacy statement text file --- Docs/Privacy.txt | 61 ------------------------------------------------ 1 file changed, 61 deletions(-) delete mode 100644 Docs/Privacy.txt diff --git a/Docs/Privacy.txt b/Docs/Privacy.txt deleted file mode 100644 index 37fcf0637..000000000 --- a/Docs/Privacy.txt +++ /dev/null @@ -1,61 +0,0 @@ -================================================================================ - -PRIVACY STATEMENT FOR DELPHIDABBLER CODESNIP - -================================================================================ - - -Offline Privacy -================================================================================ - -CodeSnip stores some personal information in two configuration files. The -location of the files differs depending on whether you are using the standard or -portable edition. - - -Common.config --------------------------------------------------------------------------------- - -Common.config is located in the in the %ProgramData%\DelphiDabbler\CodeSnip.4 -folder for the standard edition. It is not used by the portable edition. - -Only version information is stored in Common.config. - - -User.config --------------------------------------------------------------------------------- - -User.config is found in the current user's %AppData%\DelphiDabbler\CodeSnip.4 -folder for the standard edition or in the AppData sub folder of the install -directory for the portable edition. - -The file stores several user-specific application data settings such as your -preferences. None of this information is personally identifiable. - - -Spyware -================================================================================ - -No spyware or other software that threatens your privacy has been deliberately -or knowingly included with CodeSnip or its installer. If the program is found to -contain spyware it will have been added by third parties without permission. -Please inform the author of any such occurrence or any suspicious behaviour by -creating an issue on the CodeSnip GitHub repository at -https://github.com/delphidabbler/codesnip/issues (GitHub account required). - -CodeSnip never tries to "phone home" of its own accord. It only goes online in -response to user requests. Should you notice any unauthorised activity please -inform the author since it is likely that your copy of the program has been -hacked by some third party. - - -CodeSnip Online Activity -================================================================================ - -CodeSnip's Help menu and several other parts of the user interface contain menu -items and links that cause various third party web pages to be displayed in your -default web browser. The author takes no responsibility for any data collected -by your web browser or the individual web sites. - - -================================================================================ From 9caf72ed35af743409f97041a7d10226372ef60e Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 17:43:27 +0100 Subject: [PATCH 314/714] Revise main database section of welcome page --- Src/Res/HTML/welcome-tplt.html | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Src/Res/HTML/welcome-tplt.html b/Src/Res/HTML/welcome-tplt.html index e3d32a2af..5fe8b19e9 100644 --- a/Src/Res/HTML/welcome-tplt.html +++ b/Src/Res/HTML/welcome-tplt.html @@ -64,19 +64,12 @@

    - Code Snippets database + DelphiDabbler Code Snippets database
    - There are <%MainDBCount%> snippets in the Code Snippets - database. -
    -
    - Check for updates + There are <%MainDBCount%> snippets in the DelphiDabbler + Code Snippets database.
    @@ -86,13 +79,17 @@

    class="external-link" >DelphiDabbler Code Snippets Database has not been installed. + Learn more

    Download it now + >Install it now
    @@ -204,5 +201,5 @@

    - + \ No newline at end of file From bec9aea34ef44df029e263b7c65e04e97382ccc5 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Tue, 28 Apr 2020 23:37:06 +0100 Subject: [PATCH 315/714] Update ReadMe.txt Added a note about leaving data folders intact when updating portable version of CodeSnip. --- Docs/ReadMe.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt index c7ea1869e..d667b1398 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe.txt @@ -132,6 +132,10 @@ code snippets. No files are written outside the folder where you copied the files and the registry is not modified. +** WARNING: When updating an existing portable installation with a new version +of CodeSnip it is important that you do not change or delete the AppData and +UserData folders. If you do this you risk loosing your settings and/or database. + Uninstallation ================================================================================ From 7ecccf00af28dffade695cde1feddffd95aeddcb Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Wed, 29 Apr 2020 21:27:53 +0100 Subject: [PATCH 316/714] Modify details of snippets database on Install / Update wizard front page Download file name has changed in run up to release 2.0.0 of code snippets database --- Src/Res/HTML/dlg-dbupdate-intro-tplt.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Res/HTML/dlg-dbupdate-intro-tplt.html b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html index 062f7d609..79fa4c696 100644 --- a/Src/Res/HTML/dlg-dbupdate-intro-tplt.html +++ b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html @@ -35,7 +35,7 @@ First go to <%CSDBReleaseURL%> and find the latest release of the database built for CodeSnip v4.16 and later. Look for a zip file whose name has the form csdb416-v2.x.x.zip where 2.x.x is the database version number. + ><%CSDBReleaseURL%> and find the latest release of the database. Look for a zip file whose name has the form csdb-v2.x.x.zip where 2.x.x is the database version number.

    From 612b60a5814539a21f7a84c244ad872928c9a43e Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 1 May 2020 05:02:46 +0100 Subject: [PATCH 317/714] Revise TVersionNumber to allow implicit casts to string Did some refactoring to avoid duplicated code with Explicit cast to string --- Src/UVersionInfo.pas | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Src/UVersionInfo.pas b/Src/UVersionInfo.pas index f83c61249..d53b5a42a 100644 --- a/Src/UVersionInfo.pas +++ b/Src/UVersionInfo.pas @@ -30,6 +30,9 @@ interface Record representing the four fields of a version number. } TVersionNumber = record + strict private + ///

    Converts version number to a string. + function ToString: string; public V1: Word; // Major version number V2: Word; // Minor version number @@ -107,6 +110,12 @@ TVersionNumber = record @return Converted version number. @except EConvertError. raised if string in wrong format. } + class operator Implicit(Ver: TVersionNumber): string; + {Operator overload that performs implicit conversion of a version number + to a string in dotted quad format. + @param Ver [in] Version number to be converted. + @return Dotted quad string. + } class operator Explicit(Ver: TVersionNumber): TPJVersionNumber; {Operator overload that performs an explicit conversion of a TVersionNumber to a TPJVersionNumber (from PJVersionInfo unit). @@ -269,7 +278,7 @@ class function TVersionInfo.SpecialBuildStr: string; @return Dotted quad string. } begin - Result := Format('%d.%d.%d.%d', [Ver.V1, Ver.V2, Ver.V3, Ver.V4]); + Result := Ver.ToString; end; class operator TVersionNumber.GreaterThan(Ver1, Ver2: TVersionNumber): Boolean; @@ -327,6 +336,16 @@ function TVersionNumber.IsNull: Boolean; Result.V4 := Ver.V4; end; +class operator TVersionNumber.Implicit(Ver: TVersionNumber): string; + {Operator overload that performs implicit conversion of a version number to a + string in dotted quad format. + @param Ver [in] Version number to be converted. + @return Dotted quad string. + } +begin + Result := Ver.ToString; +end; + class operator TVersionNumber.LessThan(Ver1, Ver2: TVersionNumber): Boolean; {Operator overload that compares two version numbers to check if first is less than second. @@ -371,6 +390,11 @@ class function TVersionNumber.Nul: TVersionNumber; Result.V4 := 0; end; +function TVersionNumber.ToString: string; +begin + Result := Format('%d.%d.%d.%d', [V1, V2, V3, V4]); +end; + class function TVersionNumber.TryStrToVersionNumber(const S: string; out V: TVersionNumber): Boolean; var From 16184f02442ae1e1e2818df372e0a38977af4a6b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 1 May 2020 05:04:32 +0100 Subject: [PATCH 318/714] Add note of database version to database tab of about box Also reformatted some code. --- Src/FmAboutDlg.pas | 30 +++++++++-------------- Src/Res/HTML/dlg-about-database-tplt.html | 2 +- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/Src/FmAboutDlg.pas b/Src/FmAboutDlg.pas index 804f93118..e20d29ae3 100644 --- a/Src/FmAboutDlg.pas +++ b/Src/FmAboutDlg.pas @@ -424,49 +424,42 @@ procedure TAboutDlg.InitHTMLFrames; var IsDBAvalable: Boolean; IsMetaDataAvailable: Boolean; - IsLicenseInfomAvailable: Boolean; + IsLicenseInfoAvailable: Boolean; begin // Resolve conditionally displayed block placeholders IsDBAvalable := Database.Snippets.Count(False) > 0; IsMetaDataAvailable := fMetaData.IsSupportedVersion and not fMetaData.IsCorrupt; - IsLicenseInfomAvailable := IsMetaDataAvailable + IsLicenseInfoAvailable := IsMetaDataAvailable and (fMetaData.GetLicenseInfo.Name <> '') and (fMetaData.GetCopyrightInfo.Date <> '') and (fMetaData.GetCopyrightInfo.Holder <> ''); Tplt.ResolvePlaceholderHTML( - 'DBAvailable', - TCSS.BlockDisplayProp(IsDBAvalable) + 'DBAvailable', TCSS.BlockDisplayProp(IsDBAvalable) ); Tplt.ResolvePlaceholderHTML( - 'DBNotAvailable', - TCSS.BlockDisplayProp(not IsDBAvalable) + 'DBNotAvailable', TCSS.BlockDisplayProp(not IsDBAvalable) ); Tplt.ResolvePlaceholderHTML( - 'MetaDataAvailable', - TCSS.BlockDisplayProp(IsMetaDataAvailable) + 'MetaDataAvailable', TCSS.BlockDisplayProp(IsMetaDataAvailable) ); Tplt.ResolvePlaceholderHTML( - 'MetaDataNotAvailable', - TCSS.BlockDisplayProp(not IsMetaDataAvailable) + 'MetaDataNotAvailable', TCSS.BlockDisplayProp(not IsMetaDataAvailable) ); Tplt.ResolvePlaceholderHTML( - 'LicenseInfoAvailable', - TCSS.BlockDisplayProp(IsLicenseInfomAvailable) + 'LicenseInfoAvailable', TCSS.BlockDisplayProp(IsLicenseInfoAvailable) ); Tplt.ResolvePlaceholderHTML( 'LicenseInfoNotAvailable', - TCSS.BlockDisplayProp(not IsLicenseInfomAvailable) + TCSS.BlockDisplayProp(not IsLicenseInfoAvailable) ); - // Rsolve content placeholders + // Resolve content placeholders Tplt.ResolvePlaceholderText( - 'CopyrightYear', - fMetaData.GetCopyrightInfo.Date + 'CopyrightYear', fMetaData.GetCopyrightInfo.Date ); Tplt.ResolvePlaceholderText( - 'CopyrightHolders', - fMetaData.GetCopyrightInfo.Holder + 'CopyrightHolders', fMetaData.GetCopyrightInfo.Holder ); Tplt.ResolvePlaceholderHTML( 'DBLicense', @@ -489,6 +482,7 @@ procedure TAboutDlg.InitHTMLFrames; Tplt.ResolvePlaceholderHTML( 'TesterList', ContribListHTML(fMetaData.GetTesters) ); + Tplt.ResolvePlaceholderText('Version', fMetaData.GetVersion); end ); end; diff --git a/Src/Res/HTML/dlg-about-database-tplt.html b/Src/Res/HTML/dlg-about-database-tplt.html index e83157a72..8fecf18f1 100644 --- a/Src/Res/HTML/dlg-about-database-tplt.html +++ b/Src/Res/HTML/dlg-about-database-tplt.html @@ -46,7 +46,7 @@ Code Snippets Database is a resource containing numerous fragments of useful Object Pascal code. + >Code Snippets Database is a resource containing numerous fragments of useful Object Pascal code. You are using version <%Version%>

    From d85f27f37f777d003d73d29270bc11d5cd3189e9 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 1 May 2020 05:21:47 +0100 Subject: [PATCH 319/714] Add new TCSS.InlineDisplayProp --- Src/UCSSUtils.pas | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Src/UCSSUtils.pas b/Src/UCSSUtils.pas index dd2586fab..d0d7696a9 100644 --- a/Src/UCSSUtils.pas +++ b/Src/UCSSUtils.pas @@ -403,6 +403,13 @@ TCSS = record /// string. Required CSS property. class function BlockDisplayProp(const Show: Boolean): string; static; + /// Creates a CSS "display" property that causes its element to be + /// either hidden or displayed as "inline". + /// Boolean [in] Flag indicating if block is to be + /// displayed (True) or hidden (False). + /// string. Required CSS property. + class function InlineDisplayProp(const Show: Boolean): string; static; + /// Creates a CSS "overflow", "overflow-x" or overflow-y" /// property. /// TCSSOverflowValue [in] Required overflow handling. @@ -586,6 +593,14 @@ class function TCSS.HideBorderProp(const Side: TCSSSide): string; Result := BorderProp(Side, 0, cbsNone, clNone); end; +class function TCSS.InlineDisplayProp(const Show: Boolean): string; +const + // Map of flag onto required display style + BlockDisplayStyles: array[Boolean] of TCSSDisplayStyle = (cdsNone, cdsInline); +begin + Result := DisplayProp(BlockDisplayStyles[Show]); +end; + class function TCSS.LengthList(const List: array of Integer; const LU: TCSSLengthUnit): string; var From f53d768e495c72645dc0a7ce1c0203a4328fef51 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 1 May 2020 05:24:04 +0100 Subject: [PATCH 320/714] Fix how database version number is displayed. containing version number text was being displayed as a block of *within* a paragraph. Fixed to be displayed inline. --- Src/FmAboutDlg.pas | 21 +++++++++++++++++++-- Src/Res/HTML/dlg-about-database-tplt.html | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Src/FmAboutDlg.pas b/Src/FmAboutDlg.pas index e20d29ae3..01ee90ea6 100644 --- a/Src/FmAboutDlg.pas +++ b/Src/FmAboutDlg.pas @@ -196,7 +196,8 @@ implementation UMessageBox, UResourceUtils, UStrUtils, - UThemesEx; + UThemesEx, + UVersionInfo; {$R *.dfm} @@ -425,6 +426,18 @@ procedure TAboutDlg.InitHTMLFrames; IsDBAvalable: Boolean; IsMetaDataAvailable: Boolean; IsLicenseInfoAvailable: Boolean; + + function DBVersion: string; + var + Ver: TVersionNumber; + begin + Ver := fMetaData.GetVersion; + if Ver.V1 = 1 then + Result := '1' + else + Result := Ver; + end; + begin // Resolve conditionally displayed block placeholders IsDBAvalable := Database.Snippets.Count(False) > 0; @@ -449,6 +462,10 @@ procedure TAboutDlg.InitHTMLFrames; Tplt.ResolvePlaceholderHTML( 'LicenseInfoAvailable', TCSS.BlockDisplayProp(IsLicenseInfoAvailable) ); + Tplt.ResolvePlaceholderHTML( + 'LicenseInfoAvailableInline', + TCSS.InlineDisplayProp(IsLicenseInfoAvailable) + ); Tplt.ResolvePlaceholderHTML( 'LicenseInfoNotAvailable', TCSS.BlockDisplayProp(not IsLicenseInfoAvailable) @@ -482,7 +499,7 @@ procedure TAboutDlg.InitHTMLFrames; Tplt.ResolvePlaceholderHTML( 'TesterList', ContribListHTML(fMetaData.GetTesters) ); - Tplt.ResolvePlaceholderText('Version', fMetaData.GetVersion); + Tplt.ResolvePlaceholderText('Version', DBVersion); end ); end; diff --git a/Src/Res/HTML/dlg-about-database-tplt.html b/Src/Res/HTML/dlg-about-database-tplt.html index 8fecf18f1..e2b1e385a 100644 --- a/Src/Res/HTML/dlg-about-database-tplt.html +++ b/Src/Res/HTML/dlg-about-database-tplt.html @@ -46,7 +46,7 @@ Code Snippets Database is a resource containing numerous fragments of useful Object Pascal code. You are using version <%Version%> + >Code Snippets Database is a resource containing numerous fragments of useful Object Pascal code. You are using version <%Version%>.

    From 4c0491e6a0a53dddc8eb1917f87cf0f800a69c61 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 1 May 2020 20:48:02 +0100 Subject: [PATCH 321/714] Correct class snippet help topic --- Src/Help/HTML/snippet_class.htm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Src/Help/HTML/snippet_class.htm b/Src/Help/HTML/snippet_class.htm index d596aa09f..6de6567e0 100644 --- a/Src/Help/HTML/snippet_class.htm +++ b/Src/Help/HTML/snippet_class.htm @@ -58,8 +58,7 @@

    Warning: It is an error to use this - snippet kind for records or classes that have no methods (for example pure - abstract classes) – use a simple type definition snippet instead.

    From f38953b911bfad007281243461c8232049c3a968 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 1 May 2020 20:49:16 +0100 Subject: [PATCH 322/714] Again modify details of snippets database on Install / Update wizard front page Download file name has changed again in run up to release 2.0.0 of code snippets database --- Src/Res/HTML/dlg-dbupdate-intro-tplt.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Res/HTML/dlg-dbupdate-intro-tplt.html b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html index 79fa4c696..7ec6e252a 100644 --- a/Src/Res/HTML/dlg-dbupdate-intro-tplt.html +++ b/Src/Res/HTML/dlg-dbupdate-intro-tplt.html @@ -35,7 +35,7 @@ First go to <%CSDBReleaseURL%> and find the latest release of the database. Look for a zip file whose name has the form csdb-v2.x.x.zip where 2.x.x is the database version number. + ><%CSDBReleaseURL%> and find the latest version 2 release of the database. Look for a zip file whose name has the form csdb-v2.x.x-data.zip where 2.x.x is the database version number.

    From 90dd835ba17c016cbfa79bb46d69c22e148b9231 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 14 May 2020 20:16:55 +0100 Subject: [PATCH 323/714] Add new change log file combining all 5 original logs, converted to markdown format --- CHANGELOG.md | 2275 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2275 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..3a9463eaf --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,2275 @@ +# Changelog + + +## Release v4.15.1 of 22 September 2016 + ++ Updated OS detection code to detect Windows 10 Version 1607 (Anniversary update) and all technical previews of Windows 2016 Server to date. + + +## Release v4.15.0 of 13 July 2016 + ++ Added support for test compilation with, and detection of, Delphi 10.1 Berlin compiler. ++ Tweaked size of compiler list in Configure Compilers dialogue box to accommodate length of Delphi 10.1 Berline compiler name! ++ Updated documentation re changes. ++ Updated help file re changes. + + +## Release v4.14.0 of 19 March 2016 + ++ Changes to About Box's "Paths" tab: + - Added new buttons to display the contents of the system and per-user config files. + - Renamed tab as "Paths & Files". ++ Implemented feature request #83 (https://sourceforge.net/p/codesnip/feature-requests/83/) to enable the name and port of any web service test server to be passed on command line by using the new "--test-server" command line option. This replaces hard-wired test server name & port that was activated using the now removed "-localhost" command line switch. ++ Fixed bug #96: "Some open / save dialogues too small" (https://sourceforge.net/p/codesnip/bugs/96/). The height of customised dialogue boxes was increased. ++ Updated operating system detection code to detect Windows 10 TH2. ++ New photo of Sophie the dog added to the Easter egg slide show! ++ Updated help file re About Box changes. + + +## Release v4.13.2 of 20 February 2016 + ++ Updated and corrected hints displayed in main window. ++ Changed some menu options and associated dialogue box captions. ++ Tweaked some button captions in Select Snippets dialogue box. ++ Updated help file re the menu and caption changes. ++ Updated copyright date in program license as displayed in help, about box, installer and documentation. + + +## Release v4.13.1 of 29 September 2015 + ++ Improved operating system detection to detect Windows 10. ++ Modified program's manifest to declare it compatible with Windows 8 to 10. ++ Code that determines which system font to use no longer depends on OS version but simply on font availability. ++ Updated copyright date in program license as displayed in help, about box, installer and documentation. + + +## Release v4.13.0 of 5 September 2015 + ++ Added support for test compilation with, and detection of, Delphi 10 Seattle compiler. ++ Made some minor changes to method used to build required type library to remove dependency on the MS MIDL compiler, greatly simplifying build process. ++ Updated documentation re changes. ++ Updated help file re changes. + + +## Release v4.12.0 of 6 May 2015 + ++ Added support for test compilation with, and detection of, Delphi XE8 compiler. ++ Updated documentation re changes. ++ Updated help file re changes and fixed some spelling mistakes. + + +## Release v4.11.1 of 26 October 2014 + ++ Corrected an erroneous error message that is displayed when circular snippet references are detected in the snippets editor (no bug report filed). ++ Corrected some spelling errors in UI. ++ Some documentation corrections. + + +## Release v4.11.0 of 25 September 2014 + ++ Changes re licensing of snippets from online Code Snippets Database under MIT license: + - Generated code now carries a reference to the MIT license where relevant. + - Submit Snippets wizard has a new page where user must confirm that any submitted snippets may be MIT licensed. + - "About the Database" of the About Box now refers to the license. + - Documentation and help file updated accordingly. ++ Now uses version 6 of the Code Snippets Database update web service which supports the downloading of category and source code files larger than 32Kb. ++ The undocumented -localhost command line option now causes CodeSnip to expect web services to be on localhost port 8080 instead of port 80. This change has no effect on normal operation and is used only in testing. ++ Minor layout tweaks in in Display tab of Preferences dialogue box. ++ Minor changes to help file and documentation. + + +## Release v4.10.0 of 12 September 2014 + ++ Added support for test compilation with, and detection of, Delphi XE7 compiler. ++ Updated documentation re changes. ++ Updated help file re changes. + + +## Release v4.9.0 of 30 April 2014 + ++ Added support for test compilation with, and detection of, Delphi XE6 compiler. ++ Updated documentation re changes. ++ Updated help file re changes. + + +## Release v4.8.7 of 06 March 2014 + ++ Fixed automatic update checker so that it correctly records last update date. This fixes bug #93 (http://bit.ly/NmSQUt). ++ Updated to use v2 of the DelphiDabbler CodeSnip update web service when checking for availability of program updates. ++ Minor corrections to help file. + + +## Release v4.8.6 of 28 February 2014 + ++ Improved operating system detection to handle Windows 8.1. ++ Added compatibility section to application manifest that declares the program has been tested with Windows Vista and Windows 7. + + +## Release v4.8.5 of 13 January 2014 + ++ Fixed bug #91 "Generated units won't compile on Delphi XE5" (http://bit.ly/1eBjym2). Compiler directives that are used to change compiler warnings now includes a conditionally compiled $LEGACYIFEND ON directive. ++ Fixed potential bug when checking for the existence of files. It had been possible that a "sym-link" to a file could give misleading results. ++ Updated program copyright date in license file, about box, help file and installer. + + +## Release v4.8.4 of 28 November 2013 + ++ Improved user interface of SWAG Import Wizard. ++ Renamed "Save Snippet" and "Copy Snippet" menu options to "Save Annotated Source" and "Copy Annotated Source". This fixes bug #90: " Wrong caption on menu option for copying category to clipboard" (http://bit.ly/ImA398). ++ Revised and corrected numerous main menu and pop-up menu hints. ++ Updated help file re changes to menu options and SWAG Import Wizards. + + +## Release v4.8.3 of 06 November 2013 + ++ Fixed registry access code so that the 64 bit view of the registry is used when CodeSnip runs on a Windows 64 bit operating system. ++ Changed to avoid use of a deprecated API call when using the Windows Browse for Folder dialogue box. ++ Updated documentation. + + +## Release v4.8.2 of 30 October 2013 + ++ Modified Syntax Highlighter tab of Preferences dialogue box so that "vertical" fonts (whose names begin with "@") no longer appear in list of available fonts. ++ Fixed potential bug in operating system detection code that may fail on Windows 2000. + + +## Release v4.8.1 of 18 September 2013 + ++ Removed "File | Page Setup" menu option because some settings made there were being ignored when a file was printed. This is a fix for bug #89 "Setup selections not being remembered" (http://bit.ly/1a3V94x). ++ Updated help file re changes. + + +## Release v4.8.0 of 12 September 2013 + ++ Added support for Delphi XE5 compiler. ++ Fixed bug in code that reads or imports user database files written using CodeSnip 3 where Delphi XE4 compile results would be lost. ++ Updated documentation re changes. ++ Updated help file re changes. + + +## Release v4.7.2 of 27 August 2013 + ++ Fixed bug #88 "SWAG Import Wizard display bug" (http://bit.ly/15ryOxz) where duplicate snippets could be displayed on the "Ready to import" page in certain circumstances. + + +## Release v4.7.1 of 18 August 2013 + ++ Fixed bug where right clicking a tab in the detail pane sometimes caused the contents of the pane to be temporarily blanked out while the context menu was displayed. + - This fix also, as a side effect, fixed bug #87 "Tab headings and contents don't match after a tab is closed." (http://bit.ly/15TD197). + + +## Release v4.7.0 of 31 July 2013 + ++ Implemented feature request #71 "Support importing of one or more snippets from the SWAG database" (http://bit.ly/18AFlGu): + - Uses DelphiDabbler SWAG web service to get SWAG data. + - New wizard to permit user to select required SWAG snippets. This is accessible from the new "Snippets | Import Snippets From SWAG" menu option. + - Snippets are imported into a new "SWAG Imports" category. ++ Implemented feature request #80 "Enable detail pane tabs to be re-ordered" (http://bit.ly/13cbjTZ). ++ In detail pane source code and compiler table now display horizontal scroll bars if they do not fit within the width of the pane. This implements feature requests #60 (http://bit.ly/17iCzT4) and #61 (http://bit.ly/1coDJ5f). ++ Minor changes to dialogue box that appears during long operations. ++ Fixed bug #86 "Snippets are sorted by snippet name in snippet table listings in detail pane" (http://bit.ly/17iD27H). ++ Fixed a few code errors that could have surfaced as bugs. ++ Modified how HTML based detail pane display is generated and displayed. ++ Some refactoring. ++ Updated some 3rd party code to latest available versions. ++ Updated help file re changes. ++ Updated privacy statement. + + +## Release v4.6.4 of 24 July 2013 + ++ Fix for IE 9 related browser control script bugs introduced in v4.6.3 when IE 10 bugs were fixed: + - Bug #84 "Script errors on startup" (http://bit.ly/13bfaAL). + - Bug #85 "Check For Updates link " (http://bit.ly/1656pgE). + + +## Release v4.6.3 of 14 July 2013 + ++ Further fix for IE 10 related bug #75 "Floating point error in 4.4.1" (http://bit.ly/12zAWSp). Re-implemented method used to display content in main window's detail pane using the IE web browser control. + + +## Release v4.6.2 of 09 July 2013 + ++ Tentative fix for bug #83 "Error when the main form is shown" (http://bit.ly/12eUV5Y) that has been reported on Windows 8. The fix is tentative because the bug hasn't been reproduced. + + +## Release v4.6.1 of 01 July 2013 + ++ Provided fix for reported bug #75 "Floating point error in 4.4.1" (http://bit.ly/12zAWSp) that apparently affects Windows 8, probably with IE 10 installed. ++ Fixed unreported bug where IE 10 browser was being reported as IE 9. ++ Fixed potential bug in code that processes class / advanced record snippet types ready for test compilation and inclusion in generated units. + + +## Release v4.6.0 of 02 June 2013 + ++ Added new options to "Find Cross References" dialogue box to allow snippets that either cross reference or depend upon the selected snippet to be included in the search. This implements feature request #30 (http://bit.ly/13cYImA). ++ Added a new "Select and Close" button to the Dependencies dialogue box that causes the snippets displayed on the current tab to be selected in the main display. This implements feature request #77 (http://bit.ly/15s8fH2). ++ The background colour of source code displayed in the main display can now be customised via a new option on the Display tab of the Preferences dialogue box. This implements feature request #36 (http://bit.ly/17fxMGW). ++ CodeSnip now compiled with Delphi XE. ++ Per-user configuration file format changed to v15 which is not entirely compatible with previous versions of CodeSnip. ++ Updated help file re changes. + + +## Release v4.5.1 of 15 May 2013 + ++ Added progress bars or marquees to several database operations that can take a long time on slower storage devices, i.e.: + - When local files are being updated after downloading an updated database in the Update From Web dialogue box. This fixes bug #79 (https://sourceforge.net/p/codesnip/bugs/79/) + - When the local database is being saved. + - When the local database is being backed up or restored. + - When the local database is being moved to a new location. ++ The user database can now be relocated to a network drive. This fixes issue #81 "Move database to a network drive" (https://sourceforge.net/p/codesnip/bugs/81/). ++ Fixed issue #80 "HTML output bug" (https://sourceforge.net/p/codesnip/bugs/80/). ++ Fixed minor alignment bug that occurred when displaying a wait dialogue box over the main window. ++ Some refactoring. ++ Updated help file re changes. + + +## Release v4.5.0 of 02 May 2013 + ++ Added support for Delphi XE4 compiler. Implements feature request #78 (http://bit.ly/10uGhoD). ++ Updated documentation re changes. ++ Updated help file re changes. + + +## Release v4.4.2 of 26 April 2013 + ++ Fixed bugs: + - #76 (http://bit.ly/12Loz5o) - An advanced record snippet with a method name that clashes with a directive is not test compiling correctly. + - #77 (http://bit.ly/11I9wXI) - Syntax highlighter highlights "contains", "requires" and "package" directives when used in method names. + - #78 (http://bit.ly/ZQl3T4) - CodeSnip doesn't restore window in correct position when task bar on left or top of screen. + + +## Release v4.4.1 of 09 April 2013 + ++ Fixed bug #73 "Attempting to check for program updates returns a 404 'Not found' error" (http://bit.ly/Yf3UGy) - this error happened only when using remote server, not localhost test server. + + +## Release v4.4.0 of 08 April 2013 + ++ Implemented feature request #75 "Check for updates on start-up" (http://bit.ly/ZJ8OGH): + - CodeSnip checks for both program and Code Snippets Database updates in low priority background threads that run when the program is first started. + - Update checking takes place at intervals between once per day and once per month. + - A new "Updates" tab was added to the "Preferences" dialogue box where update frequencies can be chosen, or the auto-update feature switched off. Program and database update checking can be configured individually. + - Updates are notified via a new slide-in, slide-out notification window that is displayed for a fixed amount of time or until closed by the user. The notification window contains a button that can be used to initiate the appropriate update. For database updates the "Update From Web" dialogue box is opened while for program updates a suitable download web page is displayed in the default browser. + - Program checking is edition specific, i.e. the standard edition checks for standard edition updates and the portable edition behaves similarly. ++ A new "Update Checks" section was added the welcome screen that gives information about the current auto-update settings and provides a link to change them. Some other text on the screen was tweaked. ++ The "Check For Program Updates" dialogue box now opens the correct version and edition specific web page to download the latest version of CodeSnip instead of simply opening a general download page. ++ A new CodeSnip specific program update web service on the codesnip.delphidabbler.com sub-domain is now used to get information about CodeSnip updates instead of the generic update service on delphidabbler.com. ++ Additional usage information is now sent to the DelphiDabbler Code Snippets database update web service. ++ Some refactoring and code clean-up. ++ The installer may now display an information page that describes the new automatic update checking feature. This page is displayed only when updating from v4.3.0 or earlier to v4.4.0 (or later). ++ Updated help file: + - Updated and added help topics for all new features of the release. + - Updated "What's New" topic re new features. ++ Updated documentation, including privacy statement, with information about automatic update checking. ++ Per-user configuration file format changed to v13 which is incompatible with previous versions of CodeSnip. + + +## Release v4.3.0 of 27 February 2013 + ++ Implemented feature request #40 "Add 'Namespaces' tab to Configure Compilers dialogue box" (http://bit.ly/12XsX32). The new tab appears only for Delphi XE2 and later and obviates the need to manually create -NS commands for passing to the compilers. Suitable default namespaces are provided if none have been configured. ++ Implemented feature request #70 "Let user specify location of user database" (http://bit.ly/13aNCQZ). This feature is accessed from the new "Move Use Database" option on the Database menu. NOTE: The feature is not available in the portable edition which is designed to keep the user database together with the program. ++ Implemented feature request #69 "Enable custom syntax highlighter styles to be saved" (http://bit.ly/XQHkOI). The Syntax Highlighter tab of the Preferences dialogue box has been modified to enable custom syntax highlighter attributes to be saved under a given name and existing named styles to be used or deleted. ++ Changed name of "Delphi 2006" predefined syntax highlighter to "RAD Studio". This remains the default highlighter. ++ A little refactoring. ++ Enlarged Configure Compilers dialogue box. ++ Updated help file: + - Updated and added help topics re all new features in the release. + - Updated "What's New" topic re new features. + - Removed help topic for "Browse For Folders" dialogue box accessed from Search Paths tab of Configure Compilers dialogue. ++ Per-user configuration file format changed to v12 which is not fully compatible with previous versions of CodeSnip. ++ Updated documentation. + + +## Release v4.2.1 of 14 February 2013 + ++ Bug fix: changed Favourites dialogue to display snippet display names instead of unique names. Fixes bug #72 (http://bit.ly/Vj6ZCM). ++ Updated program copyright date in About box. + + +## Release v4.2.0 of 07 February 2013 + ++ Added support for "favourite" snippets. Implements feature request #37 (http://bit.ly/12unShW): + - Any displayed snippet can be flagged as a favourite via a menu option or toolbar button. + - A new non-modal dialogue box can now be displayed alongside the CodeSnip window for easy selection and management of favourite snippets. ++ Changes to Duplicate Snippets dialogue box: + - Display name of duplicate snippet can be edited. Implements feature request #64 (http://bit.ly/14TdUGF). + - Snippets Editor can be opened immediately the Duplicate Snippet dialogue box closes to edit the duplicated snippet. Implements feature request #65 (http://bit.ly/UBlt2Y). ++ Status bar changed: first panel now displays no category information, but displays both total number of snippets and number of snippets in each database. ++ Fixed unreported bug in save dialogue boxes where overwrite permission requests could be displayed erroneously. ++ Program closes gracefully if run on unsupported versions. ++ Updated some 3rd party code to latest available versions. ++ Some refactoring. ++ Per-user configuration file format changed to v11 which is not fully compatible with older versions of CodeSnip. ++ Updated help file re changes in Duplicate Snippets dialogue box and addition of support for Favourites. ++ Updated documentation. + + +## Release v4.1.1 of 30 January 2013 + ++ Fixed bugs: + - #68 (http://bit.ly/WxG6LC): Comments missing in unit / code generation for some types. + - #70 (http://bit.ly/WAYEHN): Changing syntax highlighter font has no effect in main display. + - #71 (http://bit.ly/14v9i9v): Option to select monochrome printing not working properly. + - Unreported: Changing syntax highlighter font has no effect when printing or when copying text to clipboard as RTF (related to bug #70). ++ Updated help file re syntax highlighter changes. + + +## Release v4.1.0 of 06 January 2013 + ++ This is the first non-beta release to made available in both standard and portable editions, compiled from a common code base. The portable edition differs from the standard as follows (as per release v4.0.1 portable beta 1): + - Executable file name is CodeSnip-p.exe. + - Program caption identifies program as portable version. + - Data directories are sub-directories of executable program directory. + - Common file dialogue boxes default to program's working directory. + - First run processing does not give the option to import old settings or existing user databases. + - Different version information and program identifier. + - There is no set up program. ++ Changes to snippets editor: + - Added context menus to cross-references and dependencies check box lists. Both have menu item to clear list. Dependencies list has item to view dependencies. Implements feature request #3560960 (http://bit.ly/U83Swh). + - Deleted "View Dependencies" button now that its functionality is now on context menu. + - Enlarged various controls on all except "Code" tab. + - Units listed on "References" tab is now persistent. Units can be removed, defaults restored and selection cleared via a new context menu. Implements feature request #3560962 (http://bit.ly/UM0c0B). ++ New source code formatting option added to only use first paragraph of a snippet description as snippet comment in generated code. This is configured via "Code Formatting" tab of "Preferences" dialogue box and / or from relevant "Save" dialogue boxes. Implements feature request #3560647 (http://bit.ly/UQrDax). ++ Changed mini-toolbar in overview pane to expand / collapse all overview tree view instead of just selected node. Implements feature request #3560646 (http://bit.ly/UOUQTr). ++ Reimplemented database search engine. ++ Some external links modified that will seamlessly accommodate future changes in destination URLs. ++ Changed some glyphs used in menus. ++ Per-user configuration file format changed: bumped file version to 10. ++ Some refactoring. ++ Help file updated re changes & added privacy statement to TOC. ++ Updated documentation: + - Re changes to source code repository and bug / feature request trackers. + - Re portable version. + + +## Release v4.0.2 of 17 December 2012 + ++ Improvements to keyboard handling: + - Fixed some keyboard focus bugs. + - Fixed broken, missing and duplicate Alt-key short-cuts in several dialogue boxes. + - Fixed broken keyboard access to list view in Code Generation tab of Preferences dialogue box. ++ Corrected an incorrect font in Compilers dialogue box. ++ Added title to "View Link" dialogue box displayed from mark-up editor. ++ Corrected error in "Submit Code to the Database" task help topic. + + +## Release v4.0.1 portable edition, beta 1 of 12 December 2012 + +_Internal CodeSnip version 4.0.1.213_ + ++ Modified version of Release v4.0.1 that can run from a writeable removable medium without writing files or registry on host computer. This implements feature request #3577431 (http://bit.ly/UxvUj0). ++ Changes that apply only to portable version: + - Changed executable file name to CodeSnip-p.exe. + - Program caption changed to identify as portable version. + - Data directories changed to be sub-directories of executable program directory. + - Changed common file dialogue boxes to working directory by default. + - First run processing no longer gives option to import old settings or existing user databases. + - Different version information and program identifier format. + - No set up program. ++ Code base modified to conditionally compile either portable or standard edition. ++ Updated documentation, including privacy statement. + + +## Release v4.0.1 of 08 December 2012 + +_Internal CodeSnip version 4.0.1.212_ + ++ Fixed bug #3578652 (http://bit.ly/RXIwBC): "Pre-processor directive errors in main db ini files" by removing support for problematic directives. ++ Rolling mouse over links in detail pane no longer displays a hint in the status bar. This change fixes bug #3577407 (http://bit.ly/VeSVGg): Clicking detail pane snippet link leaves hint in status bar. ++ Windows no longer scale automatically when screen DPI differs from that on design system. This fixes bugs #3591818 (http://bit.ly/TvNaUL) "Strange window behaviour in Windows 7" and bug #3591820 (http://bit.ly/SEH6dO) "Incorrect font size used for some bold text". ++ Update operating system detection code to detect W0ndows 8 & 2012 server. ++ Some refactoring and some redundant code removed. ++ Updated documentation. ++ Updated help topic that describes main display. + + +## Release v4.0.0 of 12 October 2012 + +_Final v4 release._ + +See also changes from alpha, beta and release candidates below for details of changes since v3.9.3. + ++ New glyphs that describes level of testing applied to snippets from online Code Snippets Database now appear in top right of detail pane. ++ Changed main window caption and task bar entry to include version number "4" after program name. ++ Fixed bugs: + - #3572382 (http://bit.ly/OnEtNY): Automatic conversion of blank lines to paragraphs in REML mark-up editor gets confused if block level tags are already present. + - Unreported: Controls in News dialogue box do not use correct font. ++ A little refactoring. ++ Updated help file: + - Modified re recent changes + - Added new "What's new" topic giving details of changes in v4. Implements feature request #3567490 (http://bit.ly/RgQx0W). + - Renamed "Welcome" page as "Overview". ++ Updated documentation, including read-me file. + + +## Release v4.0 RC 3 of 18 September 2012 + +_Internal CodeSnip version 3.999.3_ + ++ Fixed serious bug #3568628 (http://bit.ly/V5NX0H): "CodeSnip faulting at startup after fresh install with no previous v3 installation". + + +## Release v4.0 RC 2 of 17 September 2012 + +_Internal CodeSnip version 3.999.2_ + ++ Fixed serious bug #3568515 (http://bit.ly/Oy2Q7g): Duplicating a snippet with a display name causes crash. ++ Minor update to licensing information and about box credits. + + +## Release v4.0 RC 1 of 14 September 2012 + +_Internal CodeSnip version 3.999.1_ + ++ UI changes: + - Welcome page completely revised. Instead of a program overview the page now describes the state of the databases and available compilers and displays help links and a donation request. There are also some links to the about box, news and program updates. + - Many changes to glyphs used in menus and toolbar. + - Removed some images that relate to trade marks, i.e. PayPal Donate button and Delphi compiler icons. + - No clicking noise is now issued by UI in response to user interaction with Details pane. + - Links to external commands and to other snippets re-styled. + - Revised and updated program's main icon. ++ Fixed bug #3566426 (http://bit.ly/OmbwTB): About Box Paths Page displays wrongly when themes not available. ++ Added support for Delphi XE3 compiler. Implements feature request #3566346 (http://bit.ly/SIVpS2). ++ Completely new Easter Egg. ++ Refactoring and internal code changes, including a revision of the "external" object that communicates with JavaScript in browser controls. ++ Changed License: + - EULA for executable code changed to Mozilla Public License v2.0. + - Most original source code changed to Mozilla Public License v2.0 from v1.1. + - Only an abbreviated version of the license is now displayed by the installer and in the help file. + - License information has been consolidated into a new file: License.html. ++ About box changed re new license and changes in required and voluntary acknowledgements and credits. ++ Help file updated. ++ Documentation updated. + + +## Release v4.0 beta 2 of 25 August 2012 + +_Internal CodeSnip version 3.99.2_ + ++ Bug fixes: + - #3556620 (http://bit.ly/Mq1Khh): Serious flaw in generating units containing class types when the classes contain method types other than procedure or function. + - #3556713 (http://bit.ly/RIzfvQ): Context menus are not displayed when pressing Alt+F10. + - #3556715 (http://bit.ly/O3QN0u): Deleting a category then returning to it via the history list causes a GPF. + - #3556718 (http://bit.ly/RVanCE): Inconsistent context menus for edit controls in Snippets Editor. + - #3557107 (http://bit.ly/PfiYxm): New snippets and categories are not added to the history list. + - #3558649 (http://bit.ly/PAXLQv): Closing the Preferences dialogue always refreshes the main display even if the dialogue box was cancelled or if nothing was changed. + - #3559156 (http://bit.ly/TKXYQ7): "Previews" giving examples of the effect of changes made in the Preferences dialogue box sometimes disappear when the tab key is pressed. + - #3559239 (http://bit.ly/Pm1HU4): Snippet names and display names are used inconsistently in the UI. + - #3559257 (http://bit.ly/Qc8Fqu): Compile Results displayed from the main menu can get out of sync with the actual compile results of snippets that have been edited since they were last compiled. + - #3559265 (http://bit.ly/NvV9iH): Viewing dependencies for an unnamed snippet or a snippet not in the database causes a GPF. + - #3559266 (http://bit.ly/S69wO2): When include files are generated for a snippet that depends on a class type, the required class is not listed in the file's header comments. + - #3560317 (http://bit.ly/PUcEgV): The caption of the Active Text preview dialogue box refers to "Extra" text when it is used to preview a snippet's description. + - #3560521 (http://bit.ly/RG7Jlw): The state of the Overview tree often doesn't restore correctly after a database update. + - #3560958 (http://bit.ly/TX7M9V): Snippets are not sorted correctly (i.e. on display name) in the Overview pane. + - #3561014 (http://bit.ly/PEFgXY): The current view in the Display pane is not cleared, even though all tabs are closed, when the database is re-loading. + - #3561047 (http://bit.ly/Pf5L5v): The Category view in the Overview pane sometimes appears fully expanded when it is expected to be fully collapsed. + - Untracked: Removed "(v4 preview)" text that had been left in main window title bar. + - Untracked: Minor accelerator key related problems in the Preferences dialogue box. ++ Main UI changes: + - The Detail pane tab-set now has a context menu that can be used to close the current tab or all but the current tab. The Close tab option is also added to current view's context menu. + - Right-clicking a tab in the Overview or Detail pane now selects the tab. + - Middle-clicking an item in the Overview pane now selects it. Previously middle clicks were ignored. + - Many more parts of the main display and dialogue boxes now display display names for snippets rather than unique names. + - Ctrl clicking snippet and category links in the Detail pane and History UI controls now opens the chosen item in a new tab. Implements feature requests #3559377 (http://bit.ly/OqnAjd) and #3559378 (http://bit.ly/NPtEkX). + - Different link styles are now used for the different types of link in the Detail pane. Implements feature request #3559464 (http://bit.ly/Pwsqg6). + - Pressing Ctrl+Return on an active snippet or category link in the Details pane now opens the item in a new tab instead of the current tab. Pressing Return now opens the item in the current tab. + - The Detail pane's context menu now displays more options when text selections and links are right clicked. Implements feature request #3559375 (http://bit.ly/NzaY8a) with some minor differences. + - New button added to the Display tab of the Preferences dialogue box that resets default snippet heading colours. Implements feature request #3559140 (http://bit.ly/QKQo43). + - The "Types" unit is now displayed by default in the Snippets Editor Reference Tab's predefined units list. ++ When a category is printed, any URLs in snippet descriptions are output and styled. ++ Names of units referenced by snippets may now contain dots. ++ Some refactoring and internal code changes, including a major reworking of the "first run" program configuration and a revision to the "external" object that communicates with JavaScript in browser controls. ++ Help file updated: + - Re UI changes. + - With a description of the need to configure namespaces for Delphi XE2 for each unit referenced by the code it is test compiling - addresses bug #3536531 (http://bit.ly/Q2bcmY). ++ Updated documentation. + + +## Release v4.0 beta 1 of 11 August 2012 + +_Internal CodeSnip version 3.99.1_ + ++ New features: + - Structure of snippet pages in details pane is now customisable: various page elements can be omitted and order of elements can be specified. Each snippet type has its own page customisation. Implements feature request #3519456 (http://bit.ly/NhT8Kr). + - Snippets can now have a "display name" that can contain any characters and does not need to be unique. When provided the display name is displayed in preference to the normal name. Implements feature request #3519460 (http://bit.ly/NN6kRP). + - Snippet descriptions can now be formatted and contain multiple paragraphs. This implements feature requests #3411890 (http://bit.ly/OS8a5a) and #3520405 (http://bit.ly/OS8yRe). + - Snippets can now be configured so that their source code is not syntax highlighted. This change allows snippets in other languages not to be highlighted as if they are Pascal. Implements feature request #3519935 (http://bit.ly/LrNiAg) + - Colour of headings for snippets and categories from main and user databases are now user configurable. This implements feature request #3519463 (http://bit.ly/Nz9JH2). + - User can now limit the number of compilers that appear in the compiler results table in the display pane. This is done via the Configure Compilers dialogue box. Implements feature request #3519459 (http://bit.ly/Q5O51z). + - New option on Tools menu that checks availability of new versions of CodeSnip. ++ User interface changes: + - "Test Compile" link removed from snippet display in details pane. + - "Test Compile" dialogue box changed so that only the installed compilers that CodeSnip uses for test compilation are displayed, instead of all known compilers. + - Welcome page revised. ++ Changes to snippets editor: + - New field on Code tab to enter optional snippet display name. + - New check box on Code tab to specify if Pascal syntax highlighter is to be used for source code. + - New tabbed "mark-up editor" lets user enter multi-paragraph snippet descriptions and extra information either as plain text or as REML mark-up. + - Controls on Code tab re-ordered. + - Extra Information tab revised with much larger edit control and deletion of explanatory text. + - Editor enlarged. ++ Changes to Preferences dialogue box: + - New "Snippet Layout" tab added where composition and layout of snippet pages can be customised. + - "General" preferences tab split into two: "Misc." that contains only measurement units and "Display" that contains display related options. + - Added controls to "Display" tab to set main and user database heading colours. + - Changes that affect appearance of content of details pane are now reflected in the display as soon as the Preferences dialogue box closes, rather than on program restart. ++ Changes to REML mark-up handling: + - Any REML text not embedded in block level tags is now automatically wrapped in

    tags. + - Nested REML block level tags are no longer allowed. + - Changed handling of multiple spaces in REML code to be the same as in HTML. + - Formatting of REML code improved when re-displayed. ++ Bug fixes: + - Bug #3536331 fixed (http://bit.ly/KQTYc3): words at the end of some paragraphs in a snippet's extra information were not being found in "whole word only" searches. + - Fixed unreported file parsing bug that occurred when loading a saved snippet selection from disk. ++ Changed Delphi compiler detection so that compilers can be detected by examining current user registry key in addition to local machine registry key. This enables Delphis that were installed for a given user only to be detected. ++ Improved error handling when reading and writing snippet selection files. ++ User database and export file formats updated to v6. ++ Per-user configuration file format changes: bumped file version to v9. ++ Major changes to installer: + - Now always brings forward any earlier common configuration files if needed. + - Per user configuration files are now ignored: they are handled by main program (see below). + - Only main database, not user database, is now imported from earlier versions on user request. User databases are now handled by main program (see below). + - There is no longer an option to delete old databases or configuration files. + - Updating from a v4 preview (alpha) release causes an extra page to be displayed that gives instructions relating to updating from preview to current release. ++ Program now detects if it is running for first time since updating: + - If this is first run since updating from v3 or earlier a "first run" wizard guides user through importing any old preferences or user databases. + - For point v4.x point updates user configuration file is silently updated as necessary. ++ Significant refactoring. ++ Updated help file in line with changes and new features. ++ Updated documentation, including minor changes to privacy statement and license. + + +## Release v4.0 alpha 3 (preview) of 18 June 2012 + +_Internal CodeSnip version 3.98.3_ + ++ New features: + - Compiler warnings can now be switched on as well as off in generated code. + - Names and descriptions of snippets in a category can now be printed. + - Text and compiler searches can now be nested so that the later search refines the earlier one. + - Current selection (i.e. search result set) can be saved to disk and loaded again later. ++ User interface changes: + - Overview pane now displays buttons that can be used to collapse or expand non-empty section headings. + - Ctrl + arrow keys can now be used to scroll overview pane tree view vertically and horizontally without changing selection in overview pane. + - Main window is now refreshed whenever changes that affect it are made in the Preferences dialogue box. + - Some main menu short-cut keys changed. + - Dependencies dialogue box now has two tabs: the first displays the snippets required to compile the selected snippet while the second tab displays snippets that depend upon the selected snippet. + - Code Generation tab of Preferences dialogue box updated to enable warnings to be switched on or off. In addition default warnings can be restored, list view columns can be sorted and Alt key short-cuts tweaked. + - Code Import dialogue box improved: now sorts imported units in list view and scrolls to make renamed snippets visible. + - Snippet selection and cross-reference search dialogues now report if existing search results will be overwritten. + - Text and compiler search dialogues now ask if any current search results are to be refined. + - Tree views in Snippet Selection, Snippets export and Snippets submission dialogue boxes can now be expanded and collapsed. + - Appearance of message boxes tweaked. + - Program tab of About box updated with credits for new third party code. ++ Bug fixes: + - Error in logic of code that generates program ID was fixed. + - Bug #2868708 fixed (http://bit.ly/KeyAvS): edited snippets are no longer lost from manual snippet selections unless snippet names are changed. + - Bug #3534138 fixed (http://bit.ly/Mg9gJG): details pane display is now cleared when last tab is closed: previously content of last closed tab remained on screen. ++ Info about user's OS and IE version is now sent to web server during online database updates. ++ Some refactoring. ++ Help file updated in line with changes and new features. Some US English spellings changed to UK English for consistency. ++ Updated documentation, including: + - Privacy statement updated re changes in data recorded via database update log-ons. + - Licensing docs updated re introduction of some MPL 2.0 files. + + +## Release v4.0 alpha 2 (preview) of 21 April 2012 + +_Internal CodeSnip version 3.98.2_ + ++ New features: + - New "unit" snippet type that enables complete units to be stored in database and to be test compiled. + - New "classes" snippet type that enables a single Object Pascal class or advanced record-with-methods to be stored in database, test compiled and included in generated units. + - Snippets from both the user and main databases can now be duplicated. Duplicates are editable and are stored in the user database. + - Online CodeSnip FAQs can now be displayed in the default browser from a new option on the "Help" menu. ++ User interface changes: + - New "Snippets" and "Categories" top level menus have been added. They are populated with items previously on the "Database" menu. "Snippets" menu also has new "Duplicate Snippet" item. + - "Help" menu re-arranged: items from the former "On The Web" sub-menu are now placed directly on "Help" menu. + - Numerous new and updated glyphs on toolbar, menu and in main display. + - Minor tweaks to controls in the Code tab of the Snippets Editor. + - Minor changes to the style of version info displayed on the splash screen. ++ Bug fixes: + - Fixed potential source of a bug in code that edits user-defined categories. + - Fixed unreported minor bug in dialogue boxes that display tabbed page controls: clicking a tab did not always give it the keyboard focus. + - Fixed bug #3519784 (http://bit.ly/IsCsun) where multi-line "type" or "constant" snippets that start on the same line as the type or const keyword were corrupted when included in units using the "comments after snippet header" comment style. ++ Characters used to introduced switches on the command line were changed: '/' replaces '\'. '-' is still permitted. ++ User and main database formats modified. User databases saved with this version may not be readable with release 4.0 alpha 1. ++ Some refactoring. ++ Help file updated in line with changes and some errors fixed. ++ Updated documentation. + + +## Release v4.0 alpha 1 (preview) of 31 December 2011 + +_Internal CodeSnip version 3.98.1_ + +**Changes relate to v3.9.3:** CodeSnip 4 development branched off CodeSnip 3.9.3. CodeSnip v3 continued to be developed in parallel. + ++ User interface changes: + - New multi-tab detail pane can now show more than one snippet, category etc. + - Results of test compiles now appear in a dialogue box instead of in details pane. + - New code import wizard for cleaner control over import process. + - New "Compile" top level menu that groups all actions relating to test compilation. + - Empty section headings can now be displayed in overview pane if required. + - New display options relating to multi-tab display. + - New view displayed instead of welcome screen when database updated. + - Some additions and changes to main window navigation keys. + - Main window and task bar captions changed. + - Some dialogue boxes tweaked. + - Compiler configuration dialogue box heavily revised to support default compiler paths. + - "About" dialogue box paths tab display improved. + - Compile error dialogue box display standardised. + - Splash screen updated. ++ Improved Delphi code syntax highlighter: + - Recognises Delphi 2010 keywords + - Correctly handles context sensitive directives within "property", "exports" and "external" statements. + - Recognises '&' prefix that causes keywords to be treated as identifiers. ++ Compiler search paths can now be specified for included units permitting non-VCL units to be used by snippets. ++ Database: + - Non-empty categories can no longer be deleted. + - File format of both user-defined and main databases changed. + - Database locations changed: updates to main database and edits to user database do not affect databases used by v3 and earlier. + - Location and file format of both user defined and main databases changed. + - Database now supports Unicode Delphi source code. + - Unicode Delphi identifiers can now be used for snippet names. + - Export and backup file formats updated: new formats are not backward compatible but older versions can still be imported. + - Code submission service now supports Unicode source code. + - Database updates now use v5 of delphidabbler.com web update service with revised checksum handling. ++ Unicode support: + - Program now fully supports Unicode internally. + - Test units now use UTF-8 format if source code contains non-ANSI characters. ANSI format is used otherwise to permit compilation on older Delphi compilers. + - Many export file formats now support Unicode and UTF8 formats. User may specify file types from Save dialogue box. + - Configuration files are now in Unicode format. + - Some Unicode support added to database (see above). ++ Web service data handling code improved: now includes ability to send raw bytes and can detect and adapt to character encoding used in responses. ++ Common and per-user configuration file names and locations changed. Bumped file version numbers to 6 and 8 respectively. ++ Fixed some bugs: + - Various Unicode and code page related problems in RTF code generation. + - Memory leaks. + - Version detection in backup file restoration. ++ Cascading style sheet handling improved. ++ Any errors in scripts run in browser control now trapped and reported as exceptions instead of via browser control's own error dialogue box. ++ Revised external object that communicates with JavaScript in browser controls. ++ Hyper-links used in snippets now support the https:// protocol. ++ A default title now used in print spooler if none specified. ++ Source code heavily refactored. ++ Help file updated in line with changes. ++ Installer: + - Changed so that v3 and v4 installs can co-exist - default install locations are different and v4 does not overwrite v3. + - Converts v3 configuration files to v4 Unicode format and copies to new locations. File version stamps are updated. + - Installer is now compiled with Unicode version of Inno Setup instead of ANSI version. + - Scripts updated and refactored. ++ Updated documentation, including changes to privacy statement and new file format documentation. + + +## Release v3.13.2 of 31 October 2013 + ++ Modified Syntax Highlighter tab of Preferences dialogue box so that "vertical" fonts (whose names begin with "@") no longer appear in list of available fonts. ++ Fixed potential bug in operating system detection code that may fail on Windows 2000. ++ Fixed registry access code so that the 64 bit view of the registry is used when CodeSnip runs on a Windows 64 bit operating system. + + +## Release v3.13.1 of 18 September 2013 + ++ Removed File | Page Setup menu option because some settings made there were being ignored when a file was printed. This is a fix for bug #89 "Setup selections not being remembered" (http://bit.ly/1a3V94x). ++ Updated help file re changes. + + +## Release v3.13.0 of 12 September 2013 + ++ Added support for Delphi XE5 compiler. ++ Updated documentation re changes. ++ Updated help file re changes. + + +## Release v3.12.1 of 01 July 2013 + ++ Fixed bug #82 "Fatal divide by zero exception on start-up" (http://bit.ly/15aIJqQ) that affected all v3.x versions when the IE 10 browser was installed. ++ Fixed unreported bug where IE 10 browser was being reported as IE 9. ++ Updated all third party DelphiDabbler code to latest available versions. ++ Updated documentation re changes. + +## Release v3.12.0 of 02 May 2013 + ++ Added support for Delphi XE4 compiler. Implements feature request #78 (http://bit.ly/10uGhoD). ++ Fixed bug #78 (http://bit.ly/ZQl3T4) - CodeSnip doesn't restore window in correct position when task bar on left or top of screen. ++ Updated documentation re changes. ++ Updated help file re changes. + + +## Release v3.11.1 of 08 December 2012 + ++ Fixed bug #3578654 (http://bit.ly/T7fTxu): "Pre-processor directive errors in main db ini files" by removing support for problematic directives. ++ Hints are no longer displayed in status bar when user rolls mouse over a link in the display pane. This fixes bug #3577408 (http://bit.ly/WEzZGg): "Clicking detail pane snippet link leaves hint in status bar". ++ Windows no longer scale automatically when screen DPI differs from that on design system. This fixes bugs #3591818 (http://bit.ly/TvNaUL) "Strange window behaviour in Windows 7" and bug #3591820 (http://bit.ly/SEH6dO) "Incorrect font size used for some bold text". ++ Updated operating system detection code to detect W0ndows 8 & 2012 server. ++ Updated documentation + + +## Release v3.11.0 of 17 September 2012 + ++ Added support for Delphi XE3 compiler. Implements feature request #3566345 (http://bit.ly/OvbBPp). ++ Bug fixes: + - #3561713 (http://bit.ly/QEYRFx): The Category view in the Overview pane sometimes appears fully expanded when it is expected to be fully collapsed. + - #3566430 (http://bit.ly/U1KnGZ): About Box Paths Page displays wrongly when themes not available. ++ Updated documentation re changes. ++ Updated help file re changes. + + +## Release v3.10.5 of 21 August 2012 + ++ Fixed bugs: + - #3559257 (http://bit.ly/Qc8Fqu): Compile Results accessed from menu can get out of sync. + - #3559156 (http://bit.ly/TKXYQ7): "Previews" disappearing in Preferences dialogue box + + +## Release v3.10.4 of 16 August 2012 + ++ Added support for displaying pop-up menus over appropriate control when Alt+F10 is pressed. Fixes bug #3556713 (http://bit.ly/RIzfvQ). ++ Changes to snippets editor: + - Added missing edit context menu to "add unit" edit control on References tab. Fixes bug #3556718 (http://bit.ly/RVanCE) as it relates to v3. + - Predefined list of units in Units list on References tab now includes the "Types" unit. + - Referenced unit names may now contain dots. + - Snippets Editor help topic now explains need to configure Delphi XE2 compiler to search namespaces containing referenced units. This provides a solution to bug #3536531 (http://bit.ly/Q2bcmY). + + +## Release v3.10.3 of 25 July 2012 + ++ Changed so that Delphi compilers can be detected by examining current user registry key in addition to local machine registry key. This enables Delphis that were installed for a given user only to be detected. ++ Fixed bug in Compiler tab of Configure Compilers dialogue box that failed to flag selected compiler as unavailable after button was pressed. + + +## Release v3.10.2 of 19 June 2012 + ++ Fixed bug #3536331 (http://bit.ly/KQVATf) where some distinct words in a snippet's Extra text where not being found in text searches. ++ Info about user's OS and IE version is now sent to web server during online database updates. ++ Updated privacy statement re changes in information sent by update web service. + + +## Release v3.10.1 of 20 April 2012 + ++ Fixed bug #3519784 (http://bit.ly/IsCsun) where multi-line type or constant snippets that start on same line as type or const keyword were corrupted when included in units using the "comments after snippet header" comment style. ++ Also fixed potential source of a bug in code that edits user-defined categories. + + +## Release v3.10.0 of 17 April 2012 + ++ Added new Help | On The Web | FAQs menu option to display CodeSnip FAQs in default browser. ++ Fixed unreported minor bug in dialogue boxes that display tabbed page controls: clicking a tab did not always give it the keyboard focus. ++ Characters used to introduced switches on command line were changed: '/' replaces non-standard '\'. '-' is still permitted. ++ Updated help file: added topic for new menu option and minor change to FAQ help topic. + + +## Release v3.9.3 of 23 November 2011 + +**Note:** Development of CodeSnip 4 branched off this release. + ++ Fixed some bugs in main window: + - Toolbar was truncated when window is too narrow to display it all. It now wraps. + - Treeview state in Overview pane was not restoring correctly after navigating away from and then returning to a tab. + - Pressing Ctrl+Tab or Shift+Ctrl+Tab did not necessarily change the tab in the expected tab set in either the Overview or Detail panes. ++ Fixed a broken URL in about box. ++ Bumped installer program helper build number re Delphi 2010 compilation (should have been done at v3.5.1). + + +## Release v3.9.2 of 28 October 2011 + ++ Fixed bug #3427741 (http://bit.ly/vq2fAz) where details pane tabs didn't change in response to key presses. ++ Fixed bug #3427866 (http://bit.ly/w31z8L) where selection in overview was not always same as item displayed in details pane. ++ Fixed bug #3427889 (http://bit.ly/tijnmF) where there was the possibility of a GPF in overview pane. + + +## Release v3.9.1 of 18 September 2011 + ++ Fixed bug #3369422 (http://bit.ly/omSp6F) in Pascal highlighter that was causing an assertion failure when parsing malformed Pascal general format floating point numbers. + + +## Release v3.9.0 of 07 September 2011 + ++ Added support for Delphi XE2 Windows 32 bit compiler: + - Can now test compile and display results with Delphi XE2 32 bit. + - Delphi XE2 compiler version 23.0 has been added to the drop down menu in the Code Generation tab of the preference dialogue box. + - Updated help file re Delphi XE2 support. + - Updated documentation. ++ Limited user name edit control to 48 chars in registration wizard because this is limit in online registration database. + + +## Release v3.8.11 of 02 July 2011 + ++ Fixed display problem in about box and compiler error dialogue boxes on systems using Internet Explorer v9 web browser control. This fixes issue #3349186 (http://bit.ly/lF6bTO). ++ Updated read-me file re support for IE9 browser control. + + +## Release v3.8.10 of 20 May 2011 + ++ Reverted checked tree views and list boxes to standard Windows behaviour. Clicking item text no longer toggles associated check boxes. This behaviour was more problematic then helpful. ++ Updated documentation, including new info about CodeSnip FAQ. ++ Added FAQs topic and TOC entry to help file that links to online FAQ. + + +## Release v3.8.9 of 10 May 2011 + ++ Fixed bug #3299870 (http://bit.ly/iX8Its) that was allowing imported snippets with duplicate names to be renamed with invalid names. ++ Improved UI used to edit imported snippet names. ++ Any "warning" compile results in main database are now treated and displayed as "success" results per feature request #3290359 (http://bit.ly/mshbRa). ++ Fixed unreported potential bug in code that sets window class names. ++ Updated documentation. + + +## Release v3.8.8 of 19 January 2011 + ++ Added facility for user to specify maximum age of news items displayed in news dialogue box. New preferences tab added where the maximum age can be customised. ++ Preferences dialogue box now displays multi-line tabs when necessary. ++ Refactored some code used to align controls on forms. ++ Updated license. License HTML help file is no longer MPLd and may not be altered by third parties. ++ Updated help file re changes. ++ Updated documentation. + + +## Release v3.8.7 of 16 December 2010 + ++ Delphi XE compiler version 22.0 has been added to the drop down menu in the Code Generation tab of the preference dialogue box. ++ Bug fix: compiler results are no longer listed when free-form snippets are printed or copied to the clipboard using the "Edit | Copy Information" menu item. + + +## Release v3.8.6 of 06 December 2010 + ++ Bug fix release (none reported in bug tracker): + - Corrected XML file validation so that it does not reject XML processing instructions that contain an "encoding" attribute. + - Fixed long standing bug that was crashing CodeSnip when the database was updated or restored after editing, adding or deleting any user defined snippet. + - Attempting to restore a database backup with an unknown (later) file format now raises an exception. Previously CodeSnip tried, unsuccessfully, to read the file. + + +## Release v3.8.5 of 28 November 2010 + ++ Fixed bug where user was able to create snippets with valid names that would crash the alphabetic overview. Snippet names are now limited to letters from English alphabet and the underscore. Fixes bug #3120958 (http://bit.ly/fDAswL). ++ Fixed bug where snippets that have names beginning with a lower case letter were being omitted from from the associated list of snippets shown in the detail pane. Fixes bug #3120962 (http://bit.ly/eGhQvc). ++ Updated Snippets Editor topic in help file. + + +## Release v3.8.4 of 26 November 2010 + ++ User can now opt to terminate the application when an unexpected exception is trapped. This implements feature request #3074914 (http://bit.ly/hUyEAw). ++ Wording of bug report dialogue boxes changed. ++ Snippets selection dialogue box now displays wait cursor while waiting for it to be displayed. ++ Some corrections and clarifications made to comments that appear in generated "include" files. ++ Custom message boxes can now display custom title and icon. ++ Imported some updates from "new-backend" development tree: + - Some source code re-organisation and renaming. + - Updated some sorted list management code. + + +## Release v3.8.3 of 24 November 2010 + ++ Added button to "Compile" tab of Snippets Editor to display unit used to test compile snippets. This implements feature request #3108008 (http://bit.ly/elBZnn). ++ Fixed unreported bugs in handling of exceptions raised in threads. ++ Simplified method used to load database on start up. No longer uses a separate thread. ++ Overhauled and simplified code used to display "wait" dialogues during test compilations and database reloading. ++ Refactorings: + - Increased use of generics in lists and enumerators. + - Reorganised source code tree by moving some code to more relevant units, renaming some units and increasing use of namespaces. + - Removed some redundant code. ++ Updated help file re changes to snippets editor. + + +## Release v3.8.2 of 16 November 2010 + ++ The position of the caret in the Snippets Editor's Extra Information control is now displayed. Implements feature request #3105288 (http://bit.ly/bRV86Z). ++ Code that displays caret positions was refactored and improved. ++ Display of errors in the Snippets Editor's text edit controls has been improved in most cases either by positioning the caret near the error or selecting the erroneous text. This implements feature request #3107042 (http://bit.ly/cKx5YQ). ++ Made significant changes to code that parses REML mark-up: + - Rationalised error reporting and added support for reporting the position of errors. + - Fixed unreported bug that produced wrong error message when empty tags are encountered. + - Fixed bug #3107982 (http://bit.ly/cp9Cff) that failed to report some unclosed tags as errors. + - Refactored and reorganised much of the code. ++ All encoding and decoding of URIs is now RFC 3986 compliant. ++ Refactored character detection and string encoding support code. ++ Renamed some units and classes. ++ Updated documentation. + + +## Release v3.8.1 of 08 November 2010 + ++ Fixed bug #3015589 (http://bit.ly/cdPedH) where some user syntax highlighter settings were being ignored in main display. ++ Changed Test Unit view dialogue box to use user syntax highlighter settings. ++ Revised credits in About Box program tab. ++ Updated third party units: PJMD5 to v0.3, PJSysInfo to v3.3, PJVersionInfo to v3.3. ++ Modified version info code to use new features of new PJVersionInfo 3rd party unit. ++ Refactored code that parses XHTML-style code. ++ Updated compiler warnings used in project and made command line and IDE options the same. ++ Updated documentation. + + +## Release v3.8.0 of 23 October 2010 + ++ Added support for Delphi XE to program. Can now test compile and display results with Delphi XE. ++ Updated help file re Delphi XE support. ++ Some refactoring. ++ Standardised bug-trap and assertion failure exception messages. + + +## Release v3.7.0 of 23 September 2010 + ++ Added new "Help | CodeSnip News" menu option that displays latest news about CodeSnip and the online database in a dialogue box. The news comes from the CodeSnip RSS news feed. ++ Removed news pane from "Update from Web" dialogue box and replaced with button that displays new "CodeSnip News" dialogue box. ++ Removed mailing list subscription facility: + - Removed subscription dialogue box and associated menu option. + - Removed code that accessed mailing list web service. + - Removed subscription option from program registration dialogue box. ++ Fixed a memory leak. ++ Added code that downloads XML document and reads and parses RSS feeds. ++ Refactored and improved HTTP request handling code. ++ Some further refactoring. ++ Updated help file re changes in this release. ++ Updated privacy statement. + + +## Release v3.6.3 of 22 July 2010 + ++ Completely overhauled code that interacts with web services. + - Character encodings are now correctly handled per information in HTTP header and several different encodings are supported. + - MD5 checksums in HTTP headers are now supported. ++ Updated and corrected the contents of the About Box's "About The Program" Tab. ++ Some refactorings, mainly to code that uses MD5 message digests. ++ Attempts to compile source with Delphi 2009 and earlier are now prevented. ++ Updated documentation. + + +## Release v3.6.2 of 18 June 2010 + ++ Fixed source code formatting problem in code generator where "forward" declarations were sometimes preceded with an unwanted blank line. ++ Fixed potential bug in code that parses mark-up used for a snippet's Extra information. Symbolic entities were not case sensitive. ++ Fixed a memory leak. ++ Some refactorings that increase use of generics and some others. ++ Read-me file updated re v3.6.1 password changes. + + +## Release v3.6.1 of 01 June 2010 + ++ Proxy server passwords can now contain any Unicode character, not just those included in the Windows-1252 code page. ++ Password format in per user ini file changed. Existing passwords have to be re-entered. Ini file format updated to v7. ++ Installer updated: + - It deletes any passwords from v6 and earlier per user ini files. + - Per-user ini file now stamped as v7. ++ Some potential Unicode-ANSI string conversion problems fixed. ++ Updated documentation. + + +## Release v3.6.0 of 26 May 2010 + ++ Added support for emitting compiler directives to switch off specified warnings. This implement feature request #2994485 (see http://bit.ly/cxDJG4). ++ Preferences dialogue box updated: + - New "Code Generation" tab used to configure which if any warnings are to be inhibited. + - Renamed "Source Code" tab to "Code Formatting". ++ Added new tab to About Box that displays and enables exploration of some key directories used by CodeSnip. ++ Snippets editor now displays row and column occupied by text cursor. ++ Per user ini file format changed. It now supports code generation preferences. Ini file version updated to v6. ++ Installer updated: + - Ini files are stamped with correct program and ini file version information. + - Older versions (v1..v5) of per-user ini file are updated with default code generation preferences. + - Per-user ini file now stamped as v6. ++ Fixed numerous memory leaks. ++ Fixed some other potential and unreported minor bugs. ++ Some refactoring. ++ Updated help file re changes. + + +## Release v3.5.5 of 24 March 2010 + ++ Fixes download stream read bug #2976048 (see http://bit.ly/ds6mBr). + + +## Release v3.5.4 of 18 March 2010 + ++ Temporary fix for download error checking bug #2970055 (see http://bit.ly/cvf9Mm). ++ Fixed https protocol bug #2970896 (see http://bit.ly/bCIx38). + + +## Release v3.5.3 of 08 March 2010 + ++ Fixed database download error checking bug #2964767 (see http://bit.ly/90vFfp). ++ Updated PayPal donations narrative on welcome page. + + +## Release v3.5.2 of 22 February 2010 + ++ Changed database downloader to: + - Use web service's revised download file format + - Validate download data before updating local database. + - Provide better download error messages. ++ Fixed bug #2947794 in view link dialogue box (see http://bit.ly/beiZZ8). ++ Refactored some exception handling code. + + +## Release v3.5.1 of 09 February 2010 + ++ New Unicode build of the program compiled with Delphi 2010. File I/O remains ANSI. ++ Windows NT is no longer supported. Windows 2000 is now the minimum OS. Set-up program changed to enforce this. ++ More rigorous enforcement of rules for REML tag attributes used in a snippet's Extra information. ++ Fixed a couple of minor UI problems in the Proxy Server and Trapped Bug Report dialogue boxes. ++ Minor changes to HTML and embedded browser code. ++ Some refactoring. ++ Updated documentation. + + +## Release v3.5.0 of 16 January 2010 + ++ Overview pane can now be configured using Preferences dialogue box to start up with all sections collapsed. ++ Reference to ability to donate by credit / debit card removed from Donate dialogue box: now PayPal only. ++ Help file updated re above changes. ++ Minor refactoring of code that provides information about and renders source code comments. + + +## Release v3.4.8 of 10 January 2010 + ++ Made some changes to key presses responded to by overview pane and fixed bug where Alt+F4 was not closing program when pane had focus. ++ Made some changes to hints displayed when rolling over links in compiler check pane. Also removed pop-up windows describing compiler errors. ++ Updated help file: noted Delphi 2010 compiler support and added new information about overview pane keyboard short-cuts. + + +## Release v3.4.7 of 31 December 2009 + ++ Added IE version number to OS information submitted when program is registered. ++ Program now displays "[localhost]" in main window caption when started with -localhost switch. ++ All text edit controls in snippets editor now have custom pop-up menus and short-cuts for "cut", "copy", "paste", "select all" and "undo" now work. ++ Refactored code that supports use of fonts. ++ Updated privacy statement re registration changes. + + +## Release v3.4.6 of 18 November 2009 + ++ Changed code that takes a security backup of main database during updates to store backup in a single file rather as separate files in a temporary folder. This should fix bug #2898687 (see http://bit.ly/bKg6oH). ++ Slightly modified user database backup file format to match that now used for main database backup. ++ Fixed potential bugs: + - Code that performs busy waits could have caused program to freeze. + - Negative numbers written to backup files were not being written correctly. + - A garbled error message was corrected. + + +## Release v3.4.5 of 09 November 2009 + ++ Home, Ctrl+Home, End and Ctrl+End keys now work in overview pane and go to first and last item in tree view respectively per feature request #2888880 - see http://bit.ly/bgJCVU). ++ State of tree view in overview pane is now maintained after editing the user database: the tree is no longer always fully expanded after each edit. ++ Removed "Properties" button from print dialogue box along with associated dialogue boxes. This option has always been buggy. This "fixes" bug #2868706 (see http://bit.ly/9LArqI). ++ Fixed unreported makefile bug. + + +## Release v3.4.4 of 21 October 2009 + ++ Changed bug reporting mechanism. Bugs are now reported via the on-line bug tracker. Bug report dialogues changed accordingly. Access to the old bug report web service was removed. ++ Added two new default syntax highlighter styles: "Visual Studio" and "No Highlighter". The latter switches off syntax highlighting. ++ Fixed bug no. 2882331 (see http://bit.ly/beArcC). This was a bug in the syntax highlighter that occurred when an unexpected character was encountered. ++ Updated help file re changes. ++ Some minor source code corrections. + + +## Release v3.4.3 of 19 October 2009 + ++ User's OS is now reported and recorded when program is registered. ++ Text displayed in preview dialogue boxes can now be scrolled horizontally. ++ Added support for building source against later releases of Indy 10 components. ++ Help file and privacy statement updated. ++ Further updated third party GIF image handling code to latest release. ++ Some changes to source code project options. + + +## Release v3.4.2 of 10 October 2009 + ++ Fixed bugs #2868706 (see http://bit.ly/9LArqI) and #2875857 (see http://bit.ly/bN4xqE) ++ Updated GIF image handling code. + + +## Release v3.4.1 of 29 September 2009 + ++ All dialogue boxes that request a user's name and / or email address now remember the information last entered, to save retyping the same data. ++ Changed to use Indy Internet Components v10 instead of v9 for net access. ++ Refactored: + - Code that stores information about a user. + - Code that gets details of system folders on local system and other file system related code. ++ Updated privacy statement (text file and in help file). + + +## Release v3.4 of 24 September 2009 + ++ Added support for Delphi 2010 to program. Can now test compile and display results with Delphi 2010. ++ Bug fixes: + - "Invalid cast" error that occasionally appears when a snippet is updated. + - Bug that kept backup files locked open after restoring a database backup. + - Current selection is now displayed in Alphabetic and Snippet Kind tabs of overview pane: previously all the database was shown, regardless of search. + + +## Release v3.3 of 21 September 2009 + ++ Added support for user defined categories which can now be added, renamed or deleted. ++ Made changes to snippets editor: + - On the "Compile Results" Tab, a single simplified list box is now used to both display and change compile results. This replaces two linked controls. + - The text case of a snippet name can now be changed without causing a duplicate name error. + - Some controls resized. ++ Fixed bug where attempting to overwrite files that are in use caused the bug report dialogue box to appear instead of simply reporting the problem. ++ Improved validity checking of snippets that are included in generated source code. ++ Help file updated. ++ Refactored: + - UI handling code in snippets editor. + - Some Snippets database and validation code. + + +## Release v3.2.3 of 14 September 2009 + ++ Fixed bug in "update from web" dialogue box where most up to date news item was not being displayed. ++ Dialogue boxes that that enable selection of categories and snippets by means of tree views and associated check boxes now sort categories by description. ++ Categories and snippet kinds displayed in the snippets editor are now sorted by description. ++ Refactored: + - Code that displays tree views in overview pane and snippet selection dialogues. + - Some list management code. + - Some snippets editor code. + + +## Release v3.2.2 of 08 September 2009 + ++ Fixed bug in check list boxes where moving selection using keyboard causes check state to be toggled. ++ Custom colours used in colour dialogue, on syntax highlighter page of preferences dialogue box, are now persistent. ++ Re-implemented code that displays pop-up menus in detail pane, and fixed a minor glitch as a side effect. ++ Simplified code that manages help system. ++ Refactored code that manages and customises common dialogues. + + +## Release v3.2.1 of 24 August 2009 + ++ Appearance of comments that appear at the top of generated source code was changed. ++ Slightly modified "license" that appears at the top of some generated units. ++ Information about contributor of imported code is now appended to snippet's "extra" information. ++ Added a garbage collector. ++ Changed size of About box - now wider and credits scroll boxes are now taller. Added credit for encryption code. ++ Fixed minor bug that could display a JavaScript error dialogue if an exception occurred in an action initiated by clicking a link in the main display. ++ Numerous refactorings. + + +## Release v3.2 of 17 August 2009 + ++ Added facility for CodeSnip to use a proxy server when accessing the Internet. ++ Provided a new dialogue box to configure any proxy server. ++ Updated help file re proxy server support and configuration. ++ UI is no longer frozen while web services are executing requests. "Update from Web" dialogue box changed to indicate if cancel button pressed when a web request is executing. ++ Product version reported in generated source code header comments, splash screen and about box now includes any special build information. ++ Some minor code tweaks and refactoring. + + +## Release v3.1.1 of 15 August 2009 + ++ Check list boxes throughout program changed so that clicking anywhere on an item toggles check state. ++ Button used to render and display extra information in snippets editor is now disabled when there is no extra information to display. ++ Made minor changes to layout of some dialogue boxes: replaced missing text in bug report dialogue box. ++ Some refactorings. + + +## Release v3.1 of 11 August 2009 + ++ Added a button to the snippets editor to preview an HTML rendering of the mark-up entered as extra information. Includes facility to check any links in the mark-up. + + +## Release v3.0.5 of 21 July 2009 + ++ Default font is now dependent on underlying OS: Vista - Segoe UI, XP/2000 - Tahoma, NT - MS Sans Serif. ++ Some dialogues and splash screen modified to accommodate OS font, in particular larger Vista font. Some also given a light makeover. + + +## Release v3.0.4 of 13 July 2009 + ++ Added a snippet's category description to main display and to snippet information copied to clipboard or printed. Category description in main display can be clicked to display the category. ++ Refactored code that displays clicked routines and code that displays a snippet for editing. + + +## Unreleased v3.0.3 of 12 July 2009 + ++ Refactored code: + - Rationalised some JavaScript code. + - Rationalised some dialogue alignment code. + - Changed some object types and class hierarchies. + - Added some automatic object lifetime management logic. + - Removed some duplicate code and merged some units. ++ Fixed an obscure bug in category code snippet generation as a side effect of refactoring. + + +## Release v3.0.2 of 08 July 2009 + ++ Fixed broken link to CodeSnip database in welcome page. ++ Fixed bug in selection search that was selecting both user defined and main database snippets with same name if only one was selected. ++ Fixed bug where units required by constants and type definitions were not being added to generated units. + + +## Release v3.0.1 of 06 July 2009 + ++ Added support for file:// protocol in links in a snippet's extra information. ++ Updated help file re changes to extra info. ++ Updated exported code and user database file formats to v4 to accommodate revised extra information, although we now save data in v3 format if possible. + + +## Release v3.0 of 29 June 2009 + ++ Added support for constants and type definition snippets: there are now four types of snippets - routines, constants, types and free-form (which don't conform to any format). Free-form snippets cannot be included in generated units. ++ Further formatting instructions added to the active text used in database's Extra information field. Also added a contributors field to database. ++ Three predefined syntax highlighters are now provided, with default changing to Delphi 2006 default style. Syntax highlighting used in main display is now customisable. Highlighter keyword list updated. ++ Main display changed: + - Test unit is no longer displayed in compiler check pane: it's now displayed in a dialogue box. + - Compiler check pane's font changed to true type, with face depending on OS. + - Information pane now hides compiler table when a free-form snippet is displayed. + - Compiler check pane now displays special "not available" pages when no compilers installed or a free-form snippet or a section header is selected. + - "Uncategorised" tab removed from overview pane and replaced with new "Alphabetical" tab that groups snippets by initial letter and "Snippet Kind" tab that groups snippets by kind. + - "Section" nodes in overview pane can now be expanded and collapsed: pane now has toolbar to perform these actions. + - "Edit snippet" links displayed in information pane are now also displayed in compiler check pane. + - Information about snippet type added to information pane. + - Context menu added to overview pane. + - Some changes to menu glyphs and short-cut keys. + - Welcome display modified and now has a link to the donate dialogue box. ++ Added option to copy an snippet's source code to clipboard in text and RTF formats. ++ Exporting and copying of snippets complete with descriptions and cross references is restricted to routines: not supported for free-form, types and constants. ++ Improved detection of invalid dependencies in snippets, including circular dependencies, and provided option to view all dependencies for any snippet from main window and snippets editor. ++ Revised content of many dialogue boxes etc to refer to "snippets" instead of "routines" where necessary. ++ Changed format and location of user-defined database and format of exported and submitted files. ++ Added new "Imported Snippets" category that receives imported routines: they were formerly imported into the "User Defined" category ++ Modified code that reads main database to deal with revised file format for new snippets types and introduction of pre-processor instructions to enable retrofitting of new snippets without breaking earlier versions of CodeSnip. ++ Changed name and location of user preference configuration file. ++ Revised external object that communicates with JavaScript in browser controls. ++ Updated program credits in about box, restyled and widened it. ++ Changed size of preferences dialogue box and revised syntax highlighter tab. ++ Changed captions in preview dialogue box. ++ Changed appearance of splash screen. ++ Modified snippets editor to work with new snippet types, improved error checking code and prevented test compilation of free-form snippets. ++ Speeded up loading of main database. ++ Added an Easter egg! ++ A few refactorings. ++ Fixed several bugs: + - Bug in backup files including database files larger than 32Kb was fixed. + - Bug in history list following editing user defined snippets fixed by clearing list after snippets have been edited. + - Imported user defined routines no longer forget any dependencies on main database snippets. + - Occasional bug in displaying test unit fixed by displaying test unit in dialogue box instead of main display. ++ Modified installer re new folder structure and copying over data from previous versions. ++ Revised help file to reflect changes. Added new main contents "chapter" about the various snippet types. + + +## Unreleased v2.4.1 of 13 May 2009 + ++ Refactored code that provides information about the program and web URLs and services it accesses. ++ Changed URL accessed by donations dialogue box. + + +## Release v2.4 of 11 May 2009 + ++ Added donate menu option and dialogue that accesses a PayPal donation web page. ++ Removed support for the Windows 9x platform since CodeSnip now generates fatal errors on that platform: + - Removed Windows 9x specific code. + - Changed installer to prevent installation on Windows 9x. ++ Updated help file re changes. + + +## Release v2.3.7 of 26 April 2009 + ++ Made user name and email address entered in Code Submission Wizard persistent on a per-user basis. ++ Updated Code Submission Wizard and Privacy Statement help topics re the changes. + + +## Unreleased v2.3.6 of 26 January 2009 + ++ Changed method that is used to get locale information to be compatible with Vista as well as earlier OSs. + + +## Release v2.3.5 of 25 January 2009 + ++ Changed method used to generate HTML displayed in main program window to avoid dynamic updating of documents in attempt to counter a reported JavaScript bug. ++ Refactored generation of HTML tags in all parts of program that use HTML in display. ++ Corrected method naming error. + + +## Unreleased v2.3.4 of 16 January 2009 + ++ Copy Source Code menu item now places a copy of selected snippet on clipboard in syntax highlighted rich text in addition to plain text. ++ Updated help file accordingly. + + +## Unreleased v2.3.3 of 14 January 2009 + ++ Browser controls and snippets tree-views are now selected when containing frame is entered. ++ Discrepancy in way highlighting works in snippets tree-views fixed. ++ "&" characters are now rendered correctly in TMessageBox dialogues. ++ Code that executes compilers now uses one thread instead of two. ++ Refactorings: + - Some constants relocated. + - Rationalised some routine and method calls. + - Replaced some control character literals with constants. + - Updated IntfUIHandlers unit with IE6/7 related constants. + + +## Unreleased v2.3.2 of 10 January 2009 + ++ Revised compilers object. Singleton instance removed. Local instances of object are created where needed. ++ Added new method to compiler objects to detect errors and warnings ++ Fixed incorrect caption in compiler error dialogue. ++ Added new object that manages test compilations, compiler set-up and viewing compile errors. Used by main form and snippets editor. ++ Added "View Compile Errors" menu option to Database menu. ++ Added Alt+V hot key to view compile errors in Snippets editor. ++ Updated help file for database menu to add "View Compile Errors" and missing entries for Submission, import and export of user database. + + +## Unreleased v2.3.1 of 06 January 2009 + ++ Fixed test compilation bug in snippets editor that could corrupt compiler errors or warnings displayed from main display. ++ Added support for tab switching in compiler errors dialogue box using Ctrl+Tab and Shift+Ctrl+Tab. + + +## Release v2.3 of 05 January 2009 + ++ Changed name of Copy Snippet menu item to Copy Source Code. ++ Added new Copy Information menu item to Copy menu - copies all snippet information to clipboard in text and RTF. ++ Added Save Database button to toolbar. ++ Changed status bar to display a count of user defined routines and an indicator that shows when user database has been modified. ++ Refactored and extended clipboard management code. ++ Added new buttons to selection search dialogue box to select user defined or main database routines. ++ Added facility to test compile routines to user defined snippets editor dialogue box. ++ Modified compiler errors dialogue box to be able to display results of compilation with more than one compiler. ++ Updated help file re changes. + + +## Release v2.2.5 of 31 December 2008 + ++ Replaced routine's credits and comments properties with new Extra information property that can store formatted text. ++ Added parser for mark-up language used by new Extra property. ++ Modified snippets edit dialogue box to use new Extra property. ++ Changed main database, user database and export file format to support new Extra property. User database and export files generated by this version can't be read by earlier versions of the program. ++ Modified and refactored print document generation code to use new Extra property. ++ Refactored some HTML generation code. ++ Fixed a bug that occasionally causes a GPF when updating a user defined routine. ++ Removed redundant topic from help file. + + +## Release v2.2.4 of 19 December 2008 + ++ Fixed bug in text and RTF preview dialogue boxes that was setting margins incorrectly and clipping displayed text. + + +## Unreleased v2.2.3 of 17 December 2008 + ++ Refactored code that handles XML files (user database and import / export). Pulled out common code and further extended XML document object. + + +## Unreleased v2.2.2 of 16 December 2008 + ++ Added glyphs to printers in print dialogue box. ++ Various refactorings of print and highlighting related code. ++ Printing now uses user-defined highlighters. Current highlighting is now previewed in print preferences. ++ Bug fixes: + - Help button now displays in page set-up dialogue on Vista. + - Page set-up dialogue now makes use of custom margin settings. + + +## Unreleased v2.2.1 of 16 December 2008 + ++ Several refactorings: + - Rationalised email validation code. + - Rationalised exceptions raised when validating entry into dialogue box. + - Rationalised code that momentarily pauses execution of a thread. + - Made wide use of extended TRect structure. + - Changed various loops to use enumerators. + - Removed some unused code. ++ Fixed minor bug in open and save dialogues that occasionally failed to detect existence of a file. + + +## Unreleased v2.2 of 15 December 2008 + ++ Added facility to submit user defined snippets via Internet for inclusion in main database. ++ Added facility to export user defined routines to file and to import exported files. ++ Made minor changes to wizard dialogue boxes. ++ Rewrote message dialogue box code. ++ Made minor changes to open and save dialogue boxes. ++ Updated help file for the new code import, export and submission features. + + +## Release v2.1 of 11 October 2008 + ++ Added support for Delphi 2009 Win 32 personality. ++ Added a button to set all compiler results to success to snippets edit dialogue box. ++ Refactored some code. ++ Updated help file re Delphi 2009 support. + + +## Unreleased v2.0.7 of 05 October 2008 + ++ Fixed residual bug in alt key bug work-around (CodeGear Quality Central bug report #374030). The bug was manifesting itself only for the first dialogue box displayed after the program started. + + +## Unreleased v2.0.6 of 05 October 2008 + ++ Refactoring: + - Added class methods to instantiate and use various classes that have only one public method to save caller having to create, execute and destroy object. Public constructors of these classes were changed to cause assertion failure if directly called. + - Made static classes derive from new base class that causes assertion failure if constructor called. + - Combined some action update handlers in main form. + - Updated assertions and raising of EBug exceptions to programatically get name of class triggering error. + - Made some class' protected and private sections strict. + + +## Unreleased v2.0.5 of 03 October 2008 + ++ Refactoring: changed custom save source dialogue to descend from extended save dialogue box. + + +## Release v2.0.4 of 21 September 2008 + ++ Improved speed of looking up routines in database. ++ Prevented any user defined routine from referencing itself. ++ User defined routines now always reference routines from user database in preference to main database when there is a name conflict. + + +## Unreleased v2.0.3 of 20 September 2008 + ++ Fixed bug that caused an assertion failure when an attempt was made to display the Select Routines dialogue box when an empty category was present in database. + + +## Unreleased v2.0.2 of 19 September 2008 + ++ Now gives option to save changed user defined database before updated main database. ++ When a routine is updated or deleted references to it in other routines are updated or removed. ++ Corrected reference in installer to menu item used to update database (this changed from v2). + + +## Release v2.0.1 of 18 September 2008 + ++ Fixed bug that fails to load user database and deletes it if a category is added to main database during on-line update. ++ Fixed bug that ignores any user defined snippets that have same name as snippets in main database. ++ Ensured main form is disabled when database is loading. ++ Ensured splash form is hidden if an exception occurs while splash form is displayed. + + +## Release v2.0 of 15 September 2008 + ++ Added support for user defined snippets: + - User database can be edited, saved, backed-up and restored. + - User database can reference code in main database. + - Names of user defined snippets are coloured blue to distinguish them from main database. + - User database is stored as a mix of XML and source files in a sub-folder of the per-user application data folder. + - Queries can now be refreshed when content of user database changes. ++ Modified extended external object that communicates between browser controls and application. ++ Main database engine heavily modified. ++ Greater use of DHTML to manipulate main display. ++ Made browser pop-up menu display glyphs for items menu items that replicate links in browser control. ++ Modified welcome page to appear differently depending on state of main and user defined databases. ++ Disclaimers, copyright and other headers of saved, printed and copied documents changed. ++ Commenting of exported code changed slightly to allow for user snippets that may not support all commenting styles. ++ Fixed status bar display bug. ++ Category headers in overview pane are now in bold. ++ Added enumerators to several list objects to support for..in construct. ++ Tweaked exception handling. ++ Added support for converting GIF resources into bitmaps for use in image lists. ++ Changed URL used to access program's home page. ++ Updated help file to reflect changes. ++ Added credits for use of Anders Melander's GIFImage unit to about box. + + +## Release v1.9.4 of 01 September 2008 + ++ Improved handling of errors encountered when running compilers. ++ Provided checks for invalid compiler executable files in Config Compilers dialogue box. ++ Added enumerator to Compilers object. ++ Made ECodeSnip exceptions and descendants clonable when copying between threads. + + +## Unreleased v1.9.3 of 24 August 2008 + ++ Fixed bug in the database updater which could cause a deleted local file not to be noticed and not replaced. + + +## Unreleased v1.9.2 of 24 August 2008 + ++ Changed method used to generate program key. No longer uses MAC Address, since code to find this fails on Windows Vista. ++ Refactored to remove knowledge of how contributor information and database are stored from TAppInfo class. ++ Revised code that manages contributors so that storage details are private to the classes. + + +## Unreleased v1.9.1 of 24 August 2008 + ++ Rebuilt CodeSnip and install helper program with Delphi 2006: ++ Modified CodeSnip source to compile without warnings. ++ Replaced deprecated library calls with alternatives. + + +## Release v1.9 of 14 August 2008 + ++ Changed so that all user accounts use the same database rather than having their own copy. Database now stored in common application data folder, along with registration information. Per-user configuration information remains in per-user application data folder in renamed file. ++ Installer can now optionally preserve data stored in database and configuration file used by earlier versions of the program. This involves creating new configuration files and moving the database. ++ Updated help file re these changes. + + +## Unreleased v1.8.11 of 11 August 2008 + ++ Removed duplicate compiler glyph resources and modified compiler handling code accordingly. + + +## Unreleased v1.8.10 of 11 August 2008 + ++ Refactored various units to use extended theme support. ++ Fixed redraw bug in tree views that use check boxes: check boxes were redrawing in wrong state when themes changed. ++ Improved support for theme changes. Theme manager now gets notified of changes directly from Windows. ++ Suppressed unnecessary compiler warnings. + + +## Unreleased v1.8.9 of 10 August 2008 + ++ Modified Select Compiler dialogue box (opened from Configure Compiler dialogue) and Choose Element Colour dialogue (opened from Preferences dialogue) to be aligned correctly over dialogues, work correctly with Vista task bar and support help keywords. ++ Select Compiler file open dialogue now defaults to display any current compiler executable. ++ Choose Element Colour dialogue box now uses UK English and has custom title. ++ Added help topics for Select Compiler and Choose Element Colour dialogues. + + +## Release v1.8.8 of 16 June 2008 + ++ Changed to make application minimisation, task bar preview window, and appearance in "Flip 3D" task switching display correctly on Windows Vista. ++ Provided work-around for Delphi's Alt key bug on XP and Vista (CodeGear Quality Central bug report #374030). + + +## Unreleased v1.8.7 of 05 June 2008 + ++ Made selected tabs in information and detail pane persistent. ++ Fixed bug in build script. + + +## Unreleased v1.8.6 of 02 June 2008 + ++ Fixed lock-up that could occur when displaying wait dialogue box while background tasks execute. Previous attempt to fix this problem failed. ++ Changed "marquee" that is displayed in wait dialogue box to appear correctly on Vista. + + +## Release v1.8.5 of 30 May 2008 + ++ Fixed bug that was causing Save Snippet and Save Unit dialogue boxes to ignore file type + selected by user, always outputting default file type. ++ Deleted some unused source code. ++ Removed option to install a desktop icon from installer. Also refactored install script to conform to current Inno Setup standards. + + +## Release v1.8.4 of 22 April 2008 + ++ Added manifest resource to ensure compatibility with Windows Vista and to use Vista themes. ++ Fixed border problem in web update dialogue box and about box when displayed under Vista / IE7 browser control. ++ Prevented selection of text in previews displayed in preferences dialogue box. ++ Updated set-up script to use macros. ++ Modified Build batch file to work with Windows SDK 2008. + + +## Unreleased v1.8.3 of 05 November 2007 + ++ Refactored dynamic CSS generation code. + + +## Unreleased v1.8.2 of 04 November 2007 + ++ Refactored assignable interfaced objects. + + +## Release v1.8.1 of 04 November 2007 + ++ Made changes to browser control and URL handling. + + +## Unreleased v1.8 of 04 November 2007 + ++ Added pop-up context menus to main display's detail pane. + + +## Unreleased v1.7.7 of 29 October 2007 + ++ Modified code of compiler wait dialogue box and splash screen to try to prevent bug that occasionally prevent the dialogue from closing, locking up application. + + +## Unreleased v1.7.6 of 18 October 2007 + ++ Shift-clicking links in the main display and some dialogue boxes was starting Internet Explorer. Fixed so that Internet Explorer is no longer started and shift-clicking external links now starts default browser. + + +## Unreleased v1.7.5 of 17 October 2007 + ++ Modified Preferences dialogue box: + - Refactored code that displays measurement units. + - Preview on Source Code tab now takes on appearance of source code highlighter defined on Syntax Highlighter tab. ++ Changed format of ini file that stores persistent settings so that source code highlighter preferences are now stored in Prefs section of ini file rather than own section. ++ Customised installer to update existing ini files to revised version. + + +## Release v1.7.4 of 14 October 2007 + ++ Fixed display bug when selecting routines following a text search. ++ Improved text search algorithm to permit search strings containing punctuation characters. ++ Fixed typo in the "About The Database" section of the About box. + + +## Release v1.7.3 of 27 September 2007 + ++ Improved alignment of dialogue boxes and splash screen over owning forms. Alignment code substantially refactored. ++ Added support for multiple monitors. + + +## Release v1.7.2 of 24 September 2007 + ++ Fixed bug that was preventing wait dialogue box from displaying during long compilations. + + +## Unreleased v1.7.1 of 22 September 2007 + ++ Added list of testers to credits section of Database tab in About box. ++ Added new help menu item that displays privacy statement. ++ Rearranged help menu items. ++ Updated help file re changes to help menu. + + +## Release v1.7 of 08 September 2007 + ++ Added new facility to print information about selected routines, with page set-up and printer configuration. ++ Added new "general" tab (sets default measurement units) and "printing" tab (to set printing defaults) to preferences dialogue box. ++ Changed format of ini file that stores persistent settings. ++ Updated help file to reflect changes. ++ Customised installer to update existing ini files to revised version. + + +## Unreleased v1.6.4 of 02 July 2007 + ++ Corrected typos in generated source code header comments. ++ Added support for embedding titles in generated documents where document supports title meta data. ++ Added suggested file name to save unit and save snippets dialogue boxes. ++ Refactored code in syntax highlighter that generates XHTML. + + +## Unreleased v1.6.3 of 13 May 2007 + ++ Added support for selecting and copying text displayed in preview dialogue. ++ Changed so that each document type displayed in preview dialogue box has same margins. ++ Updated help file re changes to preview dialogue box. + + +## Unreleased v1.6.2 of 12 May 2007 + ++ Updated to use revised news data format provided by web service. ++ Update from Web dialogue box now displays number of news items along with page number of currently displayed item. + + +## Release v1.6.1 of 09 May 2007 + ++ Fixed bug that allowed user to select a different routine while compiling another causing display to get out sync. + + +## Release v1.6 of 08 May 2007 + ++ Added support for Delphi 2007 compiler. ++ Updated help file re new compiler support. + + +## Release v1.5.13 of 04 March 2007 + ++ Fixed bug from v1.5.11 where Tools | Register CodeSnip and View | Show/Hide Test Unit menu options were permanently disabled. ++ Fixed bug from v1.5.9 where showing and hiding test units from menus was out of sync with links in compiler check pane. + + +## Release v1.5.12 of 01 March 2007 + ++ Made long operations (loading database and compiling test units) execute in threads. ++ Changed to display wait dialogue while updated database is being loaded. ++ Made progress meters displayed in wait dialogues update more smoothly. + + +## Release v1.5.11 of 25 February 2007 + ++ Added splash screen displayed when program is loading. ++ Main window, menu and toolbar is now disabled when program is initialising and when updated database is loading. ++ Program window is now centred on screen first time it is run and program is now never started minimized. + + +## Unreleased v1.5.10 of 17 February 2007 + ++ Refactored code that handles web browser controls. Moved various pieces of code that manipulates and queries browser controls into central UI and IO manager classes. Also added helper classes to manipulate HTML documents and browser controls. ++ Some code made redundant by above changes was removed. ++ Lightened and centralised colours used to highlight text search results. + + +## Unreleased v1.5.9 of 16 February 2007 + ++ Refactoring update. Revised code that manages the main display, i.e overview and details panes. + + +## Release v1.5.8 of 16 February 2007 + ++ Fixed bug in view history where selecting an item from the history list could cause a crash after database has been updated. This was fixed by clearing the history list after updating the database. ++ Now clears the main display before re-displaying an updated database to prevent an item from the old version of the database being selected. + + +## Unreleased v1.5.7 of 12 February 2007 + ++ Refactored, relocated and extended use of some utility routines, resulting in some other minor changes: + - All error and information message boxes now have properly terminated sentences. + - Generated XHTML less likely to contain illegal characters. + + +## Unreleased v1.5.6 of 11 February 2007 + ++ Modified about dialogue box to display information about the Code Snippets Database in addition to the program. The two kinds of information are displayed in two tabs. ++ Added code to get list of database contributors from a file downloaded with database updates. + + +## Unreleased v1.5.5 of 11 February 2007 + ++ Made keyboard interaction with application more consistent: + - Made browser controls activate and focus properly when user tabs into them. + - Fixed tab order problems in main display and about dialogue box so that only controls that may need to receive user input are now activated by tabbing. + - Links displayed in browser controls are always now included in tab sequence and can be activated by Ctrl+Return when focused. + - Fixed inconsistency in tab sets in overview and details pane responded inconsistently to Ctrl+Tab and Shift+Ctrl+Tab. ++ Changed browser control respond to activation via the mouse to be the same as for the keyboard. + + +## Release v1.5.4 of 09 February 2007 + ++ Added disclaimers re database code to generated units and snippets and to program's welcome page. ++ Made slight modifications to source code generation code. + +## Release v1.5.3 of 08 February 2007 + ++ Refactored and rationalised code in main form and moved some code into help classes. ++ Revised code that performs customisation, auto-sizing and alignment of forms and dialogue boxes. ++ Standardised execution method of dialogue boxes. + + +## Unreleased v1.5.2 of 04 February 2007 + ++ Refactored help manager system to make it easier to swap in new help systems in future. ++ Modified help handlers in forms to remove redundant code. ++ Modified how help menu items call help topics. + + +## Unreleased v1.5.1 of 04 February 2007 + ++ Refactored handling of database searches by creating new global query object to store information about current query on database. ++ Changed relevant code to use the new object and deleted resulting redundant code. ++ Made some other minor code improvements and modifications. + + +## Unreleased v1.5 of 03 February 2007 + ++ Made status bar display database and search information along with other prompts in addition to displaying hints. + + +## Unreleased v1.4.6 of 17 December 2006 + ++ Made minor changes to appearance: + - Changed some colours to system colours from hard-wired colours. + - Changed help links in main display from blue to green. + - Removed text highlighting from welcome page. + + +## Unreleased v1.4.5 of 04 December 2006 + ++ Refactored code that generates test units. As a consequence names of test units displayed in Compiler Check pane have been corrected to the actual names used in test compilations. + + +## Release v1.4.4 of 04 December 2006 + ++ Added new menu item to View menu that toggles visibility of test units in the compiler check tab. ++ Changed glyph used for link that performs same action in compiler check tab and made image change depending on visibility of test unit. + + +## Unreleased v1.4.3 of 03 December 2006 + ++ Changed information pane to load routines dynamically via DHTML rather than reloading document each time. ++ Refactored DHTML code and detail frames that support DHTML. ++ Refactored routine HTML generation code. ++ Rationalised some dynamic CSS generating code. ++ Revised information pane's underlying HTML code. + + +## Unreleased v1.4.2 of 03 December 2006 + ++ Corrected alignment of About and Compiler Errors dialogue boxes over main form. + + +## Unreleased v1.4.1 of 03 December 2006 + ++ Fixed bug where Test Compile menu option and tool button were always enabled and could cause an assertion failure when no routine was selected or no compilers were available. + + +## Unreleased v1.4 of 03 December 2006 + ++ Revised display in compiler check pane. Now lists database and test results side by side. ++ Changed routine compiler check page to be updated dynamically (using JavaScript) when routine selection changes rather than always reloading page. ++ Modified some JavaScript support code. ++ Fixed potential bug in compiler code. ++ Updated help file re changes to Compiler Check tab. ++ Fixed a typo and index error in help file. + + +## Unreleased v1.3.5 of 01 December 2006 + ++ Changed to display a border-less message dialogue during long test compilations. The dialogue is not displayed for shorter compilations. ++ Updated help file re above and fixed an error in the search menu topic. + + +## Unreleased v1.3.4 of 26 November 2006 + ++ Refactored JavaScript used to interface between main program and HTML display. ++ Centralised generation of JavaScript in main code. + + +## Unreleased v1.3.3 of 25 November 2006 + ++ Refactored handling of CSS and XHTML: + - Changed way CSS is provided to enable use of system font and colours. + - Tidied source HTML documents to remove illegal XHTML strict attributes and to remove hard-wired colours. + + +## Release v1.3.2 of 24 November 2006 + ++ Made program remember whether test units are displayed or hidden until end of session. + + +## Unreleased v1.3.1 of 21 November 2006 + ++ Made minor modification to appearance of Configure Compilers dialogue box. + + +## Unreleased v1.3 of 18 November 2006 + ++ Added facility to sign up to CodeSnip mailing list on-line. ++ Corrected further typos in registration wizard. ++ Updated help file re mailing list sign-up, changed privacy statement and added license to contents page. + + +## Release v1.2.5 of 16 November 2006 + ++ Corrected and modified text displayed on last page of Registration Wizard when user elects to join mailing list. + + +## Unreleased v1.2.4 of 14 November 2006 + ++ Changed about box and help menu to display end user license agreement in help file rather than separate text file. ++ Added license topic and made related changes to help file. + + +## Unreleased v1.2.3 of 12 November 2006 + ++ Fixed incorrect glyph used for Show All search menu item and tool button. ++ Moved Tools | Preferences menu option to top of Tools menu. + + +## Unreleased v1.2.2 of 12 November 2006 + ++ Added hot tracking to tree view check boxes used in Select Routines dialogue box when Windows XP themes are enabled. + + +## Unreleased v1.2.1 of 11 November 2006 + ++ Refactoring release: + - Method used to construct and use help file changed. + - Moved code that detects HTML and RTF files to appropriate utility units. + - Streamlined code in preview dialogue box. + + +## Release v1.2 of 11 November 2006 + ++ Changed syntax highlighter used to format units and code snippets to be able to read custom settings from persistent storage. ++ Added Syntax Highlighter tab to preferences dialogue box to enable users to customise the font, style and colours used by the syntax highlighter. ++ Modified preferences dialogue box's Source Code tab to display a preview of routines using various comment styles. ++ Updated help file re revised preferences dialogue box. + + +## Unreleased v1.1.2 of 07 November 2006 + ++ Refactoring release: + - Added code to generate CSS properties. + - Added new classes to generate RTF code. + - Re-implemented RTF highlighted code. ++ Now generates much smaller RTF export files. + + +## Unreleased v1.1.1 of 31 October 2006 + ++ Changed Select Routines dialogue to use XP style check boxes when XP themes active and custom check boxes when XP themes inactive. + + +## Release v1.1 of 30 October 2006 + ++ Added ability to generate and save whole Pascal unit containing currently selected routines. ++ Added new search that can find all routines cross-referenced by a given routine. ++ Added ability to manually select routines that are displayed in overview pane. ++ Added short-cut key and changed glyph for File | Save Snippet option / tool button. ++ Updated way source code preferences are stored. Broke backwards compatibility with previous storage method, so upgraders may loose settings. ++ Made minor changes to preferences dialogue box. ++ Word-wrapped long uses lists in generated units. ++ Refactored code that determines type of exported files. ++ Refactored and expanded code that deals with source code exporting. ++ Fixed some minor bugs: + - Previews of large rich text documents were displaying RTF source instead of rendering document. + - Assertion failure could (rarely) happen when displaying message boxes without specifying parent form. + - Saving snippets in a file without supplying a file extension could silently overwrite existing files. + - Comment style was being ignored when generating a unit. ++ Updated help file: + - Added new topics, index entries and TOC entries for new features. + - Updated some existing topics to refer to new features. + - Revised and corrected several existing help topics. + + +## Unreleased v1.0.3 of 26 October 2006 + ++ Refactored various parts of source code. No changes to program's functionality. Details are: + - Standardised all singleton objects on interface based implementation. + - Centralised code that gets location of license file. + - Standardised links that trigger JavaScript in some HTML resources. + - Changed bug report dialogue box to descend from common wizard dialogue box. + + +## Release v1.0.2 of 25 October 2006 + ++ Changed so that links from program to external web pages display in default browser rather than IE. ++ Refactored code that displays license text file in external application. ++ Reworded some of welcome screen and added links to on-line database. ++ Refactored some JavaScript code that works with main display HTML and web browser code. ++ Made minor changes to hints displayed in status bar when cursor is over links. + + +## Release v1.0.1 of 14 October 2006 + ++ Fixed problem in web update that caused program to crash on Windows 9x platforms. + + +## Release v1.0 of 09 June 2006 + ++ Revised About Box text and appearance and added link that displays license file. ++ Refactored and renamed some code. ++ Made minor changes to appearance and effect of Configure Compilers dialogue box. ++ Fixed potential bug displaying JavaScript error dialogue if help called from links in main display fail. ++ Made some literal strings resource strings. ++ Made calls to help system fail gracefully on machines without HTML Help installed. ++ Modified code that reads program's version information. ++ Added important compiler directives. ++ Standardised appearance of all groups of action links in main display. ++ Added Help menu item to display license and to access CodeSnip web page. ++ Moved bug report and registration menu options from Help to Tools menu. ++ Updated and help file re new commands, corrected some errors and re-styled menu help sections. ++ Created installer using Inno Setup. ++ Added new batch file to build program. ++ Fully commented code. ++ Changed to new end user license agreement for the executable program. The program remains open source. + + +## Release v1.0 RC 3 of 01 May 2006 + +_Internal CodeSnip version 0.12.0_ + ++ 3rd release candidate for the v1.0 release. ++ Updated to use v4 of update web service that uses completely new update protocol. Significant changes to code were needed to achieve this. ++ Redesigned update dialogue box accordingly. ++ Added ability to update dialogue to display latest CodeSnip news delivered as part update process. ++ Updated help file re changes to update dialogue box. + + +## Release v1.0 RC 2 of 16 April 2006 + +_Internal CodeSnip version 0.11.3_ + ++ 2nd release candidate for the v1.0 release. ++ Fixed bug where user could drag and drop files onto web browser controls and file contents would overwrite the display. + + +## Release v1.0 RC 1 of 11 April 2006 + +_Internal CodeSnip version 0.11.2_ + ++ 1st release candidate for the v1.0 release. ++ Updated help file: + - Ensured that external links display in a web browser window rather than in the help window. + - Added additional internal links to some help topics. ++ Fixed compiler warnings. ++ Removed some redundant code. + + +## Unreleased v0.11.1 Beta of 10 April 2006 + ++ Improved and fixed interaction with database update web service: + - Download manager now sends program's key and registration code to web service instead of place-holder strings. + - Handling for HTTP error messages improved. Short HTTP error descriptions are displayed rather than full content of error pages. + + +## Release v0.11.0 Beta of 07 April 2006 + ++ Added ability to register CodeSnip at DelphiDabbler.com: + - Registration is performed via a new wizard that gathers registration information and interacts with web server. + - Wizard is accessed via a Help menu option and About box button that appear only when application is unregistered. + - Application is identified by a unique key. + - Registration information is stored in persistent storage. ++ Reworked and added classes to centralise access to system and application information. ++ Updated help file with details of registration dialogue and CodeSnip mailing list. + + +## Unreleased v0.10.12 Beta of 04 April 2006 + ++ Improved code that stores global application settings. Prepared way for having per-user and global settings rather than just per-user settings as at present. + + +## Unreleased v0.10.11 Beta of 03 April 2006 + ++ Revised to work with v3.1 of CodeSnip database update web service. + + +## Unreleased v0.10.10 Beta of 02 April 2006 + ++ Added program icon (16x16, 32x32 and 48x48 versions). + + +## Release v0.10.9 Beta of 02 April 2006 + ++ Fixed bug where browser controls displayed JavaScript error dialogue when exceptions were raised by database updates initiated from browser control's "external" object. ++ Refactored some code in main form and main snippets object as a result of above fix. ++ Also refactored some of search code in main form. + + +## Unreleased v0.10.8 Beta of 02 April 2006 + ++ Removed bug in database update manager that was causing database to be restored unnecessarily. ++ Heavily refactored update manager code as part of bug fix. + + +## Release v0.10.7 Beta of 28 January 2006 + ++ Fixed display problems in details pane when running on Windows 2000. ++ Changed style of scroll bars from flat to normal when running in Windows XP classic style or on earlier Windows version. ++ Made compiler check pane update itself when compilers are added or removed. + + +## Release v0.10.6 Beta of 20 January 2006 + ++ Fixed bug where backup directory was not being deleted after database updates. + + +## Release v0.10.5 Beta of 14 January 2006 + ++ Added credits for third party code to about box. ++ Completed help file. + + +## Release v0.10.4 Beta of 12 January 2006 + ++ Added checking of checksums of downloaded files to increase security. Exceptions now raised when a file's checksum is incorrect. ++ Fixed small alignment problem in update dialogue. + + +## Unreleased v0.10.3 Beta of 11 January 2006 + ++ Changed so that compiler output is now captured directly rather than via temporary log file. ++ Compiler execution is now time-sliced and time-limited rather than being allowed infinite processing time. + + +## Unreleased v0.10.2 Beta of 10 January 2006 + ++ Reverted to Delphi 7 to avoid Delphi 2006 bug that was enabling dialogues to be minimized and maximized. ++ Reordered controls in Find Compiler dialogues. ++ Restored title bar close button to web update dialogue. ++ Reverted to Indy 9 Internet controls (from Indy 10) and made relevant adjustments to code. ++ Completed help topics for Find Text and Find Compiler dialogues. + + +## Release v0.10.1 Beta of 09 January 2006 + ++ Removed debug code (message box) mistakenly left in compiler execution code. ++ Refactored compiler support classes. + + +## Release v0.10.0 Beta of 08 January 2006 + ++ Added support for Delphi 2005/6 Win32 compilers. ++ Refactored some compiler support code. ++ Added support for user-configurable compiler switches. ++ Used new tabbed layout for Configure Compilers dialogue box and added tab for configuring compiler switches. ++ Updated help file to reflect redesign of Configure Compilers dialogue box. + + +## Release v0.9.0 Beta of 06 January 2006 + ++ Added facility to copy code snippets to clipboard. ++ Added new preferences dialogue box to enable configuration of default format for code snippets. ++ Added new preferences class to persist data entered in the preferences dialogue. ++ Refactored main snippets class to simplify addition of new copy snippet facility. ++ Updated help file re new additions. + + +## Unreleased v0.8.3 Beta of 04 January 2006 + ++ Modified to compile with Indy Components v10 and Delphi 2006 for Win 32. + + +## Unreleased v0.8.2 Beta of 04 January 2006 + ++ Created static class to interpret command line and changed other code to work with the new class. + + +## Unreleased v0.8.1 Beta of 04 January 2006 + ++ Fixed minor display bug in web update dialogue box. ++ Fixed about box's problem in displaying help in response to F1 key press. + + +## Release v0.8.0 Beta of 30 November 2005 + ++ Changed help file from WinHelp (.hlp) format to HTML Help (.chm) format. ++ Changed program to use new format help file. + + +## Release v0.7.7 Beta of 22 November 2005 + ++ Refactored and revised code that accesses DelphiDabbler web services. ++ Updated to use v2 of the database update web service. ++ Added topics for Bug Report dialogue and Web Update dialogue to help file. + + +## Release v0.7.6 Beta of 04 June 2005 + ++ Fixed Delphi compiler auto-detection bug. ++ Fixed bug that caused endless loop of exceptions when "database" was corrupt. ++ Syntax highlighter now generates correct XHTML for multi-line comments and generates correct CSS for mono-spaced fonts. ++ Occasional failure to create compiler log files now reported as error rather than bug. + + +## Release v0.7.5 Beta of 03 June 2005 + ++ Fixes bugs that surface when user has disabled scripts in IE's Internet zone. Program no longer runs in Internet zone. + + +## Release v0.7.4 Beta of 09 May 2005 + ++ Made user defined settings in Save Snippets dialogue box persistent. + + +## Unreleased v0.7.3 Beta of 25 April 2005 + ++ Disabled test compile button on compiler checks pane along with associated menu and toolbar button when no compilers installed. ++ Rewrote main welcome page, adding links to compiler check dialogue. Made same welcome page appear in both detail panes. ++ Updated compiler check pages by adding links to compiler check dialogue and new "about compiler checks" help topic. ++ Updated help file with new "about compiler checks" topic and completed "QuickStart" topic. ++ Added new features to DOM's external object to support above changes. + + +## Unreleased v0.7.2 Beta of 21 April 2005 + ++ Refactored code that maintains persistent application data. ++ Refactored syntax highlighter code and moved interfaces and enumerated types to own unit. ++ Renamed unit generation unit now that it generates source code other than complete units. ++ Carried out minor refactoring of Pascal analyser unit. + + +## Unreleased v0.7.1 Beta of 20 April 2005 + ++ Disabled F1 key press handling in dialogues with no help button. Was triggering bad topic errors in WinHelp. ++ Added "Compile" prefix to compiler check page's "Test Compile" button. ++ Fixed errors in "do nothing" doc host handler used by web browser control. + + +## Release v0.7.0 Beta of 17 March 2005 + ++ Added new facility to save a routine, or a whole category of routines, to file. ++ Reworked syntax highlighter implementation. ++ Updated help file with details of new routine saving feature. + + +## Release v0.6.0 Beta of 10 March 2005 + ++ Added syntax highlighting for source code displayed in detail panes. + + +## Release v0.5.0 Beta of 05 March 2005 + ++ Added support for Free Pascal compiler by totally reworking the compiler support engine. ++ Added new dialogue box to configure compilers. Compiler detection ability retained but now only works in response to user request. ++ Revised about box to include "powered by Delphi" logo. ++ Updated help file: + - Added incomplete topics for each of the main menus. + - Added complete new topic for the compiler configuration dialogue box. + - Fixed K-keyword errors and added extra keywords for dialogue boxes. + + +## Release v0.4.0 Beta of 28 February 2005 + ++ Text search results are now highlighted when routines are displayed in the information pane. + + +## Unreleased v0.3.4 Beta of 26 February 2005 + ++ Separated back end database code from Snippets object. ++ New back end code designed to make it easy to change the data provider in future versions. Current version accesses data in .ini and .dat files. + + +## Unreleased v0.3.3 Beta of 25 February 2005 + ++ Fixed bug that was preventing Ctrl+F from activating Find Text dialogue box. ++ Realigned controls in bug report dialogue and fixed tab order problems. ++ Fixed email address validation error in bug report dialogue + + +## Unreleased v0.3.2 Beta of 24 February 2005 + ++ Refactored code that provides compiler names and introduced global Compilers object. + + +## Unreleased v0.3.1 Beta of 24 February 2005 + ++ Centralised code that displays message dialogues and standardised their appearance. + + +## Unreleased v0.3.0 Beta of 23 February 2005 + ++ Updated welcome pages to provide more help on using CodeSnip. ++ Removed dialogues that appeared on start up when database was empty. Welcome page now provides this information along with an option to download database. ++ Improved handling of welcome page. + + +## Unreleased v0.2.4 Beta of 23 February 2005 + ++ Refactored and simplified access to dialogue boxes. ++ Improved search code. + + +## Unreleased v0.2.3 Beta of 23 February 2005 + ++ Created a class hierarchy for all frames that display HTML in a web browser control. + + +## Unreleased v0.2.2 Beta of 22 February 2005 + ++ Localised various literal strings and moved some constant values to a common location. + + +## Unreleased v0.2.1 Beta of 22 February 2005 + ++ Overhauled web browser external object extender that communicates browser events to application. ++ Added new notifier object that centralises handling of GUI user interaction. + + +## Unreleased v0.2.0 Beta of 21 February 2005 + ++ Made minor changes to appearance of main display. ++ Refactored the HTML generation engine, added several HTML templates to resources and localised all strings used in generated HTML. + + +## Unreleased v0.1.4 Beta of 19 February 2005 + ++ Refactored some code. + + +## Unreleased v0.1.3 Beta of 18 February 2005 + ++ Removed redundant code. + + +##Unreleased v0.1.2 Beta of 18 February 2005 + ++ Removed debug code. + + +## Unreleased v0.1.1 Beta of 18 February 2005 + ++ Fixed minor bugs. + + +## Release v0.1.0 Beta of 30 January 2005 + ++ Original beta release. From de79972ca928743b85bc1fe9f0f86346532ae197 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 14 May 2020 20:34:15 +0100 Subject: [PATCH 324/714] Remove all version specific changelogs --- Docs/ChangeLogs/ChangeLog-v0.txt | 208 ------------ Docs/ChangeLogs/ChangeLog-v1.txt | 383 --------------------- Docs/ChangeLogs/ChangeLog-v2.txt | 176 ---------- Docs/ChangeLogs/ChangeLog-v3.txt | 470 -------------------------- Docs/ChangeLogs/ChangeLog-v4.txt | 560 ------------------------------- 5 files changed, 1797 deletions(-) delete mode 100644 Docs/ChangeLogs/ChangeLog-v0.txt delete mode 100644 Docs/ChangeLogs/ChangeLog-v1.txt delete mode 100644 Docs/ChangeLogs/ChangeLog-v2.txt delete mode 100644 Docs/ChangeLogs/ChangeLog-v3.txt delete mode 100644 Docs/ChangeLogs/ChangeLog-v4.txt diff --git a/Docs/ChangeLogs/ChangeLog-v0.txt b/Docs/ChangeLogs/ChangeLog-v0.txt deleted file mode 100644 index 1a6577a62..000000000 --- a/Docs/ChangeLogs/ChangeLog-v0.txt +++ /dev/null @@ -1,208 +0,0 @@ -; ------------------------------------------------------------------------------ -; This Source Code Form is subject to the terms of the Mozilla Public License, -; v. 2.0. If a copy of the MPL was not distributed with this file, You can -; obtain one at http://mozilla.org/MPL/2.0/ -; - * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). -; -; Change Log for CodeSnip Release 0 (Beta releases) -; ------------------------------------------------------------------------------ - -Unreleased v0.11.1 Beta of 10 April 2006 -+ Improved and fixed interaction with database update web service: - - Download manager now sends program's key and registration code to web service instead of place-holder strings. - - Handling for HTTP error messages improved. Short HTTP error descriptions are displayed rather than full content of error pages. - -Release v0.11.0 Beta of 07 April 2006 -+ Added ability to register CodeSnip at DelphiDabbler.com: - - Registration is performed via a new wizard that gathers registration information and interacts with web server. - - Wizard is accessed via a Help menu option and About box button that appear only when application is unregistered. - - Application is identified by a unique key. - - Registration information is stored in persistent storage. -+ Reworked and added classes to centralise access to system and application information. -+ Updated help file with details of registration dialogue and CodeSnip mailing list. - -Unreleased v0.10.12 Beta of 04 April 2006 -+ Improved code that stores global application settings. Prepared way for having per-user and global settings rather than just per-user settings as at present. - -Unreleased v0.10.11 Beta of 03 April 2006 -+ Revised to work with v3.1 of CodeSnip database update web service. - -Unreleased v0.10.10 Beta of 02 April 2006 -+ Added program icon (16x16, 32x32 and 48x48 versions). - -Release v0.10.9 Beta of 02 April 2006 -+ Fixed bug where browser controls displayed JavaScript error dialogue when exceptions were raised by database updates initiated from browser control's "external" object. -+ Refactored some code in main form and main snippets object as a result of above fix. -+ Also refactored some of search code in main form. - -Unreleased v0.10.8 Beta of 02 April 2006 -+ Removed bug in database update manager that was causing database to be restored unnecessarily. -+ Heavily refactored update manager code as part of bug fix. - -Release v0.10.7 Beta of 28 January 2006 -+ Fixed display problems in details pane when running on Windows 2000. -+ Changed style of scroll bars from flat to normal when running in Windows XP classic style or on earlier Windows version. -+ Made compiler check pane update itself when compilers are added or removed. - -Release v0.10.6 Beta of 20 January 2006 -+ Fixed bug where backup directory was not being deleted after database updates. - -Release v0.10.5 Beta of 14 January 2006 -+ Added credits for third party code to about box. -+ Completed help file. - -Release v0.10.4 Beta of 12 January 2006 -+ Added checking of checksums of downloaded files to increase security. Exceptions now raised when a file's checksum is incorrect. -+ Fixed small alignment problem in update dialogue. - -Unreleased v0.10.3 Beta of 11 January 2006 -+ Changed so that compiler output is now captured directly rather than via temporary log file. -+ Compiler execution is now time-sliced and time-limited rather than being allowed infinite processing time. - -Unreleased v0.10.2 Beta of 10 January 2006 -+ Reverted to Delphi 7 to avoid Delphi 2006 bug that was enabling dialogues to be minimized and maximized. -+ Reordered controls in Find Compiler dialogues. -+ Restored title bar close button to web update dialogue. -+ Reverted to Indy 9 Internet controls (from Indy 10) and made relevant adjustments to code. -+ Completed help topics for Find Text and Find Compiler dialogues. - -Release v0.10.1 Beta of 09 January 2006 -+ Removed debug code (message box) mistakenly left in compiler execution code. -+ Refactored compiler support classes. - -Release v0.10.0 Beta of 08 January 2006 -+ Added support for Delphi 2005/6 Win32 compilers. -+ Refactored some compiler support code. -+ Added support for user-configurable compiler switches. -+ Used new tabbed layout for Configure Compilers dialogue box and added tab for configuring compiler switches. -+ Updated help file to reflect redesign of Configure Compilers dialogue box. - -Release v0.9.0 Beta of 06 January 2006 -+ Added facility to copy code snippets to clipboard. -+ Added new preferences dialogue box to enable configuration of default format for code snippets. -+ Added new preferences class to persist data entered in the preferences dialogue. -+ Refactored main snippets class to simplify addition of new copy snippet facility. -+ Updated help file re new additions. - -Unreleased v0.8.3 Beta of 04 January 2006 -+ Modified to compile with Indy Components v10 and Delphi 2006 for Win 32. - -Unreleased v0.8.2 Beta of 04 January 2006 -+ Created static class to interpret command line and changed other code to work with the new class. - -Unreleased v0.8.1 Beta of 04 January 2006 -+ Fixed minor display bug in web update dialogue box. -+ Fixed about box's problem in displaying help in response to F1 key press. - -Release v0.8.0 Beta of 30 November 2005 -+ Changed help file from WinHelp (.hlp) format to HTML Help (.chm) format. -+ Changed program to use new format help file. - -Release v0.7.7 Beta of 22 November 2005 -+ Refactored and revised code that accesses DelphiDabbler web services. -+ Updated to use v2 of the database update web service. -+ Added topics for Bug Report dialogue and Web Update dialogue to help file. - -Release v0.7.6 Beta of 04 June 2005 -+ Fixed Delphi compiler auto-detection bug. -+ Fixed bug that caused endless loop of exceptions when "database" was corrupt. -+ Syntax highlighter now generates correct XHTML for multi-line comments and generates correct CSS for mono-spaced fonts. -+ Occasional failure to create compiler log files now reported as error rather than bug. - -Release v0.7.5 Beta of 03 June 2005 -+ Fixes bugs that surface when user has disabled scripts in IE's Internet zone. Program no longer runs in Internet zone. - -Release v0.7.4 Beta of 09 May 2005 -+ Made user defined settings in Save Snippets dialogue box persistent. - -Unreleased v0.7.3 Beta of 25 April 2005 -+ Disabled test compile button on compiler checks pane along with associated menu and toolbar button when no compilers installed. -+ Rewrote main welcome page, adding links to compiler check dialogue. Made same welcome page appear in both detail panes. -+ Updated compiler check pages by adding links to compiler check dialogue and new "about compiler checks" help topic. -+ Updated help file with new "about compiler checks" topic and completed "QuickStart" topic. -+ Added new features to DOM's external object to support above changes. - -Unreleased v0.7.2 Beta of 21 April 2005 -+ Refactored code that maintains persistent application data. -+ Refactored syntax highlighter code and moved interfaces and enumerated types to own unit. -+ Renamed unit generation unit now that it generates source code other than complete units. -+ Carried out minor refactoring of Pascal analyser unit. - -Unreleased v0.7.1 Beta of 20 April 2005 -+ Disabled F1 key press handling in dialogues with no help button. Was triggering bad topic errors in WinHelp. -+ Added "Compile" prefix to compiler check page's "Test Compile" button. -+ Fixed errors in "do nothing" doc host handler used by web browser control. - -Release v0.7.0 Beta of 17 March 2005 -+ Added new facility to save a routine, or a whole category of routines, to file. -+ Reworked syntax highlighter implementation. -+ Updated help file with details of new routine saving feature. - -Release v0.6.0 Beta of 10 March 2005 -+ Added syntax highlighting for source code displayed in detail panes. - -Release v0.5.0 Beta of 05 March 2005 -+ Added support for Free Pascal compiler by totally reworking the compiler support engine. -+ Added new dialogue box to configure compilers. Compiler detection ability retained but now only works in response to user request. -+ Revised about box to include "powered by Delphi" logo. -+ Updated help file: - - Added incomplete topics for each of the main menus. - - Added complete new topic for the compiler configuration dialogue box. - - Fixed K-keyword errors and added extra keywords for dialogue boxes. - -Release v0.4.0 Beta of 28 February 2005 -+ Text search results are now highlighted when routines are displayed in the information pane. - -Unreleased v0.3.4 Beta of 26 February 2005 -+ Separated back end database code from Snippets object. -+ New back end code designed to make it easy to change the data provider in future versions. Current version accesses data in .ini and .dat files. - -Unreleased v0.3.3 Beta of 25 February 2005 -+ Fixed bug that was preventing Ctrl+F from activating Find Text dialogue box. -+ Realigned controls in bug report dialogue and fixed tab order problems. -+ Fixed email address validation error in bug report dialogue - -Unreleased v0.3.2 Beta of 24 February 2005 -+ Refactored code that provides compiler names and introduced global Compilers object. - -Unreleased v0.3.1 Beta of 24 February 2005 -+ Centralised code that displays message dialogues and standardised their appearance. - -Unreleased v0.3.0 Beta of 23 February 2005 -+ Updated welcome pages to provide more help on using CodeSnip. -+ Removed dialogues that appeared on start up when database was empty. Welcome page now provides this information along with an option to download database. -+ Improved handling of welcome page. - -Unreleased v0.2.4 Beta of 23 February 2005 -+ Refactored and simplified access to dialogue boxes. -+ Improved search code. - -Unreleased v0.2.3 Beta of 23 February 2005 -+ Created a class hierarchy for all frames that display HTML in a web browser control. - -Unreleased v0.2.2 Beta of 22 February 2005 -+ Localised various literal strings and moved some constant values to a common location. - -Unreleased v0.2.1 Beta of 22 February 2005 -+ Overhauled web browser external object extender that communicates browser events to application. -+ Added new notifier object that centralises handling of GUI user interaction. - -Unreleased v0.2.0 Beta of 21 February 2005 -+ Made minor changes to appearance of main display. -+ Refactored the HTML generation engine, added several HTML templates to resources and localised all strings used in generated HTML. - -Unreleased v0.1.4 Beta of 19 February 2005 -+ Refactored some code. - -Unreleased v0.1.3 Beta of 18 February 2005 -+ Removed redundant code. - -Unreleased v0.1.2 Beta of 18 February 2005 -+ Removed debug code. - -Unreleased v0.1.1 Beta of 18 February 2005 -+ Fixed minor bugs. - -Release v0.1.0 Beta of 30 January 2005 -+ Original beta version. diff --git a/Docs/ChangeLogs/ChangeLog-v1.txt b/Docs/ChangeLogs/ChangeLog-v1.txt deleted file mode 100644 index fc3617efc..000000000 --- a/Docs/ChangeLogs/ChangeLog-v1.txt +++ /dev/null @@ -1,383 +0,0 @@ -; ------------------------------------------------------------------------------ -; This Source Code Form is subject to the terms of the Mozilla Public License, -; v. 2.0. If a copy of the MPL was not distributed with this file, You can -; obtain one at http://mozilla.org/MPL/2.0/ -; - * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). -; -; Change Log for CodeSnip Release 1 -; ------------------------------------------------------------------------------ - -Release v1.9.4 of 01 September 2008 -+ Improved handling of errors encountered when running compilers. -+ Provided checks for invalid compiler executable files in Config Compilers dialogue box. -+ Added enumerator to Compilers object. -+ Made ECodeSnip exceptions and descendants clonable when copying between threads. - -Unreleased v1.9.3 of 24 August 2008 -+ Fixed bug in the database updater which could cause a deleted local file not to be noticed and not replaced. - -Unreleased v1.9.2 of 24 August 2008 -+ Changed method used to generate program key. No longer uses MAC Address, since code to find this fails on Windows Vista. -+ Refactored to remove knowledge of how contributor information and database are stored from TAppInfo class. -+ Revised code that manages contributors so that storage details are private to the classes. - -Unreleased v1.9.1 of 24 August 2008 -+ Rebuilt CodeSnip and install helper program with Delphi 2006: -+ Modified CodeSnip source to compile without warnings. -+ Replaced deprecated library calls with alternatives. - -Release v1.9 of 14 August 2008 -+ Changed so that all user accounts use the same database rather than having their own copy. Database now stored in common application data folder, along with registration information. Per-user configuration information remains in per-user application data folder in renamed file. -+ Installer can now optionally preserve data stored in database and configuration file used by earlier versions of the program. This involves creating new configuration files and moving the database. -+ Updated help file re these changes. - -Unreleased v1.8.11 of 11 August 2008 -+ Removed duplicate compiler glyph resources and modified compiler handling code accordingly. - -Unreleased v1.8.10 of 11 August 2008 -+ Refactored various units to use extended theme support. -+ Fixed redraw bug in tree views that use check boxes: check boxes were redrawing in wrong state when themes changed. -+ Improved support for theme changes. Theme manager now gets notified of changes directly from Windows. -+ Suppressed unnecessary compiler warnings. - -Unreleased v1.8.9 of 10 August 2008 -+ Modified Select Compiler dialogue box (opened from Configure Compiler dialogue) and Choose Element Colour dialogue (opened from Preferences dialogue) to be aligned correctly over dialogues, work correctly with Vista task bar and support help keywords. -+ Select Compiler file open dialogue now defaults to display any current compiler executable. -+ Choose Element Colour dialogue box now uses UK English and has custom title. -+ Added help topics for Select Compiler and Choose Element Colour dialogues. - -Release v1.8.8 of 16 June 2008 -+ Changed to make application minimisation, task bar preview window, and appearance in "Flip 3D" task switching display correctly on Windows Vista. -+ Provided work-around for Delphi's Alt key bug on XP and Vista (CodeGear Quality Central bug report #374030). - -Unreleased v1.8.7 of 05 June 2008 -+ Made selected tabs in information and detail pane persistent. -+ Fixed bug in build script. - -Unreleased v1.8.6 of 02 June 2008 -+ Fixed lock-up that could occur when displaying wait dialogue box while background tasks execute. Previous attempt to fix this problem failed. -+ Changed "marquee" that is displayed in wait dialogue box to appear correctly on Vista. - -Release v1.8.5 of 30 May 2008 -+ Fixed bug that was causing Save Snippet and Save Unit dialogue boxes to ignore file type - selected by user, always outputting default file type. -+ Deleted some unused source code. -+ Removed option to install a desktop icon from installer. Also refactored install script to conform to current Inno Setup standards. - -Release v1.8.4 of 22 April 2008 -+ Added manifest resource to ensure compatibility with Windows Vista and to use Vista themes. -+ Fixed border problem in web update dialogue box and about box when displayed under Vista / IE7 browser control. -+ Prevented selection of text in previews displayed in preferences dialogue box. -+ Updated set-up script to use macros. -+ Modified Build batch file to work with Windows SDK 2008. - -Unreleased v1.8.3 of 05 November 2007 -+ Refactored dynamic CSS generation code. - -Unreleased v1.8.2 of 04 November 2007 -+ Refactored assignable interfaced objects. - -Release v1.8.1 of 04 November 2007 -+ Made changes to browser control and URL handling. - -Unreleased v1.8 of 04 November 2007 -+ Added pop-up context menus to main display's detail pane. - -Unreleased v1.7.7 of 29 October 2007 -+ Modified code of compiler wait dialogue box and splash screen to try to prevent bug that occasionally prevent the dialogue from closing, locking up application. - -Unreleased v1.7.6 of 18 October 2007 -+ Shift-clicking links in the main display and some dialogue boxes was starting Internet Explorer. Fixed so that Internet Explorer is no longer started and shift-clicking external links now starts default browser. - -Unreleased v1.7.5 of 17 October 2007 -+ Modified Preferences dialogue box: - - Refactored code that displays measurement units. - - Preview on Source Code tab now takes on appearance of source code highlighter defined on Syntax Highlighter tab. -+ Changed format of ini file that stores persistent settings so that source code highlighter preferences are now stored in Prefs section of ini file rather than own section. -+ Customised installer to update existing ini files to revised version. - -Release v1.7.4 of 14 October 2007 -+ Fixed display bug when selecting routines following a text search. -+ Improved text search algorithm to permit search strings containing punctuation characters. -+ Fixed typo in the "About The Database" section of the About box. - -Release v1.7.3 of 27 September 2007 -+ Improved alignment of dialogue boxes and splash screen over owning forms. Alignment code substantially refactored. -+ Added support for multiple monitors. - -Release v1.7.2 of 24 September 2007 -+ Fixed bug that was preventing wait dialogue box from displaying during long compilations. - -Unreleased v1.7.1 of 22 September 2007 -+ Added list of testers to credits section of Database tab in About box. -+ Added new help menu item that displays privacy statement. -+ Rearranged help menu items. -+ Updated help file re changes to help menu. - -Release v1.7 of 08 September 2007 -+ Added new facility to print information about selected routines, with page set-up and printer configuration. -+ Added new "general" tab (sets default measurement units) and "printing" tab (to set printing defaults) to preferences dialogue box. -+ Changed format of ini file that stores persistent settings. -+ Updated help file to reflect changes. -+ Customised installer to update existing ini files to revised version. - -Unreleased v1.6.4 of 02 July 2007 -+ Corrected typos in generated source code header comments. -+ Added support for embedding titles in generated documents where document supports title meta data. -+ Added suggested file name to save unit and save snippets dialogue boxes. -+ Refactored code in syntax highlighter that generates XHTML. - -Unreleased v1.6.3 of 13 May 2007 -+ Added support for selecting and copying text displayed in preview dialogue. -+ Changed so that each document type displayed in preview dialogue box has same margins. -+ Updated help file re changes to preview dialogue box. - -Unreleased v1.6.2 of 12 May 2007 -+ Updated to use revised news data format provided by web service. -+ Update from Web dialogue box now displays number of news items along with page number of currently displayed item. - -Release v1.6.1 of 09 May 2007 -+ Fixed bug that allowed user to select a different routine while compiling another causing display to get out sync. - -Release v1.6 of 08 May 2007 -+ Added support for Delphi 2007 compiler. -+ Updated help file re new compiler support. - -Release v1.5.13 of 04 March 2007 -+ Fixed bug from v1.5.11 where Tools | Register CodeSnip and View | Show/Hide Test Unit menu options were permanently disabled. -+ Fixed bug from v1.5.9 where showing and hiding test units from menus was out of sync with links in compiler check pane. - -Release v1.5.12 of 01 March 2007 -+ Made long operations (loading database and compiling test units) execute in threads. -+ Changed to display wait dialogue while updated database is being loaded. -+ Made progress meters displayed in wait dialogues update more smoothly. - -Release v1.5.11 of 25 February 2007 -+ Added splash screen displayed when program is loading. -+ Main window, menu and toolbar is now disabled when program is initialising and when updated database is loading. -+ Program window is now centred on screen first time it is run and program is now never started minimized. - -Unreleased v1.5.10 of 17 February 2007 -+ Refactored code that handles web browser controls. Moved various pieces of code that manipulates and queries browser controls into central UI and IO manager classes. Also added helper classes to manipulate HTML documents and browser controls. -+ Some code made redundant by above changes was removed. -+ Lightened and centralised colours used to highlight text search results. - -Unreleased v1.5.9 of 16 February 2007 -+ Refactoring update. Revised code that manages the main display, i.e overview and details panes. - -Release v1.5.8 of 16 February 2007 -+ Fixed bug in view history where selecting an item from the history list could cause a crash after database has been updated. This was fixed by clearing the history list after updating the database. -+ Now clears the main display before re-displaying an updated database to prevent an item from the old version of the database being selected. - -Unreleased v1.5.7 of 12 February 2007 -+ Refactored, relocated and extended use of some utility routines, resulting in some other minor changes: - - All error and information message boxes now have properly terminated sentences. - - Generated XHTML less likely to contain illegal characters. - -Unreleased v1.5.6 of 11 February 2007 -+ Modified about dialogue box to display information about the Code Snippets Database in addition to the program. The two kinds of information are displayed in two tabs. -+ Added code to get list of database contributors from a file downloaded with database updates. - -Unreleased v1.5.5 of 11 February 2007 -+ Made keyboard interaction with application more consistent: - - Made browser controls activate and focus properly when user tabs into them. - - Fixed tab order problems in main display and about dialogue box so that only controls that may need to receive user input are now activated by tabbing. - - Links displayed in browser controls are always now included in tab sequence and can be activated by Ctrl+Return when focused. - - Fixed inconsistency in tab sets in overview and details pane responded inconsistently to Ctrl+Tab and Shift+Ctrl+Tab. -+ Changed browser control respond to activation via the mouse to be the same as for the keyboard. - -Release v1.5.4 of 09 February 2007 -+ Added disclaimers re database code to generated units and snippets and to program's welcome page. -+ Made slight modifications to source code generation code. - -Release v1.5.3 of 08 February 2007 -+ Refactored and rationalised code in main form and moved some code into help classes. -+ Revised code that performs customisation, auto-sizing and alignment of forms and dialogue boxes. -+ Standardised execution method of dialogue boxes. - -Unreleased v1.5.2 of 04 February 2007 -+ Refactored help manager system to make it easier to swap in new help systems in future. -+ Modified help handlers in forms to remove redundant code. -+ Modified how help menu items call help topics. - -Unreleased v1.5.1 of 04 February 2007 -+ Refactored handling of database searches by creating new global query object to store information about current query on database. -+ Changed relevant code to use the new object and deleted resulting redundant code. -+ Made some other minor code improvements and modifications. - -Unreleased v1.5 of 03 February 2007 -+ Made status bar display database and search information along with other prompts in addition to displaying hints. - -Unreleased v1.4.6 of 17 December 2006 -+ Made minor changes to appearance: - - Changed some colours to system colours from hard-wired colours. - - Changed help links in main display from blue to green. - - Removed text highlighting from welcome page. - -Unreleased v1.4.5 of 04 December 2006 -+ Refactored code that generates test units. As a consequence names of test units displayed in Compiler Check pane have been corrected to the actual names used in test compilations. - -Release v1.4.4 of 04 December 2006 -+ Added new menu item to View menu that toggles visibility of test units in the compiler check tab. -+ Changed glyph used for link that performs same action in compiler check tab and made image change depending on visibility of test unit. - -Unreleased v1.4.3 of 03 December 2006 -+ Changed information pane to load routines dynamically via DHTML rather than reloading document each time. -+ Refactored DHTML code and detail frames that support DHTML. -+ Refactored routine HTML generation code. -+ Rationalised some dynamic CSS generating code. -+ Revised information pane's underlying HTML code. - -Unreleased v1.4.2 of 03 December 2006 -+ Corrected alignment of About and Compiler Errors dialogue boxes over main form. - -Unreleased v1.4.1 of 03 December 2006 -+ Fixed bug where Test Compile menu option and tool button were always enabled and could cause an assertion failure when no routine was selected or no compilers were available. - -Unreleased v1.4 of 03 December 2006 -+ Revised display in compiler check pane. Now lists database and test results side by side. -+ Changed routine compiler check page to be updated dynamically (using JavaScript) when routine selection changes rather than always reloading page. -+ Modified some JavaScript support code. -+ Fixed potential bug in compiler code. -+ Updated help file re changes to Compiler Check tab. -+ Fixed a typo and index error in help file. - -Unreleased v1.3.5 of 01 December 2006 -+ Changed to display a border-less message dialogue during long test compilations. The dialogue is not displayed for shorter compilations. -+ Updated help file re above and fixed an error in the search menu topic. - -Unreleased v1.3.4 of 26 November 2006 -+ Refactored JavaScript used to interface between main program and HTML display. -+ Centralised generation of JavaScript in main code. - -Unreleased v1.3.3 of 25 November 2006 -+ Refactored handling of CSS and XHTML: - - Changed way CSS is provided to enable use of system font and colours. - - Tidied source HTML documents to remove illegal XHTML strict attributes and to remove hard-wired colours. - -Release v1.3.2 of 24 November 2006 -+ Made program remember whether test units are displayed or hidden until end of session. - -Unreleased v1.3.1 of 21 November 2006 -+ Made minor modification to appearance of Configure Compilers dialogue box. - -Unreleased v1.3 of 18 November 2006 -+ Added facility to sign up to CodeSnip mailing list on-line. -+ Corrected further typos in registration wizard. -+ Updated help file re mailing list sign-up, changed privacy statement and added license to contents page. - -Release v1.2.5 of 16 November 2006 -+ Corrected and modified text displayed on last page of Registration Wizard when user elects to join mailing list. - -Unreleased v1.2.4 of 14 November 2006 -+ Changed about box and help menu to display end user license agreement in help file rather than separate text file. -+ Added license topic and made related changes to help file. - -Unreleased v1.2.3 of 12 November 2006 -+ Fixed incorrect glyph used for Show All search menu item and tool button. -+ Moved Tools | Preferences menu option to top of Tools menu. - -Unreleased v1.2.2 of 12 November 2006 -+ Added hot tracking to tree view check boxes used in Select Routines dialogue box when Windows XP themes are enabled. - -Unreleased v1.2.1 of 11 November 2006 -+ Refactoring release: - - Method used to construct and use help file changed. - - Moved code that detects HTML and RTF files to appropriate utility units. - - Streamlined code in preview dialogue box. - -Release v1.2 of 11 November 2006 -+ Changed syntax highlighter used to format units and code snippets to be able to read custom settings from persistent storage. -+ Added Syntax Highlighter tab to preferences dialogue box to enable users to customise the font, style and colours used by the syntax highlighter. -+ Modified preferences dialogue box's Source Code tab to display a preview of routines using various comment styles. -+ Updated help file re revised preferences dialogue box. - -Unreleased v1.1.2 of 07 November 2006 -+ Refactoring release: - - Added code to generate CSS properties. - - Added new classes to generate RTF code. - - Re-implemented RTF highlighted code. -+ Now generates much smaller RTF export files. - -Unreleased v1.1.1 of 31 October 2006 -+ Changed Select Routines dialogue to use XP style check boxes when XP themes active and custom check boxes when XP themes inactive. - -Release v1.1 of 30 October 2006 -+ Added ability to generate and save whole Pascal unit containing currently selected routines. -+ Added new search that can find all routines cross-referenced by a given routine. -+ Added ability to manually select routines that are displayed in overview pane. -+ Added short-cut key and changed glyph for File | Save Snippet option / tool button. -+ Updated way source code preferences are stored. Broke backwards compatibility with previous storage method, so upgraders may loose settings. -+ Made minor changes to preferences dialogue box. -+ Word-wrapped long uses lists in generated units. -+ Refactored code that determines type of exported files. -+ Refactored and expanded code that deals with source code exporting. -+ Fixed some minor bugs: - - Previews of large rich text documents were displaying RTF source instead of rendering document. - - Assertion failure could (rarely) happen when displaying message boxes without specifying parent form. - - Saving snippets in a file without supplying a file extension could silently overwrite existing files. - - Comment style was being ignored when generating a unit. -+ Updated help file: - - Added new topics, index entries and TOC entries for new features. - - Updated some existing topics to refer to new features. - - Revised and corrected several existing help topics. - -Unreleased v1.0.3 of 26 October 2006 -+ Refactored various parts of source code. No changes to program's functionality. Details are: - - Standardised all singleton objects on interface based implementation. - - Centralised code that gets location of license file. - - Standardised links that trigger JavaScript in some HTML resources. - - Changed bug report dialogue box to descend from common wizard dialogue box. - -Release v1.0.2 of 25 October 2006 -+ Changed so that links from program to external web pages display in default browser rather than IE. -+ Refactored code that displays license text file in external application. -+ Reworded some of welcome screen and added links to on-line database. -+ Refactored some JavaScript code that works with main display HTML and web browser code. -+ Made minor changes to hints displayed in status bar when cursor is over links. - -Release v1.0.1 of 14 October 2006 -+ Fixed problem in web update that caused program to crash on Windows 9x platforms. - -Release v1.0 of 09 June 2006 -+ Version 1 release. -+ Revised About Box text and appearance and added link that displays license file. -+ Refactored and renamed some code. -+ Made minor changes to appearance and effect of Configure Compilers dialogue box. -+ Fixed potential bug displaying JavaScript error dialogue if help called from links in main display fail. -+ Made some literal strings resource strings. -+ Made calls to help system fail gracefully on machines without HTML Help installed. -+ Modified code that reads program's version information. -+ Added important compiler directives. -+ Standardised appearance of all groups of action links in main display. -+ Added Help menu item to display license and to access CodeSnip web page. -+ Moved bug report and registration menu options from Help to Tools menu. -+ Updated and help file re new commands, corrected some errors and re-styled menu help sections. -+ Created installer using Inno Setup. -+ Added new batch file to build program. -+ Fully commented code. -+ Changed to new end user license agreement for the executable program. The program remains open source. - -Release v1.0 RC 3 of 01 May 2006 -Internal CodeSnip version 0.12.0 -+ 3rd release candidate for the v1.0 release. -+ Updated to use v4 of update web service that uses completely new update protocol. Significant changes to code were needed to achieve this. -+ Redesigned update dialogue box accordingly. -+ Added ability to update dialogue to display latest CodeSnip news delivered as part update process. -+ Updated help file re changes to update dialogue box. - -Release v1.0 RC 2 of 16 April 2006 -Internal CodeSnip version 0.11.3 -+ 2nd release candidate for the v1.0 release. -+ Fixed bug where user could drag and drop files onto web browser controls and file contents would overwrite the display. - -Release v1.0 RC 1 of 11 April 2006 -Internal CodeSnip version 0.11.2 -Changes relate to v0.11.1 Beta -+ 1st release candidate for the v1.0 release. -+ Updated help file: - - Ensured that external links display in a web browser window rather than in the help window. - - Added additional internal links to some help topics. -+ Fixed compiler warnings. -+ Removed some redundant code. diff --git a/Docs/ChangeLogs/ChangeLog-v2.txt b/Docs/ChangeLogs/ChangeLog-v2.txt deleted file mode 100644 index 77f967fa0..000000000 --- a/Docs/ChangeLogs/ChangeLog-v2.txt +++ /dev/null @@ -1,176 +0,0 @@ -; ------------------------------------------------------------------------------ -; This Source Code Form is subject to the terms of the Mozilla Public License, -; v. 2.0. If a copy of the MPL was not distributed with this file, You can -; obtain one at http://mozilla.org/MPL/2.0/ -; - * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). -; -; Change Log for CodeSnip Release 2 -; ------------------------------------------------------------------------------ - -Unreleased v2.4.1 of 13 May 2009 -+ Refactored code that provides information about the program and web URLs and services it accesses. -+ Changed URL accessed by donations dialogue box. - -Release v2.4 of 11 May 2009 -+ Added donate menu option and dialogue that accesses a PayPal donation web page. -+ Removed support for the Windows 9x platform since CodeSnip now generates fatal errors on that platform: - - Removed Windows 9x specific code. - - Changed installer to prevent installation on Windows 9x. -+ Updated help file re changes. - -Release v2.3.7 of 26 April 2009 -+ Made user name and email address entered in Code Submission Wizard persistent on a per-user basis. -+ Updated Code Submission Wizard and Privacy Statement help topics re the changes. - -Unreleased v2.3.6 of 26 January 2009 -+ Changed method that is used to get locale information to be compatible with Vista as well as earlier OSs. - -Release v2.3.5 of 25 January 2009 -+ Changed method used to generate HTML displayed in main program window to avoid dynamic updating of documents in attempt to counter a reported JavaScript bug. -+ Refactored generation of HTML tags in all parts of program that use HTML in display. -+ Corrected method naming error. - -Unreleased v2.3.4 of 16 January 2009 -+ Copy Source Code menu item now places a copy of selected snippet on clipboard in syntax highlighted rich text in addition to plain text. -+ Updated help file accordingly. - -Unreleased v2.3.3 of 14 January 2009 -+ Browser controls and snippets tree-views are now selected when containing frame is entered. -+ Discrepancy in way highlighting works in snippets tree-views fixed. -+ "&" characters are now rendered correctly in TMessageBox dialogues. -+ Code that executes compilers now uses one thread instead of two. -+ Refactorings: - - Some constants relocated. - - Rationalised some routine and method calls. - - Replaced some control character literals with constants. - - Updated IntfUIHandlers unit with IE6/7 related constants. - -Unreleased v2.3.2 of 10 January 2009 -+ Revised compilers object. Singleton instance removed. Local instances of object are created where needed. -+ Added new method to compiler objects to detect errors and warnings -+ Fixed incorrect caption in compiler error dialogue. -+ Added new object that manages test compilations, compiler set-up and viewing compile errors. Used by main form and snippets editor. -+ Added "View Compile Errors" menu option to Database menu. -+ Added Alt+V hot key to view compile errors in Snippets editor. -+ Updated help file for database menu to add "View Compile Errors" and missing entries for Submission, import and export of user database. - -Unreleased v2.3.1 of 06 January 2009 -+ Fixed test compilation bug in snippets editor that could corrupt compiler errors or warnings displayed from main display. -+ Added support for tab switching in compiler errors dialogue box using Ctrl+Tab and Shift+Ctrl+Tab. - -Release v2.3 of 05 January 2009 -+ Changed name of Copy Snippet menu item to Copy Source Code. -+ Added new Copy Information menu item to Copy menu - copies all snippet information to clipboard in text and RTF. -+ Added Save Database button to toolbar. -+ Changed status bar to display a count of user defined routines and an indicator that shows when user database has been modified. -+ Refactored and extended clipboard management code. -+ Added new buttons to selection search dialogue box to select user defined or main database routines. -+ Added facility to test compile routines to user defined snippets editor dialogue box. -+ Modified compiler errors dialogue box to be able to display results of compilation with more than one compiler. -+ Updated help file re changes. - -Release v2.2.5 of 31 December 2008 -+ Replaced routine's credits and comments properties with new Extra information property that can store formatted text. -+ Added parser for mark-up language used by new Extra property. -+ Modified snippets edit dialogue box to use new Extra property. -+ Changed main database, user database and export file format to support new Extra property. User database and export files generated by this version can't be read by earlier versions of the program. -+ Modified and refactored print document generation code to use new Extra property. -+ Refactored some HTML generation code. -+ Fixed a bug that occasionally causes a GPF when updating a user defined routine. -+ Removed redundant topic from help file. - -Release v2.2.4 of 19 December 2008 -+ Fixed bug in text and RTF preview dialogue boxes that was setting margins incorrectly and clipping displayed text. - -Unreleased v2.2.3 of 17 December 2008 -+ Refactored code that handles XML files (user database and import / export). Pulled out common code and further extended XML document object. - -Unreleased v2.2.2 of 16 December 2008 -+ Added glyphs to printers in print dialogue box. -+ Various refactorings of print and highlighting related code. -+ Printing now uses user-defined highlighters. Current highlighting is now previewed in print preferences. -+ Bug fixes: - - Help button now displays in page set-up dialogue on Vista. - - Page set-up dialogue now makes use of custom margin settings. - -Unreleased v2.2.1 of 16 December 2008 -+ Several refactorings: - - Rationalised email validation code. - - Rationalised exceptions raised when validating entry into dialogue box. - - Rationalised code that momentarily pauses execution of a thread. - - Made wide use of extended TRect structure. - - Changed various loops to use enumerators. - - Removed some unused code. -+ Fixed minor bug in open and save dialogues that occasionally failed to detect existence of a file. - -Unreleased v2.2 of 15 December 2008 -+ Added facility to submit user defined snippets via Internet for inclusion in main database. -+ Added facility to export user defined routines to file and to import exported files. -+ Made minor changes to wizard dialogue boxes. -+ Rewrote message dialogue box code. -+ Made minor changes to open and save dialogue boxes. -+ Updated help file for the new code import, export and submission features. - -Release v2.1 of 11 October 2008 -+ Added support for Delphi 2009 Win 32 personality. -+ Added a button to set all compiler results to success to snippets edit dialogue box. -+ Refactored some code. -+ Updated help file re Delphi 2009 support. - -Unreleased v2.0.7 of 05 October 2008 -+ Fixed residual bug in alt key bug work-around (CodeGear Quality Central bug report #374030). The bug was manifesting itself only for the first dialogue box displayed after the program started. - -Unreleased v2.0.6 of 05 October 2008 -+ Refactoring: - - Added class methods to instantiate and use various classes that have only one public method to save caller having to create, execute and destroy object. Public constructors of these classes were changed to cause assertion failure if directly called. - - Made static classes derive from new base class that causes assertion failure if constructor called. - - Combined some action update handlers in main form. - - Updated assertions and raising of EBug exceptions to programatically get name of class triggering error. - - Made some class' protected and private sections strict. - -Unreleased v2.0.5 of 03 October 2008 -+ Refactoring: changed custom save source dialogue to descend from extended save dialogue box. - -Release v2.0.4 of 21 September 2008 -+ Improved speed of looking up routines in database. -+ Prevented any user defined routine from referencing itself. -+ User defined routines now always reference routines from user database in preference to main database when there is a name conflict. - -Unreleased v2.0.3 of 20 September 2008 -+ Fixed bug that caused an assertion failure when an attempt was made to display the Select Routines dialogue box when an empty category was present in database. - -Unreleased v2.0.2 of 19 September 2008 -+ Now gives option to save changed user defined database before updated main database. -+ When a routine is updated or deleted references to it in other routines are updated or removed. -+ Corrected reference in installer to menu item used to update database (this changed from v2). - -Release v2.0.1 of 18 September 2008 -+ Fixed bug that fails to load user database and deletes it if a category is added to main database during on-line update. -+ Fixed bug that ignores any user defined snippets that have same name as snippets in main database. -+ Ensured main form is disabled when database is loading. -+ Ensured splash form is hidden if an exception occurs while splash form is displayed. - -Release v2.0 of 15 September 2008 -Changes relate to v1.9.4 -+ Added support for user defined snippets: - - User database can be edited, saved, backed-up and restored. - - User database can reference code in main database. - - Names of user defined snippets are coloured blue to distinguish them from main database. - - User database is stored as a mix of XML and source files in a sub-folder of the per-user application data folder. - - Queries can now be refreshed when content of user database changes. -+ Modified extended external object that communicates between browser controls and application. -+ Main database engine heavily modified. -+ Greater use of DHTML to manipulate main display. -+ Made browser pop-up menu display glyphs for items menu items that replicate links in browser control. -+ Modified welcome page to appear differently depending on state of main and user defined databases. -+ Disclaimers, copyright and other headers of saved, printed and copied documents changed. -+ Commenting of exported code changed slightly to allow for user snippets that may not support all commenting styles. -+ Fixed status bar display bug. -+ Category headers in overview pane are now in bold. -+ Added enumerators to several list objects to support for..in construct. -+ Tweaked exception handling. -+ Added support for converting GIF resources into bitmaps for use in image lists. -+ Changed URL used to access program's home page. -+ Updated help file to reflect changes. -+ Added credits for use of Anders Melander's GIFImage unit to about box. diff --git a/Docs/ChangeLogs/ChangeLog-v3.txt b/Docs/ChangeLogs/ChangeLog-v3.txt deleted file mode 100644 index bbbca6668..000000000 --- a/Docs/ChangeLogs/ChangeLog-v3.txt +++ /dev/null @@ -1,470 +0,0 @@ -; ------------------------------------------------------------------------------ -; This Source Code Form is subject to the terms of the Mozilla Public License, -; v. 2.0. If a copy of the MPL was not distributed with this file, You can -; obtain one at http://mozilla.org/MPL/2.0/ -; - * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). -; -; Change Log for CodeSnip Release 3 -; ------------------------------------------------------------------------------ - -Release v3.13.2 of 31 October 2013 -+ Modified Syntax Highlighter tab of Preferences dialogue box so that "vertical" fonts (whose names begin with "@") no longer appear in list of available fonts. -+ Fixed potential bug in operating system detection code that may fail on Windows 2000. -+ Fixed registry access code so that the 64 bit view of the registry is used when CodeSnip runs on a Windows 64 bit operating system. - -Release v3.13.1 of 18 September 2013 -+ Removed File | Page Setup menu option because some settings made there were being ignored when a file was printed. This is a fix for bug #89 "Setup selections not being remembered" (http://bit.ly/1a3V94x). -+ Updated help file re changes. - -Release v3.13.0 of 12 September 2013 -+ Added support for Delphi XE5 compiler. -+ Updated documentation re changes. -+ Updated help file re changes. - -Release v3.12.1 of 01 July 2013 -+ Fixed bug #82 "Fatal divide by zero exception on start-up" (http://bit.ly/15aIJqQ) that affected all v3.x versions when the IE 10 browser was installed. -+ Fixed unreported bug where IE 10 browser was being reported as IE 9. -+ Updated all third party DelphiDabbler code to latest available versions. -+ Updated documentation re changes. - -Release v3.12.0 of 02 May 2013 -+ Added support for Delphi XE4 compiler. Implements feature request #78 (http://bit.ly/10uGhoD). -+ Fixed bug #78 (http://bit.ly/ZQl3T4) - CodeSnip doesn't restore window in correct position when task bar on left or top of screen. -+ Updated documentation re changes. -+ Updated help file re changes. - -Release v3.11.1 of 08 December 2012 -+ Fixed bug #3578654 (http://bit.ly/T7fTxu): "Pre-processor directive errors in main db ini files" by removing support for problematic directives. -+ Hints are no longer displayed in status bar when user rolls mouse over a link in the display pane. This fixes bug #3577408 (http://bit.ly/WEzZGg): "Clicking detail pane snippet link leaves hint in status bar". -+ Windows no longer scale automatically when screen DPI differs from that on design system. This fixes bugs #3591818 (http://bit.ly/TvNaUL) "Strange window behaviour in Windows 7" and bug #3591820 (http://bit.ly/SEH6dO) "Incorrect font size used for some bold text". -+ Updated operating system detection code to detect W0ndows 8 & 2012 server. -+ Updated documentation - -Release v3.11.0 of 17 September 2012 -+ Added support for Delphi XE3 compiler. Implements feature request #3566345 (http://bit.ly/OvbBPp). -+ Bug fixes: - - #3561713 (http://bit.ly/QEYRFx): The Category view in the Overview pane sometimes appears fully expanded when it is expected to be fully collapsed. - - #3566430 (http://bit.ly/U1KnGZ): About Box Paths Page displays wrongly when themes not available. -+ Updated documentation re changes. -+ Updated help file re changes. - -Release v3.10.5 of 21 August 2012 -+ Fixed bugs: - - #3559257 (http://bit.ly/Qc8Fqu): Compile Results accessed from menu can get out of sync. - - #3559156 (http://bit.ly/TKXYQ7): "Previews" disappearing in Preferences dialogue box - -Release v3.10.4 of 16 August 2012 -+ Added support for displaying pop-up menus over appropriate control when Alt+F10 is pressed. Fixes bug #3556713 (http://bit.ly/RIzfvQ). -+ Changes to snippets editor: - - Added missing edit context menu to "add unit" edit control on References tab. Fixes bug #3556718 (http://bit.ly/RVanCE) as it relates to v3. - - Predefined list of units in Units list on References tab now includes the "Types" unit. - - Referenced unit names may now contain dots. - - Snippets Editor help topic now explains need to configure Delphi XE2 compiler to search namespaces containing referenced units. This provides a solution to bug #3536531 (http://bit.ly/Q2bcmY). - -Release v3.10.3 of 25 July 2012 -+ Changed so that Delphi compilers can be detected by examining current user registry key in addition to local machine registry key. This enables Delphis that were installed for a given user only to be detected. -+ Fixed bug in Compiler tab of Configure Compilers dialogue box that failed to flag selected compiler as unavailable after button was pressed. - -Release v3.10.2 of 19 June 2012 -+ Fixed bug #3536331 (http://bit.ly/KQVATf) where some distinct words in a snippet's Extra text where not being found in text searches. -+ Info about user's OS and IE version is now sent to web server during online database updates. -+ Updated privacy statement re changes in information sent by update web service. - -Release v3.10.1 of 20 April 2012 -+ Fixed bug #3519784 (http://bit.ly/IsCsun) where multi-line type or constant snippets that start on same line as type or const keyword were corrupted when included in units using the "comments after snippet header" comment style. -+ Also fixed potential source of a bug in code that edits user-defined categories. - -Release v3.10.0 of 17 April 2012 -+ Added new Help | On The Web | FAQs menu option to display CodeSnip FAQs in default browser. -+ Fixed unreported minor bug in dialogue boxes that display tabbed page controls: clicking a tab did not always give it the keyboard focus. -+ Characters used to introduced switches on command line were changed: '/' replaces non-standard '\'. '-' is still permitted. -+ Updated help file: added topic for new menu option and minor change to FAQ help topic. - -Release v3.9.3 of 23 November 2011 -+ Fixed some bugs in main window: - - Toolbar was truncated when window is too narrow to display it all. It now wraps. - - Treeview state in Overview pane was not restoring correctly after navigating away from and then returning to a tab. - - Pressing Ctrl+Tab or Shift+Ctrl+Tab did not necessarily change the tab in the expected tab set in either the Overview or Detail panes. -+ Fixed a broken URL in about box. -+ Bumped installer program helper build number re Delphi 2010 compilation (should have been done at v3.5.1). - -Release v3.9.2 of 28 October 2011 -+ Fixed bug #3427741 (http://bit.ly/vq2fAz) where details pane tabs didn't change in response to key presses. -+ Fixed bug #3427866 (http://bit.ly/w31z8L) where selection in overview was not always same as item displayed in details pane. -+ Fixed bug #3427889 (http://bit.ly/tijnmF) where there was the possibility of a GPF in overview pane. - -Release v3.9.1 of 18 September 2011 -+ Fixed bug #3369422 (http://bit.ly/omSp6F) in Pascal highlighter that was causing an assertion failure when parsing malformed Pascal general format floating point numbers. - -Release v3.9.0 of 07 September 2011 -+ Added support for Delphi XE2 Windows 32 bit compiler: - - Can now test compile and display results with Delphi XE2 32 bit. - - Delphi XE2 compiler version 23.0 has been added to the drop down menu in the Code Generation tab of the preference dialogue box. - - Updated help file re Delphi XE2 support. - - Updated documentation. -+ Limited user name edit control to 48 chars in registration wizard because this is limit in online registration database. - -Release v3.8.11 of 02 July 2011 -+ Fixed display problem in about box and compiler error dialogue boxes on systems using Internet Explorer v9 web browser control. This fixes issue #3349186 (http://bit.ly/lF6bTO). -+ Updated read-me file re support for IE9 browser control. - -Release v3.8.10 of 20 May 2011 -+ Reverted checked tree views and list boxes to standard Windows behaviour. Clicking item text no longer toggles associated check boxes. This behaviour was more problematic then helpful. -+ Updated documentation, including new info about CodeSnip FAQ. -+ Added FAQs topic and TOC entry to help file that links to online FAQ. - -Release v3.8.9 of 10 May 2011 -+ Fixed bug #3299870 (http://bit.ly/iX8Its) that was allowing imported snippets with duplicate names to be renamed with invalid names. -+ Improved UI used to edit imported snippet names. -+ Any "warning" compile results in main database are now treated and displayed as "success" results per feature request #3290359 (http://bit.ly/mshbRa). -+ Fixed unreported potential bug in code that sets window class names. -+ Updated documentation. - -Release v3.8.8 of 19 January 2011 -+ Added facility for user to specify maximum age of news items displayed in news dialogue box. New preferences tab added where the maximum age can be customised. -+ Preferences dialogue box now displays multi-line tabs when necessary. -+ Refactored some code used to align controls on forms. -+ Updated license. License HTML help file is no longer MPLd and may not be altered by third parties. -+ Updated help file re changes. -+ Updated documentation. - -Release v3.8.7 of 16 December 2010 -+ Delphi XE compiler version 22.0 has been added to the drop down menu in the Code Generation tab of the preference dialogue box. -+ Bug fix: compiler results are no longer listed when free-form snippets are printed or copied to the clipboard using the "Edit | Copy Information" menu item. - -Release v3.8.6 of 06 December 2010 -+ Bug fix release (none reported in bug tracker): - - Corrected XML file validation so that it does not reject XML processing instructions that contain an "encoding" attribute. - - Fixed long standing bug that was crashing CodeSnip when the database was updated or restored after editing, adding or deleting any user defined snippet. - - Attempting to restore a database backup with an unknown (later) file format now raises an exception. Previously CodeSnip tried, unsuccessfully, to read the file. - -Release v3.8.5 of 28 November 2010 -+ Fixed bug where user was able to create snippets with valid names that would crash the alphabetic overview. Snippet names are now limited to letters from English alphabet and the underscore. Fixes bug #3120958 (http://bit.ly/fDAswL). -+ Fixed bug where snippets that have names beginning with a lower case letter were being omitted from from the associated list of snippets shown in the detail pane. Fixes bug #3120962 (http://bit.ly/eGhQvc). -+ Updated Snippets Editor topic in help file. - -Release v3.8.4 of 26 November 2010 -+ User can now opt to terminate the application when an unexpected exception is trapped. This implements feature request #3074914 (http://bit.ly/hUyEAw). -+ Wording of bug report dialogue boxes changed. -+ Snippets selection dialogue box now displays wait cursor while waiting for it to be displayed. -+ Some corrections and clarifications made to comments that appear in generated "include" files. -+ Custom message boxes can now display custom title and icon. -+ Imported some updates from "new-backend" development tree: - - Some source code re-organisation and renaming. - - Updated some sorted list management code. - -Release v3.8.3 of 24 November 2010 -+ Added button to "Compile" tab of Snippets Editor to display unit used to test compile snippets. This implements feature request #3108008 (http://bit.ly/elBZnn). -+ Fixed unreported bugs in handling of exceptions raised in threads. -+ Simplified method used to load database on start up. No longer uses a separate thread. -+ Overhauled and simplified code used to display "wait" dialogues during test compilations and database reloading. -+ Refactorings: - - Increased use of generics in lists and enumerators. - - Reorganised source code tree by moving some code to more relevant units, renaming some units and increasing use of namespaces. - - Removed some redundant code. -+ Updated help file re changes to snippets editor. - -Release v3.8.2 of 16 November 2010 -+ The position of the caret in the Snippets Editor's Extra Information control is now displayed. Implements feature request #3105288 (http://bit.ly/bRV86Z). -+ Code that displays caret positions was refactored and improved. -+ Display of errors in the Snippets Editor's text edit controls has been improved in most cases either by positioning the caret near the error or selecting the erroneous text. This implements feature request #3107042 (http://bit.ly/cKx5YQ). -+ Made significant changes to code that parses REML mark-up: - - Rationalised error reporting and added support for reporting the position of errors. - - Fixed unreported bug that produced wrong error message when empty tags are encountered. - - Fixed bug #3107982 (http://bit.ly/cp9Cff) that failed to report some unclosed tags as errors. - - Refactored and reorganised much of the code. -+ All encoding and decoding of URIs is now RFC 3986 compliant. -+ Refactored character detection and string encoding support code. -+ Renamed some units and classes. -+ Updated documentation. - -Release v3.8.1 of 08 November 2010 -+ Fixed bug #3015589 (http://bit.ly/cdPedH) where some user syntax highlighter settings were being ignored in main display. -+ Changed Test Unit view dialogue box to use user syntax highlighter settings. -+ Revised credits in About Box program tab. -+ Updated third party units: PJMD5 to v0.3, PJSysInfo to v3.3, PJVersionInfo to v3.3. -+ Modified version info code to use new features of new PJVersionInfo 3rd party unit. -+ Refactored code that parses XHTML-style code. -+ Updated compiler warnings used in project and made command line and IDE options the same. -+ Updated documentation. - -Release v3.8.0 of 23 October 2010 -+ Added support for Delphi XE to program. Can now test compile and display results with Delphi XE. -+ Updated help file re Delphi XE support. -+ Some refactoring. -+ Standardised bug-trap and assertion failure exception messages. - -Release v3.7.0 of 23 September 2010 -+ Added new "Help | CodeSnip News" menu option that displays latest news about CodeSnip and the online database in a dialogue box. The news comes from the CodeSnip RSS news feed. -+ Removed news pane from "Update from Web" dialogue box and replaced with button that displays new "CodeSnip News" dialogue box. -+ Removed mailing list subscription facility: - - Removed subscription dialogue box and associated menu option. - - Removed code that accessed mailing list web service. - - Removed subscription option from program registration dialogue box. -+ Fixed a memory leak. -+ Added code that downloads XML document and reads and parses RSS feeds. -+ Refactored and improved HTTP request handling code. -+ Some further refactoring. -+ Updated help file re changes in this release. -+ Updated privacy statement. - -Release v3.6.3 of 22 July 2010 -+ Completely overhauled code that interacts with web services. - - Character encodings are now correctly handled per information in HTTP header and several different encodings are supported. - - MD5 checksums in HTTP headers are now supported. -+ Updated and corrected the contents of the About Box's "About The Program" Tab. -+ Some refactorings, mainly to code that uses MD5 message digests. -+ Attempts to compile source with Delphi 2009 and earlier are now prevented. -+ Updated documentation. - -Release v3.6.2 of 18 June 2010 -+ Fixed source code formatting problem in code generator where "forward" declarations were sometimes preceded with an unwanted blank line. -+ Fixed potential bug in code that parses mark-up used for a snippet's Extra information. Symbolic entities were not case sensitive. -+ Fixed a memory leak. -+ Some refactorings that increase use of generics and some others. -+ Read-me file updated re v3.6.1 password changes. - -Release v3.6.1 of 01 June 2010 -+ Proxy server passwords can now contain any Unicode character, not just those included in the Windows-1252 code page. -+ Password format in per user ini file changed. Existing passwords have to be re-entered. Ini file format updated to v7. -+ Installer updated: - - It deletes any passwords from v6 and earlier per user ini files. - - Per-user ini file now stamped as v7. -+ Some potential Unicode-ANSI string conversion problems fixed. -+ Updated documentation. - -Release v3.6.0 of 26 May 2010 -+ Added support for emitting compiler directives to switch off specified warnings. This implement feature request #2994485 (see http://bit.ly/cxDJG4). -+ Preferences dialogue box updated: - - New "Code Generation" tab used to configure which if any warnings are to be inhibited. - - Renamed "Source Code" tab to "Code Formatting". -+ Added new tab to About Box that displays and enables exploration of some key directories used by CodeSnip. -+ Snippets editor now displays row and column occupied by text cursor. -+ Per user ini file format changed. It now supports code generation preferences. Ini file version updated to v6. -+ Installer updated: - - Ini files are stamped with correct program and ini file version information. - - Older versions (v1..v5) of per-user ini file are updated with default code generation preferences. - - Per-user ini file now stamped as v6. -+ Fixed numerous memory leaks. -+ Fixed some other potential and unreported minor bugs. -+ Some refactoring. -+ Updated help file re changes. - -Release v3.5.5 of 24 March 2010 -+ Fixes download stream read bug #2976048 (see http://bit.ly/ds6mBr). - -Release v3.5.4 of 18 March 2010 -+ Temporary fix for download error checking bug #2970055 (see http://bit.ly/cvf9Mm). -+ Fixed https protocol bug #2970896 (see http://bit.ly/bCIx38). - -Release v3.5.3 of 08 March 2010 -+ Fixed database download error checking bug #2964767 (see http://bit.ly/90vFfp). -+ Updated PayPal donations narrative on welcome page. - -Release v3.5.2 of 22 February 2010 -+ Changed database downloader to: - - Use web service's revised download file format - - Validate download data before updating local database. - - Provide better download error messages. -+ Fixed bug #2947794 in view link dialogue box (see http://bit.ly/beiZZ8). -+ Refactored some exception handling code. - -Release v3.5.1 of 09 February 2010 -+ New Unicode build of the program compiled with Delphi 2010. File I/O remains ANSI. -+ Windows NT is no longer supported. Windows 2000 is now the minimum OS. Set-up program changed to enforce this. -+ More rigorous enforcement of rules for REML tag attributes used in a snippet's Extra information. -+ Fixed a couple of minor UI problems in the Proxy Server and Trapped Bug Report dialogue boxes. -+ Minor changes to HTML and embedded browser code. -+ Some refactoring. -+ Updated documentation. - -Release v3.5.0 of 16 January 2010 -+ Overview pane can now be configured using Preferences dialogue box to start up with all sections collapsed. -+ Reference to ability to donate by credit / debit card removed from Donate dialogue box: now PayPal only. -+ Help file updated re above changes. -+ Minor refactoring of code that provides information about and renders source code comments. - -Release v3.4.8 of 10 January 2010 -+ Made some changes to key presses responded to by overview pane and fixed bug where Alt+F4 was not closing program when pane had focus. -+ Made some changes to hints displayed when rolling over links in compiler check pane. Also removed pop-up windows describing compiler errors. -+ Updated help file: noted Delphi 2010 compiler support and added new information about overview pane keyboard short-cuts. - -Release v3.4.7 of 31 December 2009 -+ Added IE version number to OS information submitted when program is registered. -+ Program now displays "[localhost]" in main window caption when started with -localhost switch. -+ All text edit controls in snippets editor now have custom pop-up menus and short-cuts for "cut", "copy", "paste", "select all" and "undo" now work. -+ Refactored code that supports use of fonts. -+ Updated privacy statement re registration changes. - -Release v3.4.6 of 18 November 2009 -+ Changed code that takes a security backup of main database during updates to store backup in a single file rather as separate files in a temporary folder. This should fix bug #2898687 (see http://bit.ly/bKg6oH). -+ Slightly modified user database backup file format to match that now used for main database backup. -+ Fixed potential bugs: - - Code that performs busy waits could have caused program to freeze. - - Negative numbers written to backup files were not being written correctly. - - A garbled error message was corrected. - -Release v3.4.5 of 09 November 2009 -+ Home, Ctrl+Home, End and Ctrl+End keys now work in overview pane and go to first and last item in tree view respectively per feature request #2888880 - see http://bit.ly/bgJCVU). -+ State of tree view in overview pane is now maintained after editing the user database: the tree is no longer always fully expanded after each edit. -+ Removed "Properties" button from print dialogue box along with associated dialogue boxes. This option has always been buggy. This "fixes" bug #2868706 (see http://bit.ly/9LArqI). -+ Fixed unreported makefile bug. - -Release v3.4.4 of 21 October 2009 -+ Changed bug reporting mechanism. Bugs are now reported via the on-line bug tracker. Bug report dialogues changed accordingly. Access to the old bug report web service was removed. -+ Added two new default syntax highlighter styles: "Visual Studio" and "No Highlighter". The latter switches off syntax highlighting. -+ Fixed bug no. 2882331 (see http://bit.ly/beArcC). This was a bug in the syntax highlighter that occurred when an unexpected character was encountered. -+ Updated help file re changes. -+ Some minor source code corrections. - -Release v3.4.3 of 19 October 2009 -+ User's OS is now reported and recorded when program is registered. -+ Text displayed in preview dialogue boxes can now be scrolled horizontally. -+ Added support for building source against later releases of Indy 10 components. -+ Help file and privacy statement updated. -+ Further updated third party GIF image handling code to latest release. -+ Some changes to source code project options. - -Release v3.4.2 of 10 October 2009 -+ Fixed bugs #2868706 (see http://bit.ly/9LArqI) and #2875857 (see http://bit.ly/bN4xqE) -+ Updated GIF image handling code. - -Release v3.4.1 of 29 September 2009 -+ All dialogue boxes that request a user's name and / or email address now remember the information last entered, to save retyping the same data. -+ Changed to use Indy Internet Components v10 instead of v9 for net access. -+ Refactored: - - Code that stores information about a user. - - Code that gets details of system folders on local system and other file system related code. -+ Updated privacy statement (text file and in help file). - -Release v3.4 of 24 September 2009 -+ Added support for Delphi 2010 to program. Can now test compile and display results with Delphi 2010. -+ Bug fixes: - - "Invalid cast" error that occasionally appears when a snippet is updated. - - Bug that kept backup files locked open after restoring a database backup. - - Current selection is now displayed in Alphabetic and Snippet Kind tabs of overview pane: previously all the database was shown, regardless of search. - -Release v3.3 of 21 September 2009 -+ Added support for user defined categories which can now be added, renamed or deleted. -+ Made changes to snippets editor: - - On the "Compile Results" Tab, a single simplified list box is now used to both display and change compile results. This replaces two linked controls. - - The text case of a snippet name can now be changed without causing a duplicate name error. - - Some controls resized. -+ Fixed bug where attempting to overwrite files that are in use caused the bug report dialogue box to appear instead of simply reporting the problem. -+ Improved validity checking of snippets that are included in generated source code. -+ Help file updated. -+ Refactored: - - UI handling code in snippets editor. - - Some Snippets database and validation code. - -Release v3.2.3 of 14 September 2009 -+ Fixed bug in "update from web" dialogue box where most up to date news item was not being displayed. -+ Dialogue boxes that that enable selection of categories and snippets by means of tree views and associated check boxes now sort categories by description. -+ Categories and snippet kinds displayed in the snippets editor are now sorted by description. -+ Refactored: - - Code that displays tree views in overview pane and snippet selection dialogues. - - Some list management code. - - Some snippets editor code. - -Release v3.2.2 of 08 September 2009 -+ Fixed bug in check list boxes where moving selection using keyboard causes check state to be toggled. -+ Custom colours used in colour dialogue, on syntax highlighter page of preferences dialogue box, are now persistent. -+ Re-implemented code that displays pop-up menus in detail pane, and fixed a minor glitch as a side effect. -+ Simplified code that manages help system. -+ Refactored code that manages and customises common dialogues. - -Release v3.2.1 of 24 August 2009 -+ Appearance of comments that appear at the top of generated source code was changed. -+ Slightly modified "license" that appears at the top of some generated units. -+ Information about contributor of imported code is now appended to snippet's "extra" information. -+ Added a garbage collector. -+ Changed size of About box - now wider and credits scroll boxes are now taller. Added credit for encryption code. -+ Fixed minor bug that could display a JavaScript error dialogue if an exception occurred in an action initiated by clicking a link in the main display. -+ Numerous refactorings. - -Release v3.2 of 17 August 2009 -+ Added facility for CodeSnip to use a proxy server when accessing the Internet. -+ Provided a new dialogue box to configure any proxy server. -+ Updated help file re proxy server support and configuration. -+ UI is no longer frozen while web services are executing requests. "Update from Web" dialogue box changed to indicate if cancel button pressed when a web request is executing. -+ Product version reported in generated source code header comments, splash screen and about box now includes any special build information. -+ Some minor code tweaks and refactoring. - -Release v3.1.1 of 15 August 2009 -+ Check list boxes throughout program changed so that clicking anywhere on an item toggles check state. -+ Button used to render and display extra information in snippets editor is now disabled when there is no extra information to display. -+ Made minor changes to layout of some dialogue boxes: replaced missing text in bug report dialogue box. -+ Some refactorings. - -Release v3.1 of 11 August 2009 -+ Added a button to the snippets editor to preview an HTML rendering of the mark-up entered as extra information. Includes facility to check any links in the mark-up. - -Release v3.0.5 of 21 July 2009 -+ Default font is now dependent on underlying OS: Vista - Segoe UI, XP/2000 - Tahoma, NT - MS Sans Serif. -+ Some dialogues and splash screen modified to accommodate OS font, in particular larger Vista font. Some also given a light makeover. - -Release v3.0.4 of 13 July 2009 -+ Added a snippet's category description to main display and to snippet information copied to clipboard or printed. Category description in main display can be clicked to display the category. -+ Refactored code that displays clicked routines and code that displays a snippet for editing. - -Unreleased v3.0.3 of 12 July 2009 -+ Refactored code: - - Rationalised some JavaScript code. - - Rationalised some dialogue alignment code. - - Changed some object types and class hierarchies. - - Added some automatic object lifetime management logic. - - Removed some duplicate code and merged some units. -+ Fixed an obscure bug in category code snippet generation as a side effect of refactoring. - -Release v3.0.2 of 08 July 2009 -+ Fixed broken link to CodeSnip database in welcome page. -+ Fixed bug in selection search that was selecting both user defined and main database snippets with same name if only one was selected. -+ Fixed bug where units required by constants and type definitions were not being added to generated units. - -Release v3.0.1 of 06 July 2009 -+ Added support for file:// protocol in links in a snippet's extra information. -+ Updated help file re changes to extra info. -+ Updated exported code and user database file formats to v4 to accommodate revised extra information, although we now save data in v3 format if possible. - -Release v3.0 of 29 June 2009 -Changes relate to v2.4.1 -+ Added support for constants and type definition snippets: there are now four types of snippets - routines, constants, types and free-form (which don't conform to any format). Free-form snippets cannot be included in generated units. -+ Further formatting instructions added to the active text used in database's Extra information field. Also added a contributors field to database. -+ Three predefined syntax highlighters are now provided, with default changing to Delphi 2006 default style. Syntax highlighting used in main display is now customisable. Highlighter keyword list updated. -+ Main display changed: - - Test unit is no longer displayed in compiler check pane: it's now displayed in a dialogue box. - - Compiler check pane's font changed to true type, with face depending on OS. - - Information pane now hides compiler table when a free-form snippet is displayed. - - Compiler check pane now displays special "not available" pages when no compilers installed or a free-form snippet or a section header is selected. - - "Uncategorised" tab removed from overview pane and replaced with new "Alphabetical" tab that groups snippets by initial letter and "Snippet Kind" tab that groups snippets by kind. - - "Section" nodes in overview pane can now be expanded and collapsed: pane now has toolbar to perform these actions. - - "Edit snippet" links displayed in information pane are now also displayed in compiler check pane. - - Information about snippet type added to information pane. - - Context menu added to overview pane. - - Some changes to menu glyphs and short-cut keys. - - Welcome display modified and now has a link to the donate dialogue box. -+ Added option to copy an snippet's source code to clipboard in text and RTF formats. -+ Exporting and copying of snippets complete with descriptions and cross references is restricted to routines: not supported for free-form, types and constants. -+ Improved detection of invalid dependencies in snippets, including circular dependencies, and provided option to view all dependencies for any snippet from main window and snippets editor. -+ Revised content of many dialogue boxes etc to refer to "snippets" instead of "routines" where necessary. -+ Changed format and location of user-defined database and format of exported and submitted files. -+ Added new "Imported Snippets" category that receives imported routines: they were formerly imported into the "User Defined" category -+ Modified code that reads main database to deal with revised file format for new snippets types and introduction of pre-processor instructions to enable retrofitting of new snippets without breaking earlier versions of CodeSnip. -+ Changed name and location of user preference configuration file. -+ Revised external object that communicates with JavaScript in browser controls. -+ Updated program credits in about box, restyled and widened it. -+ Changed size of preferences dialogue box and revised syntax highlighter tab. -+ Changed captions in preview dialogue box. -+ Changed appearance of splash screen. -+ Modified snippets editor to work with new snippet types, improved error checking code and prevented test compilation of free-form snippets. -+ Speeded up loading of main database. -+ Added an Easter egg! -+ A few refactorings. -+ Fixed several bugs: - - Bug in backup files including database files larger than 32Kb was fixed. - - Bug in history list following editing user defined snippets fixed by clearing list after snippets have been edited. - - Imported user defined routines no longer forget any dependencies on main database snippets. - - Occasional bug in displaying test unit fixed by displaying test unit in dialogue box instead of main display. -+ Modified installer re new folder structure and copying over data from previous versions. -+ Revised help file to reflect changes. Added new main contents "chapter" about the various snippet types. diff --git a/Docs/ChangeLogs/ChangeLog-v4.txt b/Docs/ChangeLogs/ChangeLog-v4.txt deleted file mode 100644 index 1a41d82c4..000000000 --- a/Docs/ChangeLogs/ChangeLog-v4.txt +++ /dev/null @@ -1,560 +0,0 @@ -; ------------------------------------------------------------------------------ -; This Source Code Form is subject to the terms of the Mozilla Public License, -; v. 2.0. If a copy of the MPL was not distributed with this file, You can -; obtain one at http://mozilla.org/MPL/2.0/ -; - * Copyright (C) 2012-2020, Peter Johnson (gravatar.com/delphidabbler). -; -; Change Log for CodeSnip Release 4 -; ------------------------------------------------------------------------------ - -Release v4.15.1 of 22 September 2016 -+ Updated OS detection code to detect Windows 10 Version 1607 (Anniversary update) and all technical previews of Windows 2016 Server to date. - -Release v4.15.0 of 13 July 2016 -+ Added support for test compilation with, and detection of, Delphi 10.1 Berlin compiler. -+ Tweaked size of compiler list in Configure Compilers dialogue box to accommodate length of Delphi 10.1 Berline compiler name! -+ Updated documentation re changes. -+ Updated help file re changes. - -Release v4.14.0 of 19 March 2016 -+ Changes to About Box's "Paths" tab: - - Added new buttons to display the contents of the system and per-user config files. - - Renamed tab as "Paths & Files". -+ Implemented feature request #83 (https://sourceforge.net/p/codesnip/feature-requests/83/) to enable the name and port of any web service test server to be passed on command line by using the new "--test-server" command line option. This replaces hard-wired test server name & port that was activated using the now removed "-localhost" command line switch. -+ Fixed bug #96: "Some open / save dialogues too small" (https://sourceforge.net/p/codesnip/bugs/96/). The height of customised dialogue boxes was increased. -+ Updated operating system detection code to detect Windows 10 TH2. -+ New photo of Sophie the dog added to the Easter egg slide show! -+ Updated help file re About Box changes. - -Release v4.13.2 of 20 February 2016 -+ Updated and corrected hints displayed in main window. -+ Changed some menu options and associated dialogue box captions. -+ Tweaked some button captions in Select Snippets dialogue box. -+ Updated help file re the menu and caption changes. -+ Updated copyright date in program license as displayed in help, about box, installer and documentation. - -Release v4.13.1 of 29 September 2015 -+ Improved operating system detection to detect Windows 10. -+ Modified program's manifest to declare it compatible with Windows 8 to 10. -+ Code that determines which system font to use no longer depends on OS version but simply on font availability. -+ Updated copyright date in program license as displayed in help, about box, installer and documentation. - -Release v4.13.0 of 5 September 2015 -+ Added support for test compilation with, and detection of, Delphi 10 Seattle compiler. -+ Made some minor changes to method used to build required type library to remove dependency on the MS MIDL compiler, greatly simplifying build process. -+ Updated documentation re changes. -+ Updated help file re changes. - -Release v4.12.0 of 6 May 2015 -+ Added support for test compilation with, and detection of, Delphi XE8 compiler. -+ Updated documentation re changes. -+ Updated help file re changes and fixed some spelling mistakes. - -Release v4.11.1 of 26 October 2014 -+ Corrected an erroneous error message that is displayed when circular snippet references are detected in the snippets editor (no bug report filed). -+ Corrected some spelling errors in UI. -+ Some documentation corrections. - -Release v4.11.0 of 25 September 2014 -+ Changes re licensing of snippets from online Code Snippets Database under MIT license: - - Generated code now carries a reference to the MIT license where relevant. - - Submit Snippets wizard has a new page where user must confirm that any submitted snippets may be MIT licensed. - - "About the Database" of the About Box now refers to the license. - - Documentation and help file updated accordingly. -+ Now uses version 6 of the Code Snippets Database update web service which supports the downloading of category and source code files larger than 32Kb. -+ The undocumented -localhost command line option now causes CodeSnip to expect web services to be on localhost port 8080 instead of port 80. This change has no effect on normal operation and is used only in testing. -+ Minor layout tweaks in in Display tab of Preferences dialogue box. -+ Minor changes to help file and documentation. - -Release v4.10.0 of 12 September 2014 -+ Added support for test compilation with, and detection of, Delphi XE7 compiler. -+ Updated documentation re changes. -+ Updated help file re changes. - -Release v4.9.0 of 30 April 2014 -+ Added support for test compilation with, and detection of, Delphi XE6 compiler. -+ Updated documentation re changes. -+ Updated help file re changes. - -Release v4.8.7 of 06 March 2014 -+ Fixed automatic update checker so that it correctly records last update date. This fixes bug #93 (http://bit.ly/NmSQUt). -+ Updated to use v2 of the DelphiDabbler CodeSnip update web service when checking for availability of program updates. -+ Minor corrections to help file. - -Release v4.8.6 of 28 February 2014 -+ Improved operating system detection to handle Windows 8.1. -+ Added compatibility section to application manifest that declares the program has been tested with Windows Vista and Windows 7. - -Release v4.8.5 of 13 January 2014 -+ Fixed bug #91 "Generated units won't compile on Delphi XE5" (http://bit.ly/1eBjym2). Compiler directives that are used to change compiler warnings now includes a conditionally compiled $LEGACYIFEND ON directive. -+ Fixed potential bug when checking for the existence of files. It had been possible that a "sym-link" to a file could give misleading results. -+ Updated program copyright date in license file, about box, help file and installer. - -Release v4.8.4 of 28 November 2013 -+ Improved user interface of SWAG Import Wizard. -+ Renamed "Save Snippet" and "Copy Snippet" menu options to "Save Annotated Source" and "Copy Annotated Source". This fixes bug #90: " Wrong caption on menu option for copying category to clipboard" (http://bit.ly/ImA398). -+ Revised and corrected numerous main menu and pop-up menu hints. -+ Updated help file re changes to menu options and SWAG Import Wizards. - -Release v4.8.3 of 06 November 2013 -+ Fixed registry access code so that the 64 bit view of the registry is used when CodeSnip runs on a Windows 64 bit operating system. -+ Changed to avoid use of a deprecated API call when using the Windows Browse for Folder dialogue box. -+ Updated documentation. - -Release v4.8.2 of 30 October 2013 -+ Modified Syntax Highlighter tab of Preferences dialogue box so that "vertical" fonts (whose names begin with "@") no longer appear in list of available fonts. -+ Fixed potential bug in operating system detection code that may fail on Windows 2000. - -Release v4.8.1 of 18 September 2013 -+ Removed "File | Page Setup" menu option because some settings made there were being ignored when a file was printed. This is a fix for bug #89 "Setup selections not being remembered" (http://bit.ly/1a3V94x). -+ Updated help file re changes. - -Release v4.8.0 of 12 September 2013 -+ Added support for Delphi XE5 compiler. -+ Fixed bug in code that reads or imports user database files written using CodeSnip 3 where Delphi XE4 compile results would be lost. -+ Updated documentation re changes. -+ Updated help file re changes. - -Release v4.7.2 of 27 August 2013 -+ Fixed bug #88 "SWAG Import Wizard display bug" (http://bit.ly/15ryOxz) where duplicate snippets could be displayed on the "Ready to import" page in certain circumstances. - -Release v4.7.1 of 18 August 2013 -+ Fixed bug where right clicking a tab in the detail pane sometimes caused the contents of the pane to be temporarily blanked out while the context menu was displayed. - - This fix also, as a side effect, fixed bug #87 "Tab headings and contents don't match after a tab is closed." (http://bit.ly/15TD197). - -Release v4.7.0 of 31 July 2013 -+ Implemented feature request #71 "Support importing of one or more snippets from the SWAG database" (http://bit.ly/18AFlGu): - - Uses DelphiDabbler SWAG web service to get SWAG data. - - New wizard to permit user to select required SWAG snippets. This is accessible from the new "Snippets | Import Snippets From SWAG" menu option. - - Snippets are imported into a new "SWAG Imports" category. -+ Implemented feature request #80 "Enable detail pane tabs to be re-ordered" (http://bit.ly/13cbjTZ). -+ In detail pane source code and compiler table now display horizontal scroll bars if they do not fit within the width of the pane. This implements feature requests #60 (http://bit.ly/17iCzT4) and #61 (http://bit.ly/1coDJ5f). -+ Minor changes to dialogue box that appears during long operations. -+ Fixed bug #86 "Snippets are sorted by snippet name in snippet table listings in detail pane" (http://bit.ly/17iD27H). -+ Fixed a few code errors that could have surfaced as bugs. -+ Modified how HTML based detail pane display is generated and displayed. -+ Some refactoring. -+ Updated some 3rd party code to latest available versions. -+ Updated help file re changes. -+ Updated privacy statement. - -Release v4.6.4 of 24 July 2013 -+ Fix for IE 9 related browser control script bugs introduced in v4.6.3 when IE 10 bugs were fixed: - - Bug #84 "Script errors on startup" (http://bit.ly/13bfaAL). - - Bug #85 "Check For Updates link " (http://bit.ly/1656pgE). - -Release v4.6.3 of 14 July 2013 -+ Further fix for IE 10 related bug #75 "Floating point error in 4.4.1" (http://bit.ly/12zAWSp). Re-implemented method used to display content in main window's detail pane using the IE web browser control. - -Release v4.6.2 of 09 July 2013 -+ Tentative fix for bug #83 "Error when the main form is shown" (http://bit.ly/12eUV5Y) that has been reported on Windows 8. The fix is tentative because the bug hasn't been reproduced. - -Release v4.6.1 of 01 July 2013 -+ Provided fix for reported bug #75 "Floating point error in 4.4.1" (http://bit.ly/12zAWSp) that apparently affects Windows 8, probably with IE 10 installed. -+ Fixed unreported bug where IE 10 browser was being reported as IE 9. -+ Fixed potential bug in code that processes class / advanced record snippet types ready for test compilation and inclusion in generated units. - -Release v4.6.0 of 02 June 2013 -+ Added new options to "Find Cross References" dialogue box to allow snippets that either cross reference or depend upon the selected snippet to be included in the search. This implements feature request #30 (http://bit.ly/13cYImA). -+ Added a new "Select and Close" button to the Dependencies dialogue box that causes the snippets displayed on the current tab to be selected in the main display. This implements feature request #77 (http://bit.ly/15s8fH2). -+ The background colour of source code displayed in the main display can now be customised via a new option on the Display tab of the Preferences dialogue box. This implements feature request #36 (http://bit.ly/17fxMGW). -+ CodeSnip now compiled with Delphi XE. -+ Per-user configuration file format changed to v15 which is not entirely compatible with previous versions of CodeSnip. -+ Updated help file re changes. - -Release v4.5.1 of 15 May 2013 -+ Added progress bars or marquees to several database operations that can take a long time on slower storage devices, i.e.: - - When local files are being updated after downloading an updated database in the Update From Web dialogue box. This fixes bug #79 (https://sourceforge.net/p/codesnip/bugs/79/) - - When the local database is being saved. - - When the local database is being backed up or restored. - - When the local database is being moved to a new location. -+ The user database can now be relocated to a network drive. This fixes issue #81 "Move database to a network drive" (https://sourceforge.net/p/codesnip/bugs/81/). -+ Fixed issue #80 "HTML output bug" (https://sourceforge.net/p/codesnip/bugs/80/). -+ Fixed minor alignment bug that occurred when displaying a wait dialogue box over the main window. -+ Some refactoring. -+ Updated help file re changes. - -Release v4.5.0 of 02 May 2013 -+ Added support for Delphi XE4 compiler. Implements feature request #78 (http://bit.ly/10uGhoD). -+ Updated documentation re changes. -+ Updated help file re changes. - -Release v4.4.2 of 26 April 2013 -+ Fixed bugs: - - #76 (http://bit.ly/12Loz5o) - An advanced record snippet with a method name that clashes with a directive is not test compiling correctly. - - #77 (http://bit.ly/11I9wXI) - Syntax highlighter highlights "contains", "requires" and "package" directives when used in method names. - - #78 (http://bit.ly/ZQl3T4) - CodeSnip doesn't restore window in correct position when task bar on left or top of screen. - -Release v4.4.1 of 09 April 2013 -+ Fixed bug #73 "Attempting to check for program updates returns a 404 'Not found' error" (http://bit.ly/Yf3UGy) - this error happened only when using remote server, not localhost test server. - -Release v4.4.0 of 08 April 2013 -+ Implemented feature request #75 "Check for updates on start-up" (http://bit.ly/ZJ8OGH): - - CodeSnip checks for both program and Code Snippets Database updates in low priority background threads that run when the program is first started. - - Update checking takes place at intervals between once per day and once per month. - - A new "Updates" tab was added to the "Preferences" dialogue box where update frequencies can be chosen, or the auto-update feature switched off. Program and database update checking can be configured individually. - - Updates are notified via a new slide-in, slide-out notification window that is displayed for a fixed amount of time or until closed by the user. The notification window contains a button that can be used to initiate the appropriate update. For database updates the "Update From Web" dialogue box is opened while for program updates a suitable download web page is displayed in the default browser. - - Program checking is edition specific, i.e. the standard edition checks for standard edition updates and the portable edition behaves similarly. -+ A new "Update Checks" section was added the welcome screen that gives information about the current auto-update settings and provides a link to change them. Some other text on the screen was tweaked. -+ The "Check For Program Updates" dialogue box now opens the correct version and edition specific web page to download the latest version of CodeSnip instead of simply opening a general download page. -+ A new CodeSnip specific program update web service on the codesnip.delphidabbler.com sub-domain is now used to get information about CodeSnip updates instead of the generic update service on delphidabbler.com. -+ Additional usage information is now sent to the DelphiDabbler Code Snippets database update web service. -+ Some refactoring and code clean-up. -+ The installer may now display an information page that describes the new automatic update checking feature. This page is displayed only when updating from v4.3.0 or earlier to v4.4.0 (or later). -+ Updated help file: - - Updated and added help topics for all new features of the release. - - Updated "What's New" topic re new features. -+ Updated documentation, including privacy statement, with information about automatic update checking. -+ Per-user configuration file format changed to v13 which is incompatible with previous versions of CodeSnip. - -Release v4.3.0 of 27 February 2013 -+ Implemented feature request #40 "Add 'Namespaces' tab to Configure Compilers dialogue box" (http://bit.ly/12XsX32). The new tab appears only for Delphi XE2 and later and obviates the need to manually create -NS commands for passing to the compilers. Suitable default namespaces are provided if none have been configured. -+ Implemented feature request #70 "Let user specify location of user database" (http://bit.ly/13aNCQZ). This feature is accessed from the new "Move Use Database" option on the Database menu. NOTE: The feature is not available in the portable edition which is designed to keep the user database together with the program. -+ Implemented feature request #69 "Enable custom syntax highlighter styles to be saved" (http://bit.ly/XQHkOI). The Syntax Highlighter tab of the Preferences dialogue box has been modified to enable custom syntax highlighter attributes to be saved under a given name and existing named styles to be used or deleted. -+ Changed name of "Delphi 2006" predefined syntax highlighter to "RAD Studio". This remains the default highlighter. -+ A little refactoring. -+ Enlarged Configure Compilers dialogue box. -+ Updated help file: - - Updated and added help topics re all new features in the release. - - Updated "What's New" topic re new features. - - Removed help topic for "Browse For Folders" dialogue box accessed from Search Paths tab of Configure Compilers dialogue. -+ Per-user configuration file format changed to v12 which is not fully compatible with previous versions of CodeSnip. -+ Updated documentation. - -Release v4.2.1 of 14 February 2013 -+ Bug fix: changed Favourites dialogue to display snippet display names instead of unique names. Fixes bug #72 (http://bit.ly/Vj6ZCM). -+ Updated program copyright date in About box. - -Release v4.2.0 of 07 February 2013 -+ Added support for "favourite" snippets. Implements feature request #37 (http://bit.ly/12unShW): - - Any displayed snippet can be flagged as a favourite via a menu option or toolbar button. - - A new non-modal dialogue box can now be displayed alongside the CodeSnip window for easy selection and management of favourite snippets. -+ Changes to Duplicate Snippets dialogue box: - - Display name of duplicate snippet can be edited. Implements feature request #64 (http://bit.ly/14TdUGF). - - Snippets Editor can be opened immediately the Duplicate Snippet dialogue box closes to edit the duplicated snippet. Implements feature request #65 (http://bit.ly/UBlt2Y). -+ Status bar changed: first panel now displays no category information, but displays both total number of snippets and number of snippets in each database. -+ Fixed unreported bug in save dialogue boxes where overwrite permission requests could be displayed erroneously. -+ Program closes gracefully if run on unsupported versions. -+ Updated some 3rd party code to latest available versions. -+ Some refactoring. -+ Per-user configuration file format changed to v11 which is not fully compatible with older versions of CodeSnip. -+ Updated help file re changes in Duplicate Snippets dialogue box and addition of support for Favourites. -+ Updated documentation. - -Release v4.1.1 of 30 January 2013 -+ Fixed bugs: - - #68 (http://bit.ly/WxG6LC): Comments missing in unit / code generation for some types. - - #70 (http://bit.ly/WAYEHN): Changing syntax highlighter font has no effect in main display. - - #71 (http://bit.ly/14v9i9v): Option to select monochrome printing not working properly. - - Unreported: Changing syntax highlighter font has no effect when printing or when copying text to clipboard as RTF (related to bug #70). -+ Updated help file re syntax highlighter changes. - -Release v4.1.0 of 06 January 2013 -+ This is the first non-beta release to made available in both standard and portable editions, compiled from a common code base. The portable edition differs from the standard as follows (as per release v4.0.1 portable beta 1): - - Executable file name is CodeSnip-p.exe. - - Program caption identifies program as portable version. - - Data directories are sub-directories of executable program directory. - - Common file dialogue boxes default to program's working directory. - - First run processing does not give the option to import old settings or existing user databases. - - Different version information and program identifier. - - There is no set up program. -+ Changes to snippets editor: - - Added context menus to cross-references and dependencies check box lists. Both have menu item to clear list. Dependencies list has item to view dependencies. Implements feature request #3560960 (http://bit.ly/U83Swh). - - Deleted "View Dependencies" button now that its functionality is now on context menu. - - Enlarged various controls on all except "Code" tab. - - Units listed on "References" tab is now persistent. Units can be removed, defaults restored and selection cleared via a new context menu. Implements feature request #3560962 (http://bit.ly/UM0c0B). -+ New source code formatting option added to only use first paragraph of a snippet description as snippet comment in generated code. This is configured via "Code Formatting" tab of "Preferences" dialogue box and / or from relevant "Save" dialogue boxes. Implements feature request #3560647 (http://bit.ly/UQrDax). -+ Changed mini-toolbar in overview pane to expand / collapse all overview tree view instead of just selected node. Implements feature request #3560646 (http://bit.ly/UOUQTr). -+ Reimplemented database search engine. -+ Some external links modified that will seamlessly accommodate future changes in destination URLs. -+ Changed some glyphs used in menus. -+ Per-user configuration file format changed: bumped file version to 10. -+ Some refactoring. -+ Help file updated re changes & added privacy statement to TOC. -+ Updated documentation: - - Re changes to source code repository and bug / feature request trackers. - - Re portable version. - -Release v4.0.2 of 17 December 2012 -+ Improvements to keyboard handling: - - Fixed some keyboard focus bugs. - - Fixed broken, missing and duplicate Alt-key short-cuts in several dialogue boxes. - - Fixed broken keyboard access to list view in Code Generation tab of Preferences dialogue box. -+ Corrected an incorrect font in Compilers dialogue box. -+ Added title to "View Link" dialogue box displayed from mark-up editor. -+ Corrected error in "Submit Code to the Database" task help topic. - -Release v4.0.1 portable edition, beta 1 of 12 December 2012 -Internal CodeSnip version 4.0.1.213 -+ Modified version of Release v4.0.1 that can run from a writeable removable medium without writing files or registry on host computer. This implements feature request #3577431 (http://bit.ly/UxvUj0). -+ Changes that apply only to portable version: - - Changed executable file name to CodeSnip-p.exe. - - Program caption changed to identify as portable version. - - Data directories changed to be sub-directories of executable program directory. - - Changed common file dialogue boxes to working directory by default. - - First run processing no longer gives option to import old settings or existing user databases. - - Different version information and program identifier format. - - No set up program. -+ Code base modified to conditionally compile either portable or standard edition. -+ Updated documentation, including privacy statement. - -Release v4.0.1 of 08 December 2012 -Internal CodeSnip version 4.0.1.212 -+ Fixed bug #3578652 (http://bit.ly/RXIwBC): "Pre-processor directive errors in main db ini files" by removing support for problematic directives. -+ Rolling mouse over links in detail pane no longer displays a hint in the status bar. This change fixes bug #3577407 (http://bit.ly/VeSVGg): Clicking detail pane snippet link leaves hint in status bar. -+ Windows no longer scale automatically when screen DPI differs from that on design system. This fixes bugs #3591818 (http://bit.ly/TvNaUL) "Strange window behaviour in Windows 7" and bug #3591820 (http://bit.ly/SEH6dO) "Incorrect font size used for some bold text". -+ Update operating system detection code to detect W0ndows 8 & 2012 server. -+ Some refactoring and some redundant code removed. -+ Updated documentation. -+ Updated help topic that describes main display. - -Release v4.0.0 of 12 October 2012 -Final v4 release. -See also changes from alpha, beta and release candidates below for details of changes since v3.9.3. -+ New glyphs that describes level of testing applied to snippets from online Code Snippets Database now appear in top right of detail pane. -+ Changed main window caption and task bar entry to include version number "4" after program name. -+ Fixed bugs: - - #3572382 (http://bit.ly/OnEtNY): Automatic conversion of blank lines to paragraphs in REML mark-up editor gets confused if block level tags are already present. - - Unreported: Controls in News dialogue box do not use correct font. -+ A little refactoring. -+ Updated help file: - - Modified re recent changes - - Added new "What's new" topic giving details of changes in v4. Implements feature request #3567490 (http://bit.ly/RgQx0W). - - Renamed "Welcome" page as "Overview". -+ Updated documentation, including read-me file. - -Release v4.0 RC 3 of 18 September 2012 -Internal CodeSnip version 3.999.3 -+ Fixed serious bug #3568628 (http://bit.ly/V5NX0H): "CodeSnip faulting at startup after fresh install with no previous v3 installation". - -Release v4.0 RC 2 of 17 September 2012 -Internal CodeSnip version 3.999.2 -+ Fixed serious bug #3568515 (http://bit.ly/Oy2Q7g): Duplicating a snippet with a display name causes crash. -+ Minor update to licensing information and about box credits. - -Release v4.0 RC 1 of 14 September 2012 -Internal CodeSnip version 3.999.1 -+ UI changes: - - Welcome page completely revised. Instead of a program overview the page now describes the state of the databases and available compilers and displays help links and a donation request. There are also some links to the about box, news and program updates. - - Many changes to glyphs used in menus and toolbar. - - Removed some images that relate to trade marks, i.e. PayPal Donate button and Delphi compiler icons. - - No clicking noise is now issued by UI in response to user interaction with Details pane. - - Links to external commands and to other snippets re-styled. - - Revised and updated program's main icon. -+ Fixed bug #3566426 (http://bit.ly/OmbwTB): About Box Paths Page displays wrongly when themes not available. -+ Added support for Delphi XE3 compiler. Implements feature request #3566346 (http://bit.ly/SIVpS2). -+ Completely new Easter Egg. -+ Refactoring and internal code changes, including a revision of the "external" object that communicates with JavaScript in browser controls. -+ Changed License: - - EULA for executable code changed to Mozilla Public License v2.0. - - Most original source code changed to Mozilla Public License v2.0 from v1.1. - - Only an abbreviated version of the license is now displayed by the installer and in the help file. - - License information has been consolidated into a new file: License.html. -+ About box changed re new license and changes in required and voluntary acknowledgements and credits. -+ Help file updated. -+ Documentation updated. - -Release v4.0 beta 2 of 25 August 2012 -Internal CodeSnip version 3.99.2 -+ Bug fixes: - - #3556620 (http://bit.ly/Mq1Khh): Serious flaw in generating units containing class types when the classes contain method types other than procedure or function. - - #3556713 (http://bit.ly/RIzfvQ): Context menus are not displayed when pressing Alt+F10. - - #3556715 (http://bit.ly/O3QN0u): Deleting a category then returning to it via the history list causes a GPF. - - #3556718 (http://bit.ly/RVanCE): Inconsistent context menus for edit controls in Snippets Editor. - - #3557107 (http://bit.ly/PfiYxm): New snippets and categories are not added to the history list. - - #3558649 (http://bit.ly/PAXLQv): Closing the Preferences dialogue always refreshes the main display even if the dialogue box was cancelled or if nothing was changed. - - #3559156 (http://bit.ly/TKXYQ7): "Previews" giving examples of the effect of changes made in the Preferences dialogue box sometimes disappear when the tab key is pressed. - - #3559239 (http://bit.ly/Pm1HU4): Snippet names and display names are used inconsistently in the UI. - - #3559257 (http://bit.ly/Qc8Fqu): Compile Results displayed from the main menu can get out of sync with the actual compile results of snippets that have been edited since they were last compiled. - - #3559265 (http://bit.ly/NvV9iH): Viewing dependencies for an unnamed snippet or a snippet not in the database causes a GPF. - - #3559266 (http://bit.ly/S69wO2): When include files are generated for a snippet that depends on a class type, the required class is not listed in the file's header comments. - - #3560317 (http://bit.ly/PUcEgV): The caption of the Active Text preview dialogue box refers to "Extra" text when it is used to preview a snippet's description. - - #3560521 (http://bit.ly/RG7Jlw): The state of the Overview tree often doesn't restore correctly after a database update. - - #3560958 (http://bit.ly/TX7M9V): Snippets are not sorted correctly (i.e. on display name) in the Overview pane. - - #3561014 (http://bit.ly/PEFgXY): The current view in the Display pane is not cleared, even though all tabs are closed, when the database is re-loading. - - #3561047 (http://bit.ly/Pf5L5v): The Category view in the Overview pane sometimes appears fully expanded when it is expected to be fully collapsed. - - Untracked: Removed "(v4 preview)" text that had been left in main window title bar. - - Untracked: Minor accelerator key related problems in the Preferences dialogue box. -+ Main UI changes: - - The Detail pane tab-set now has a context menu that can be used to close the current tab or all but the current tab. The Close tab option is also added to current view's context menu. - - Right-clicking a tab in the Overview or Detail pane now selects the tab. - - Middle-clicking an item in the Overview pane now selects it. Previously middle clicks were ignored. - - Many more parts of the main display and dialogue boxes now display display names for snippets rather than unique names. - - Ctrl clicking snippet and category links in the Detail pane and History UI controls now opens the chosen item in a new tab. Implements feature requests #3559377 (http://bit.ly/OqnAjd) and #3559378 (http://bit.ly/NPtEkX). - - Different link styles are now used for the different types of link in the Detail pane. Implements feature request #3559464 (http://bit.ly/Pwsqg6). - - Pressing Ctrl+Return on an active snippet or category link in the Details pane now opens the item in a new tab instead of the current tab. Pressing Return now opens the item in the current tab. - - The Detail pane's context menu now displays more options when text selections and links are right clicked. Implements feature request #3559375 (http://bit.ly/NzaY8a) with some minor differences. - - New button added to the Display tab of the Preferences dialogue box that resets default snippet heading colours. Implements feature request #3559140 (http://bit.ly/QKQo43). - - The "Types" unit is now displayed by default in the Snippets Editor Reference Tab's predefined units list. -+ When a category is printed, any URLs in snippet descriptions are output and styled. -+ Names of units referenced by snippets may now contain dots. -+ Some refactoring and internal code changes, including a major reworking of the "first run" program configuration and a revision to the "external" object that communicates with JavaScript in browser controls. -+ Help file updated: - - Re UI changes. - - With a description of the need to configure namespaces for Delphi XE2 for each unit referenced by the code it is test compiling - addresses bug #3536531 (http://bit.ly/Q2bcmY). -+ Updated documentation. - -Release v4.0 beta 1 of 11 August 2012 -Internal CodeSnip version 3.99.1 -+ New features: - - Structure of snippet pages in details pane is now customisable: various page elements can be omitted and order of elements can be specified. Each snippet type has its own page customisation. Implements feature request #3519456 (http://bit.ly/NhT8Kr). - - Snippets can now have a "display name" that can contain any characters and does not need to be unique. When provided the display name is displayed in preference to the normal name. Implements feature request #3519460 (http://bit.ly/NN6kRP). - - Snippet descriptions can now be formatted and contain multiple paragraphs. This implements feature requests #3411890 (http://bit.ly/OS8a5a) and #3520405 (http://bit.ly/OS8yRe). - - Snippets can now be configured so that their source code is not syntax highlighted. This change allows snippets in other languages not to be highlighted as if they are Pascal. Implements feature request #3519935 (http://bit.ly/LrNiAg) - - Colour of headings for snippets and categories from main and user databases are now user configurable. This implements feature request #3519463 (http://bit.ly/Nz9JH2). - - User can now limit the number of compilers that appear in the compiler results table in the display pane. This is done via the Configure Compilers dialogue box. Implements feature request #3519459 (http://bit.ly/Q5O51z). - - New option on Tools menu that checks availability of new versions of CodeSnip. -+ User interface changes: - - "Test Compile" link removed from snippet display in details pane. - - "Test Compile" dialogue box changed so that only the installed compilers that CodeSnip uses for test compilation are displayed, instead of all known compilers. - - Welcome page revised. -+ Changes to snippets editor: - - New field on Code tab to enter optional snippet display name. - - New check box on Code tab to specify if Pascal syntax highlighter is to be used for source code. - - New tabbed "mark-up editor" lets user enter multi-paragraph snippet descriptions and extra information either as plain text or as REML mark-up. - - Controls on Code tab re-ordered. - - Extra Information tab revised with much larger edit control and deletion of explanatory text. - - Editor enlarged. -+ Changes to Preferences dialogue box: - - New "Snippet Layout" tab added where composition and layout of snippet pages can be customised. - - "General" preferences tab split into two: "Misc." that contains only measurement units and "Display" that contains display related options. - - Added controls to "Display" tab to set main and user database heading colours. - - Changes that affect appearance of content of details pane are now reflected in the display as soon as the Preferences dialogue box closes, rather than on program restart. -+ Changes to REML mark-up handling: - - Any REML text not embedded in block level tags is now automatically wrapped in

    tags. - - Nested REML block level tags are no longer allowed. - - Changed handling of multiple spaces in REML code to be the same as in HTML. - - Formatting of REML code improved when re-displayed. -+ Bug fixes: - - Bug #3536331 fixed (http://bit.ly/KQTYc3): words at the end of some paragraphs in a snippet's extra information were not being found in "whole word only" searches. - - Fixed unreported file parsing bug that occurred when loading a saved snippet selection from disk. -+ Changed Delphi compiler detection so that compilers can be detected by examining current user registry key in addition to local machine registry key. This enables Delphis that were installed for a given user only to be detected. -+ Improved error handling when reading and writing snippet selection files. -+ User database and export file formats updated to v6. -+ Per-user configuration file format changes: bumped file version to v9. -+ Major changes to installer: - - Now always brings forward any earlier common configuration files if needed. - - Per user configuration files are now ignored: they are handled by main program (see below). - - Only main database, not user database, is now imported from earlier versions on user request. User databases are now handled by main program (see below). - - There is no longer an option to delete old databases or configuration files. - - Updating from a v4 preview (alpha) release causes an extra page to be displayed that gives instructions relating to updating from preview to current release. -+ Program now detects if it is running for first time since updating: - - If this is first run since updating from v3 or earlier a "first run" wizard guides user through importing any old preferences or user databases. - - For point v4.x point updates user configuration file is silently updated as necessary. -+ Significant refactoring. -+ Updated help file in line with changes and new features. -+ Updated documentation, including minor changes to privacy statement and license. - -Release v4.0 alpha 3 (preview) of 18 June 2012 -Internal CodeSnip version 3.98.3 -+ New features: - - Compiler warnings can now be switched on as well as off in generated code. - - Names and descriptions of snippets in a category can now be printed. - - Text and compiler searches can now be nested so that the later search refines the earlier one. - - Current selection (i.e. search result set) can be saved to disk and loaded again later. -+ User interface changes: - - Overview pane now displays buttons that can be used to collapse or expand non-empty section headings. - - Ctrl + arrow keys can now be used to scroll overview pane tree view vertically and horizontally without changing selection in overview pane. - - Main window is now refreshed whenever changes that affect it are made in the Preferences dialogue box. - - Some main menu short-cut keys changed. - - Dependencies dialogue box now has two tabs: the first displays the snippets required to compile the selected snippet while the second tab displays snippets that depend upon the selected snippet. - - Code Generation tab of Preferences dialogue box updated to enable warnings to be switched on or off. In addition default warnings can be restored, list view columns can be sorted and Alt key short-cuts tweaked. - - Code Import dialogue box improved: now sorts imported units in list view and scrolls to make renamed snippets visible. - - Snippet selection and cross-reference search dialogues now report if existing search results will be overwritten. - - Text and compiler search dialogues now ask if any current search results are to be refined. - - Tree views in Snippet Selection, Snippets export and Snippets submission dialogue boxes can now be expanded and collapsed. - - Appearance of message boxes tweaked. - - Program tab of About box updated with credits for new third party code. -+ Bug fixes: - - Error in logic of code that generates program ID was fixed. - - Bug #2868708 fixed (http://bit.ly/KeyAvS): edited snippets are no longer lost from manual snippet selections unless snippet names are changed. - - Bug #3534138 fixed (http://bit.ly/Mg9gJG): details pane display is now cleared when last tab is closed: previously content of last closed tab remained on screen. -+ Info about user's OS and IE version is now sent to web server during online database updates. -+ Some refactoring. -+ Help file updated in line with changes and new features. Some US English spellings changed to UK English for consistency. -+ Updated documentation, including: - - Privacy statement updated re changes in data recorded via database update log-ons. - - Licensing docs updated re introduction of some MPL 2.0 files. - -Release v4.0 alpha 2 (preview) of 21 April 2012 -Internal CodeSnip version 3.98.2 -+ New features: - - New "unit" snippet type that enables complete units to be stored in database and to be test compiled. - - New "classes" snippet type that enables a single Object Pascal class or advanced record-with-methods to be stored in database, test compiled and included in generated units. - - Snippets from both the user and main databases can now be duplicated. Duplicates are editable and are stored in the user database. - - Online CodeSnip FAQs can now be displayed in the default browser from a new option on the "Help" menu. -+ User interface changes: - - New "Snippets" and "Categories" top level menus have been added. They are populated with items previously on the "Database" menu. "Snippets" menu also has new "Duplicate Snippet" item. - - "Help" menu re-arranged: items from the former "On The Web" sub-menu are now placed directly on "Help" menu. - - Numerous new and updated glyphs on toolbar, menu and in main display. - - Minor tweaks to controls in the Code tab of the Snippets Editor. - - Minor changes to the style of version info displayed on the splash screen. -+ Bug fixes: - - Fixed potential source of a bug in code that edits user-defined categories. - - Fixed unreported minor bug in dialogue boxes that display tabbed page controls: clicking a tab did not always give it the keyboard focus. - - Fixed bug #3519784 (http://bit.ly/IsCsun) where multi-line "type" or "constant" snippets that start on the same line as the type or const keyword were corrupted when included in units using the "comments after snippet header" comment style. -+ Characters used to introduced switches on the command line were changed: '/' replaces '\'. '-' is still permitted. -+ User and main database formats modified. User databases saved with this version may not be readable with release 4.0 alpha 1. -+ Some refactoring. -+ Help file updated in line with changes and some errors fixed. -+ Updated documentation. - -Release v4.0 alpha 1 (preview) of 31 December 2011 -Internal CodeSnip version 3.98.1 -Changes relate to v3.9.3 -+ User interface changes: - - New multi-tab detail pane can now show more than one snippet, category etc. - - Results of test compiles now appear in a dialogue box instead of in details pane. - - New code import wizard for cleaner control over import process. - - New "Compile" top level menu that groups all actions relating to test compilation. - - Empty section headings can now be displayed in overview pane if required. - - New display options relating to multi-tab display. - - New view displayed instead of welcome screen when database updated. - - Some additions and changes to main window navigation keys. - - Main window and task bar captions changed. - - Some dialogue boxes tweaked. - - Compiler configuration dialogue box heavily revised to support default compiler paths. - - "About" dialogue box paths tab display improved. - - Compile error dialogue box display standardised. - - Splash screen updated. -+ Improved Delphi code syntax highlighter: - - Recognises Delphi 2010 keywords - - Correctly handles context sensitive directives within "property", "exports" and "external" statements. - - Recognises '&' prefix that causes keywords to be treated as identifiers. -+ Compiler search paths can now be specified for included units permitting non-VCL units to be used by snippets. -+ Database: - - Non-empty categories can no longer be deleted. - - File format of both user-defined and main databases changed. - - Database locations changed: updates to main database and edits to user database do not affect databases used by v3 and earlier. - - Location and file format of both user defined and main databases changed. - - Database now supports Unicode Delphi source code. - - Unicode Delphi identifiers can now be used for snippet names. - - Export and backup file formats updated: new formats are not backward compatible but older versions can still be imported. - - Code submission service now supports Unicode source code. - - Database updates now use v5 of delphidabbler.com web update service with revised checksum handling. -+ Unicode support: - - Program now fully supports Unicode internally. - - Test units now use UTF-8 format if source code contains non-ANSI characters. ANSI format is used otherwise to permit compilation on older Delphi compilers. - - Many export file formats now support Unicode and UTF8 formats. User may specify file types from Save dialogue box. - - Configuration files are now in Unicode format. - - Some Unicode support added to database (see above). -+ Web service data handling code improved: now includes ability to send raw bytes and can detect and adapt to character encoding used in responses. -+ Common and per-user configuration file names and locations changed. Bumped file version numbers to 6 and 8 respectively. -+ Fixed some bugs: - - Various Unicode and code page related problems in RTF code generation. - - Memory leaks. - - Version detection in backup file restoration. -+ Cascading style sheet handling improved. -+ Any errors in scripts run in browser control now trapped and reported as exceptions instead of via browser control's own error dialogue box. -+ Revised external object that communicates with JavaScript in browser controls. -+ Hyper-links used in snippets now support the https:// protocol. -+ A default title now used in print spooler if none specified. -+ Source code heavily refactored. -+ Help file updated in line with changes. -+ Installer: - - Changed so that v3 and v4 installs can co-exist - default install locations are different and v4 does not overwrite v3. - - Converts v3 configuration files to v4 Unicode format and copies to new locations. File version stamps are updated. - - Installer is now compiled with Unicode version of Inno Setup instead of ANSI version. - - Scripts updated and refactored. -+ Updated documentation, including changes to privacy statement and new file format documentation. From 4397567036b67baf0a8c6b72da9fdf1b00f93a81 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 15 May 2020 00:07:11 +0100 Subject: [PATCH 325/714] Marked up broken links as struck through --- CHANGELOG.md | 254 +++++++++++++++++++++++++-------------------------- 1 file changed, 127 insertions(+), 127 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a9463eaf..a83755ec3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,8 +19,8 @@ + Changes to About Box's "Paths" tab: - Added new buttons to display the contents of the system and per-user config files. - Renamed tab as "Paths & Files". -+ Implemented feature request #83 (https://sourceforge.net/p/codesnip/feature-requests/83/) to enable the name and port of any web service test server to be passed on command line by using the new "--test-server" command line option. This replaces hard-wired test server name & port that was activated using the now removed "-localhost" command line switch. -+ Fixed bug #96: "Some open / save dialogues too small" (https://sourceforge.net/p/codesnip/bugs/96/). The height of customised dialogue boxes was increased. ++ Implemented feature request #83 ~~(https://sourceforge.net/p/codesnip/feature-requests/83/)~~ to enable the name and port of any web service test server to be passed on command line by using the new "--test-server" command line option. This replaces hard-wired test server name & port that was activated using the now removed "-localhost" command line switch. ++ Fixed bug #96: "Some open / save dialogues too small" ~~(https://sourceforge.net/p/codesnip/bugs/96/)~~. The height of customised dialogue boxes was increased. + Updated operating system detection code to detect Windows 10 TH2. + New photo of Sophie the dog added to the Easter egg slide show! + Updated help file re About Box changes. @@ -94,7 +94,7 @@ ## Release v4.8.7 of 06 March 2014 -+ Fixed automatic update checker so that it correctly records last update date. This fixes bug #93 (http://bit.ly/NmSQUt). ++ Fixed automatic update checker so that it correctly records last update date. This fixes bug #93 ~~(http://bit.ly/NmSQUt)~~. + Updated to use v2 of the DelphiDabbler CodeSnip update web service when checking for availability of program updates. + Minor corrections to help file. @@ -107,7 +107,7 @@ ## Release v4.8.5 of 13 January 2014 -+ Fixed bug #91 "Generated units won't compile on Delphi XE5" (http://bit.ly/1eBjym2). Compiler directives that are used to change compiler warnings now includes a conditionally compiled $LEGACYIFEND ON directive. ++ Fixed bug #91 "Generated units won't compile on Delphi XE5" ~~(http://bit.ly/1eBjym2)~~. Compiler directives that are used to change compiler warnings now includes a conditionally compiled $LEGACYIFEND ON directive. + Fixed potential bug when checking for the existence of files. It had been possible that a "sym-link" to a file could give misleading results. + Updated program copyright date in license file, about box, help file and installer. @@ -115,7 +115,7 @@ ## Release v4.8.4 of 28 November 2013 + Improved user interface of SWAG Import Wizard. -+ Renamed "Save Snippet" and "Copy Snippet" menu options to "Save Annotated Source" and "Copy Annotated Source". This fixes bug #90: " Wrong caption on menu option for copying category to clipboard" (http://bit.ly/ImA398). ++ Renamed "Save Snippet" and "Copy Snippet" menu options to "Save Annotated Source" and "Copy Annotated Source". This fixes bug #90: " Wrong caption on menu option for copying category to clipboard" ~~(http://bit.ly/ImA398)~~. + Revised and corrected numerous main menu and pop-up menu hints. + Updated help file re changes to menu options and SWAG Import Wizards. @@ -135,7 +135,7 @@ ## Release v4.8.1 of 18 September 2013 -+ Removed "File | Page Setup" menu option because some settings made there were being ignored when a file was printed. This is a fix for bug #89 "Setup selections not being remembered" (http://bit.ly/1a3V94x). ++ Removed "File | Page Setup" menu option because some settings made there were being ignored when a file was printed. This is a fix for bug #89 "Setup selections not being remembered" ~~(http://bit.ly/1a3V94x)~~. + Updated help file re changes. @@ -149,25 +149,25 @@ ## Release v4.7.2 of 27 August 2013 -+ Fixed bug #88 "SWAG Import Wizard display bug" (http://bit.ly/15ryOxz) where duplicate snippets could be displayed on the "Ready to import" page in certain circumstances. ++ Fixed bug #88 "SWAG Import Wizard display bug" ~~(http://bit.ly/15ryOxz)~~ where duplicate snippets could be displayed on the "Ready to import" page in certain circumstances. ## Release v4.7.1 of 18 August 2013 + Fixed bug where right clicking a tab in the detail pane sometimes caused the contents of the pane to be temporarily blanked out while the context menu was displayed. - - This fix also, as a side effect, fixed bug #87 "Tab headings and contents don't match after a tab is closed." (http://bit.ly/15TD197). + - This fix also, as a side effect, fixed bug #87 "Tab headings and contents don't match after a tab is closed." ~~(http://bit.ly/15TD197)~~. ## Release v4.7.0 of 31 July 2013 -+ Implemented feature request #71 "Support importing of one or more snippets from the SWAG database" (http://bit.ly/18AFlGu): ++ Implemented feature request #71 "Support importing of one or more snippets from the SWAG database" ~~(http://bit.ly/18AFlGu)~~: - Uses DelphiDabbler SWAG web service to get SWAG data. - New wizard to permit user to select required SWAG snippets. This is accessible from the new "Snippets | Import Snippets From SWAG" menu option. - Snippets are imported into a new "SWAG Imports" category. -+ Implemented feature request #80 "Enable detail pane tabs to be re-ordered" (http://bit.ly/13cbjTZ). -+ In detail pane source code and compiler table now display horizontal scroll bars if they do not fit within the width of the pane. This implements feature requests #60 (http://bit.ly/17iCzT4) and #61 (http://bit.ly/1coDJ5f). ++ Implemented feature request #80 "Enable detail pane tabs to be re-ordered" ~~(http://bit.ly/13cbjTZ)~~. ++ In detail pane source code and compiler table now display horizontal scroll bars if they do not fit within the width of the pane. This implements feature requests #60 ~~(http://bit.ly/17iCzT4)~~ and #61 ~~(http://bit.ly/1coDJ5f)~~. + Minor changes to dialogue box that appears during long operations. -+ Fixed bug #86 "Snippets are sorted by snippet name in snippet table listings in detail pane" (http://bit.ly/17iD27H). ++ Fixed bug #86 "Snippets are sorted by snippet name in snippet table listings in detail pane" ~~(http://bit.ly/17iD27H)~~. + Fixed a few code errors that could have surfaced as bugs. + Modified how HTML based detail pane display is generated and displayed. + Some refactoring. @@ -179,32 +179,32 @@ ## Release v4.6.4 of 24 July 2013 + Fix for IE 9 related browser control script bugs introduced in v4.6.3 when IE 10 bugs were fixed: - - Bug #84 "Script errors on startup" (http://bit.ly/13bfaAL). - - Bug #85 "Check For Updates link " (http://bit.ly/1656pgE). + - Bug #84 "Script errors on startup" ~~(http://bit.ly/13bfaAL)~~. + - Bug #85 "Check For Updates link " ~~(http://bit.ly/1656pgE)~~. ## Release v4.6.3 of 14 July 2013 -+ Further fix for IE 10 related bug #75 "Floating point error in 4.4.1" (http://bit.ly/12zAWSp). Re-implemented method used to display content in main window's detail pane using the IE web browser control. ++ Further fix for IE 10 related bug #75 "Floating point error in 4.4.1" ~~(http://bit.ly/12zAWSp)~~. Re-implemented method used to display content in main window's detail pane using the IE web browser control. ## Release v4.6.2 of 09 July 2013 -+ Tentative fix for bug #83 "Error when the main form is shown" (http://bit.ly/12eUV5Y) that has been reported on Windows 8. The fix is tentative because the bug hasn't been reproduced. ++ Tentative fix for bug #83 "Error when the main form is shown" ~~(http://bit.ly/12eUV5Y)~~ that has been reported on Windows 8. The fix is tentative because the bug hasn't been reproduced. ## Release v4.6.1 of 01 July 2013 -+ Provided fix for reported bug #75 "Floating point error in 4.4.1" (http://bit.ly/12zAWSp) that apparently affects Windows 8, probably with IE 10 installed. ++ Provided fix for reported bug #75 "Floating point error in 4.4.1" ~~(http://bit.ly/12zAWSp)~~ that apparently affects Windows 8, probably with IE 10 installed. + Fixed unreported bug where IE 10 browser was being reported as IE 9. + Fixed potential bug in code that processes class / advanced record snippet types ready for test compilation and inclusion in generated units. ## Release v4.6.0 of 02 June 2013 -+ Added new options to "Find Cross References" dialogue box to allow snippets that either cross reference or depend upon the selected snippet to be included in the search. This implements feature request #30 (http://bit.ly/13cYImA). -+ Added a new "Select and Close" button to the Dependencies dialogue box that causes the snippets displayed on the current tab to be selected in the main display. This implements feature request #77 (http://bit.ly/15s8fH2). -+ The background colour of source code displayed in the main display can now be customised via a new option on the Display tab of the Preferences dialogue box. This implements feature request #36 (http://bit.ly/17fxMGW). ++ Added new options to "Find Cross References" dialogue box to allow snippets that either cross reference or depend upon the selected snippet to be included in the search. This implements feature request #30 ~~(http://bit.ly/13cYImA)~~. ++ Added a new "Select and Close" button to the Dependencies dialogue box that causes the snippets displayed on the current tab to be selected in the main display. This implements feature request #77 ~~(http://bit.ly/15s8fH2)~~. ++ The background colour of source code displayed in the main display can now be customised via a new option on the Display tab of the Preferences dialogue box. This implements feature request #36 ~~(http://bit.ly/17fxMGW)~~. + CodeSnip now compiled with Delphi XE. + Per-user configuration file format changed to v15 which is not entirely compatible with previous versions of CodeSnip. + Updated help file re changes. @@ -213,12 +213,12 @@ ## Release v4.5.1 of 15 May 2013 + Added progress bars or marquees to several database operations that can take a long time on slower storage devices, i.e.: - - When local files are being updated after downloading an updated database in the Update From Web dialogue box. This fixes bug #79 (https://sourceforge.net/p/codesnip/bugs/79/) + - When local files are being updated after downloading an updated database in the Update From Web dialogue box. This fixes bug #79 ~~(https://sourceforge.net/p/codesnip/bugs/79/)~~: - When the local database is being saved. - When the local database is being backed up or restored. - When the local database is being moved to a new location. -+ The user database can now be relocated to a network drive. This fixes issue #81 "Move database to a network drive" (https://sourceforge.net/p/codesnip/bugs/81/). -+ Fixed issue #80 "HTML output bug" (https://sourceforge.net/p/codesnip/bugs/80/). ++ The user database can now be relocated to a network drive. This fixes issue #81 "Move database to a network drive" ~~(https://sourceforge.net/p/codesnip/bugs/81/)~~. ++ Fixed issue #80 "HTML output bug" ~~(https://sourceforge.net/p/codesnip/bugs/80/)~~. + Fixed minor alignment bug that occurred when displaying a wait dialogue box over the main window. + Some refactoring. + Updated help file re changes. @@ -226,7 +226,7 @@ ## Release v4.5.0 of 02 May 2013 -+ Added support for Delphi XE4 compiler. Implements feature request #78 (http://bit.ly/10uGhoD). ++ Added support for Delphi XE4 compiler. Implements feature request #78 ~~(http://bit.ly/10uGhoD)~~. + Updated documentation re changes. + Updated help file re changes. @@ -234,19 +234,19 @@ ## Release v4.4.2 of 26 April 2013 + Fixed bugs: - - #76 (http://bit.ly/12Loz5o) - An advanced record snippet with a method name that clashes with a directive is not test compiling correctly. - - #77 (http://bit.ly/11I9wXI) - Syntax highlighter highlights "contains", "requires" and "package" directives when used in method names. - - #78 (http://bit.ly/ZQl3T4) - CodeSnip doesn't restore window in correct position when task bar on left or top of screen. + - #76 ~~(http://bit.ly/12Loz5o)~~ - An advanced record snippet with a method name that clashes with a directive is not test compiling correctly. + - #77 ~~(http://bit.ly/11I9wXI)~~ - Syntax highlighter highlights "contains", "requires" and "package" directives when used in method names. + - #78 ~~(http://bit.ly/ZQl3T4)~~ - CodeSnip doesn't restore window in correct position when task bar on left or top of screen. ## Release v4.4.1 of 09 April 2013 -+ Fixed bug #73 "Attempting to check for program updates returns a 404 'Not found' error" (http://bit.ly/Yf3UGy) - this error happened only when using remote server, not localhost test server. ++ Fixed bug #73 "Attempting to check for program updates returns a 404 'Not found' error" ~~(http://bit.ly/Yf3UGy)~~ - this error happened only when using remote server, not localhost test server. ## Release v4.4.0 of 08 April 2013 -+ Implemented feature request #75 "Check for updates on start-up" (http://bit.ly/ZJ8OGH): ++ Implemented feature request #75 "Check for updates on start-up" ~~(http://bit.ly/ZJ8OGH)~~: - CodeSnip checks for both program and Code Snippets Database updates in low priority background threads that run when the program is first started. - Update checking takes place at intervals between once per day and once per month. - A new "Updates" tab was added to the "Preferences" dialogue box where update frequencies can be chosen, or the auto-update feature switched off. Program and database update checking can be configured individually. @@ -267,9 +267,9 @@ ## Release v4.3.0 of 27 February 2013 -+ Implemented feature request #40 "Add 'Namespaces' tab to Configure Compilers dialogue box" (http://bit.ly/12XsX32). The new tab appears only for Delphi XE2 and later and obviates the need to manually create -NS commands for passing to the compilers. Suitable default namespaces are provided if none have been configured. -+ Implemented feature request #70 "Let user specify location of user database" (http://bit.ly/13aNCQZ). This feature is accessed from the new "Move Use Database" option on the Database menu. NOTE: The feature is not available in the portable edition which is designed to keep the user database together with the program. -+ Implemented feature request #69 "Enable custom syntax highlighter styles to be saved" (http://bit.ly/XQHkOI). The Syntax Highlighter tab of the Preferences dialogue box has been modified to enable custom syntax highlighter attributes to be saved under a given name and existing named styles to be used or deleted. ++ Implemented feature request #40 "Add 'Namespaces' tab to Configure Compilers dialogue box" ~~(http://bit.ly/12XsX32)~~. The new tab appears only for Delphi XE2 and later and obviates the need to manually create -NS commands for passing to the compilers. Suitable default namespaces are provided if none have been configured. ++ Implemented feature request #70 "Let user specify location of user database" ~~(http://bit.ly/13aNCQZ)~~. This feature is accessed from the new "Move Use Database" option on the Database menu. NOTE: The feature is not available in the portable edition which is designed to keep the user database together with the program. ++ Implemented feature request #69 "Enable custom syntax highlighter styles to be saved" ~~(http://bit.ly/XQHkOI)~~. The Syntax Highlighter tab of the Preferences dialogue box has been modified to enable custom syntax highlighter attributes to be saved under a given name and existing named styles to be used or deleted. + Changed name of "Delphi 2006" predefined syntax highlighter to "RAD Studio". This remains the default highlighter. + A little refactoring. + Enlarged Configure Compilers dialogue box. @@ -283,18 +283,18 @@ ## Release v4.2.1 of 14 February 2013 -+ Bug fix: changed Favourites dialogue to display snippet display names instead of unique names. Fixes bug #72 (http://bit.ly/Vj6ZCM). ++ Bug fix: changed Favourites dialogue to display snippet display names instead of unique names. Fixes bug #72 ~~(http://bit.ly/Vj6ZCM)~~. + Updated program copyright date in About box. ## Release v4.2.0 of 07 February 2013 -+ Added support for "favourite" snippets. Implements feature request #37 (http://bit.ly/12unShW): ++ Added support for "favourite" snippets. Implements feature request #37 ~~(http://bit.ly/12unShW)~~: - Any displayed snippet can be flagged as a favourite via a menu option or toolbar button. - A new non-modal dialogue box can now be displayed alongside the CodeSnip window for easy selection and management of favourite snippets. + Changes to Duplicate Snippets dialogue box: - - Display name of duplicate snippet can be edited. Implements feature request #64 (http://bit.ly/14TdUGF). - - Snippets Editor can be opened immediately the Duplicate Snippet dialogue box closes to edit the duplicated snippet. Implements feature request #65 (http://bit.ly/UBlt2Y). + - Display name of duplicate snippet can be edited. Implements feature request #64 ~~(http://bit.ly/14TdUGF)~~. + - Snippets Editor can be opened immediately the Duplicate Snippet dialogue box closes to edit the duplicated snippet. Implements feature request #65 ~~(http://bit.ly/UBlt2Y)~~. + Status bar changed: first panel now displays no category information, but displays both total number of snippets and number of snippets in each database. + Fixed unreported bug in save dialogue boxes where overwrite permission requests could be displayed erroneously. + Program closes gracefully if run on unsupported versions. @@ -308,9 +308,9 @@ ## Release v4.1.1 of 30 January 2013 + Fixed bugs: - - #68 (http://bit.ly/WxG6LC): Comments missing in unit / code generation for some types. - - #70 (http://bit.ly/WAYEHN): Changing syntax highlighter font has no effect in main display. - - #71 (http://bit.ly/14v9i9v): Option to select monochrome printing not working properly. + - #68 ~~(http://bit.ly/WxG6LC)~~: Comments missing in unit / code generation for some types. + - #70 ~~(http://bit.ly/WAYEHN)~~: Changing syntax highlighter font has no effect in main display. + - #71 ~~(http://bit.ly/14v9i9v)~~: Option to select monochrome printing not working properly. - Unreported: Changing syntax highlighter font has no effect when printing or when copying text to clipboard as RTF (related to bug #70). + Updated help file re syntax highlighter changes. @@ -326,12 +326,12 @@ - Different version information and program identifier. - There is no set up program. + Changes to snippets editor: - - Added context menus to cross-references and dependencies check box lists. Both have menu item to clear list. Dependencies list has item to view dependencies. Implements feature request #3560960 (http://bit.ly/U83Swh). + - Added context menus to cross-references and dependencies check box lists. Both have menu item to clear list. Dependencies list has item to view dependencies. Implements feature request #3560960 ~~(http://bit.ly/U83Swh)~~. - Deleted "View Dependencies" button now that its functionality is now on context menu. - Enlarged various controls on all except "Code" tab. - - Units listed on "References" tab is now persistent. Units can be removed, defaults restored and selection cleared via a new context menu. Implements feature request #3560962 (http://bit.ly/UM0c0B). -+ New source code formatting option added to only use first paragraph of a snippet description as snippet comment in generated code. This is configured via "Code Formatting" tab of "Preferences" dialogue box and / or from relevant "Save" dialogue boxes. Implements feature request #3560647 (http://bit.ly/UQrDax). -+ Changed mini-toolbar in overview pane to expand / collapse all overview tree view instead of just selected node. Implements feature request #3560646 (http://bit.ly/UOUQTr). + - Units listed on "References" tab is now persistent. Units can be removed, defaults restored and selection cleared via a new context menu. Implements feature request #3560962 ~~(http://bit.ly/UM0c0B)~~. ++ New source code formatting option added to only use first paragraph of a snippet description as snippet comment in generated code. This is configured via "Code Formatting" tab of "Preferences" dialogue box and / or from relevant "Save" dialogue boxes. Implements feature request #3560647 ~~(http://bit.ly/UQrDax)~~. ++ Changed mini-toolbar in overview pane to expand / collapse all overview tree view instead of just selected node. Implements feature request #3560646 ~~(http://bit.ly/UOUQTr)~~. + Reimplemented database search engine. + Some external links modified that will seamlessly accommodate future changes in destination URLs. + Changed some glyphs used in menus. @@ -358,7 +358,7 @@ _Internal CodeSnip version 4.0.1.213_ -+ Modified version of Release v4.0.1 that can run from a writeable removable medium without writing files or registry on host computer. This implements feature request #3577431 (http://bit.ly/UxvUj0). ++ Modified version of Release v4.0.1 that can run from a writeable removable medium without writing files or registry on host computer. This implements feature request #3577431 ~~(http://bit.ly/UxvUj0)~~. + Changes that apply only to portable version: - Changed executable file name to CodeSnip-p.exe. - Program caption changed to identify as portable version. @@ -375,9 +375,9 @@ _Internal CodeSnip version 4.0.1.213_ _Internal CodeSnip version 4.0.1.212_ -+ Fixed bug #3578652 (http://bit.ly/RXIwBC): "Pre-processor directive errors in main db ini files" by removing support for problematic directives. -+ Rolling mouse over links in detail pane no longer displays a hint in the status bar. This change fixes bug #3577407 (http://bit.ly/VeSVGg): Clicking detail pane snippet link leaves hint in status bar. -+ Windows no longer scale automatically when screen DPI differs from that on design system. This fixes bugs #3591818 (http://bit.ly/TvNaUL) "Strange window behaviour in Windows 7" and bug #3591820 (http://bit.ly/SEH6dO) "Incorrect font size used for some bold text". ++ Fixed bug #3578652 ~~(http://bit.ly/RXIwBC)~~: "Pre-processor directive errors in main db ini files" by removing support for problematic directives. ++ Rolling mouse over links in detail pane no longer displays a hint in the status bar. This change fixes bug #3577407 ~~(http://bit.ly/VeSVGg)~~: Clicking detail pane snippet link leaves hint in status bar. ++ Windows no longer scale automatically when screen DPI differs from that on design system. This fixes bugs #3591818 ~~(http://bit.ly/TvNaUL)~~ "Strange window behaviour in Windows 7" and bug #3591820 ~~(http://bit.ly/SEH6dO)~~ "Incorrect font size used for some bold text". + Update operating system detection code to detect W0ndows 8 & 2012 server. + Some refactoring and some redundant code removed. + Updated documentation. @@ -393,12 +393,12 @@ See also changes from alpha, beta and release candidates below for details of ch + New glyphs that describes level of testing applied to snippets from online Code Snippets Database now appear in top right of detail pane. + Changed main window caption and task bar entry to include version number "4" after program name. + Fixed bugs: - - #3572382 (http://bit.ly/OnEtNY): Automatic conversion of blank lines to paragraphs in REML mark-up editor gets confused if block level tags are already present. + - #3572382 ~~(http://bit.ly/OnEtNY)~~: Automatic conversion of blank lines to paragraphs in REML mark-up editor gets confused if block level tags are already present. - Unreported: Controls in News dialogue box do not use correct font. + A little refactoring. + Updated help file: - Modified re recent changes - - Added new "What's new" topic giving details of changes in v4. Implements feature request #3567490 (http://bit.ly/RgQx0W). + - Added new "What's new" topic giving details of changes in v4. Implements feature request #3567490 ~~(http://bit.ly/RgQx0W)~~. - Renamed "Welcome" page as "Overview". + Updated documentation, including read-me file. @@ -407,14 +407,14 @@ See also changes from alpha, beta and release candidates below for details of ch _Internal CodeSnip version 3.999.3_ -+ Fixed serious bug #3568628 (http://bit.ly/V5NX0H): "CodeSnip faulting at startup after fresh install with no previous v3 installation". ++ Fixed serious bug #3568628 ~~(http://bit.ly/V5NX0H)~~: "CodeSnip faulting at startup after fresh install with no previous v3 installation". ## Release v4.0 RC 2 of 17 September 2012 _Internal CodeSnip version 3.999.2_ -+ Fixed serious bug #3568515 (http://bit.ly/Oy2Q7g): Duplicating a snippet with a display name causes crash. ++ Fixed serious bug #3568515 ~~(http://bit.ly/Oy2Q7g)~~: Duplicating a snippet with a display name causes crash. + Minor update to licensing information and about box credits. @@ -429,8 +429,8 @@ _Internal CodeSnip version 3.999.1_ - No clicking noise is now issued by UI in response to user interaction with Details pane. - Links to external commands and to other snippets re-styled. - Revised and updated program's main icon. -+ Fixed bug #3566426 (http://bit.ly/OmbwTB): About Box Paths Page displays wrongly when themes not available. -+ Added support for Delphi XE3 compiler. Implements feature request #3566346 (http://bit.ly/SIVpS2). ++ Fixed bug #3566426 ~~(http://bit.ly/OmbwTB)~~: About Box Paths Page displays wrongly when themes not available. ++ Added support for Delphi XE3 compiler. Implements feature request #3566346 ~~(http://bit.ly/SIVpS2)~~. + Completely new Easter Egg. + Refactoring and internal code changes, including a revision of the "external" object that communicates with JavaScript in browser controls. + Changed License: @@ -448,22 +448,22 @@ _Internal CodeSnip version 3.999.1_ _Internal CodeSnip version 3.99.2_ + Bug fixes: - - #3556620 (http://bit.ly/Mq1Khh): Serious flaw in generating units containing class types when the classes contain method types other than procedure or function. - - #3556713 (http://bit.ly/RIzfvQ): Context menus are not displayed when pressing Alt+F10. - - #3556715 (http://bit.ly/O3QN0u): Deleting a category then returning to it via the history list causes a GPF. - - #3556718 (http://bit.ly/RVanCE): Inconsistent context menus for edit controls in Snippets Editor. - - #3557107 (http://bit.ly/PfiYxm): New snippets and categories are not added to the history list. - - #3558649 (http://bit.ly/PAXLQv): Closing the Preferences dialogue always refreshes the main display even if the dialogue box was cancelled or if nothing was changed. - - #3559156 (http://bit.ly/TKXYQ7): "Previews" giving examples of the effect of changes made in the Preferences dialogue box sometimes disappear when the tab key is pressed. - - #3559239 (http://bit.ly/Pm1HU4): Snippet names and display names are used inconsistently in the UI. - - #3559257 (http://bit.ly/Qc8Fqu): Compile Results displayed from the main menu can get out of sync with the actual compile results of snippets that have been edited since they were last compiled. - - #3559265 (http://bit.ly/NvV9iH): Viewing dependencies for an unnamed snippet or a snippet not in the database causes a GPF. - - #3559266 (http://bit.ly/S69wO2): When include files are generated for a snippet that depends on a class type, the required class is not listed in the file's header comments. - - #3560317 (http://bit.ly/PUcEgV): The caption of the Active Text preview dialogue box refers to "Extra" text when it is used to preview a snippet's description. - - #3560521 (http://bit.ly/RG7Jlw): The state of the Overview tree often doesn't restore correctly after a database update. - - #3560958 (http://bit.ly/TX7M9V): Snippets are not sorted correctly (i.e. on display name) in the Overview pane. - - #3561014 (http://bit.ly/PEFgXY): The current view in the Display pane is not cleared, even though all tabs are closed, when the database is re-loading. - - #3561047 (http://bit.ly/Pf5L5v): The Category view in the Overview pane sometimes appears fully expanded when it is expected to be fully collapsed. + - #3556620 ~~(http://bit.ly/Mq1Khh)~~: Serious flaw in generating units containing class types when the classes contain method types other than procedure or function. + - #3556713 ~~(http://bit.ly/RIzfvQ)~~: Context menus are not displayed when pressing Alt+F10. + - #3556715 ~~(http://bit.ly/O3QN0u)~~: Deleting a category then returning to it via the history list causes a GPF. + - #3556718 ~~(http://bit.ly/RVanCE)~~: Inconsistent context menus for edit controls in Snippets Editor. + - #3557107 ~~(http://bit.ly/PfiYxm)~~: New snippets and categories are not added to the history list. + - #3558649 ~~(http://bit.ly/PAXLQv)~~: Closing the Preferences dialogue always refreshes the main display even if the dialogue box was cancelled or if nothing was changed. + - #3559156 ~~(http://bit.ly/TKXYQ7)~~: "Previews" giving examples of the effect of changes made in the Preferences dialogue box sometimes disappear when the tab key is pressed. + - #3559239 ~~(http://bit.ly/Pm1HU4)~~: Snippet names and display names are used inconsistently in the UI. + - #3559257 ~~(http://bit.ly/Qc8Fqu)~~: Compile Results displayed from the main menu can get out of sync with the actual compile results of snippets that have been edited since they were last compiled. + - #3559265 ~~(http://bit.ly/NvV9iH)~~: Viewing dependencies for an unnamed snippet or a snippet not in the database causes a GPF. + - #3559266 ~~(http://bit.ly/S69wO2)~~: When include files are generated for a snippet that depends on a class type, the required class is not listed in the file's header comments. + - #3560317 ~~(http://bit.ly/PUcEgV)~~: The caption of the Active Text preview dialogue box refers to "Extra" text when it is used to preview a snippet's description. + - #3560521 ~~(http://bit.ly/RG7Jlw)~~: The state of the Overview tree often doesn't restore correctly after a database update. + - #3560958 ~~(http://bit.ly/TX7M9V)~~: Snippets are not sorted correctly (i.e. on display name) in the Overview pane. + - #3561014 ~~(http://bit.ly/PEFgXY)~~: The current view in the Display pane is not cleared, even though all tabs are closed, when the database is re-loading. + - #3561047 ~~(http://bit.ly/Pf5L5v)~~: The Category view in the Overview pane sometimes appears fully expanded when it is expected to be fully collapsed. - Untracked: Removed "(v4 preview)" text that had been left in main window title bar. - Untracked: Minor accelerator key related problems in the Preferences dialogue box. + Main UI changes: @@ -471,18 +471,18 @@ _Internal CodeSnip version 3.99.2_ - Right-clicking a tab in the Overview or Detail pane now selects the tab. - Middle-clicking an item in the Overview pane now selects it. Previously middle clicks were ignored. - Many more parts of the main display and dialogue boxes now display display names for snippets rather than unique names. - - Ctrl clicking snippet and category links in the Detail pane and History UI controls now opens the chosen item in a new tab. Implements feature requests #3559377 (http://bit.ly/OqnAjd) and #3559378 (http://bit.ly/NPtEkX). - - Different link styles are now used for the different types of link in the Detail pane. Implements feature request #3559464 (http://bit.ly/Pwsqg6). + - Ctrl clicking snippet and category links in the Detail pane and History UI controls now opens the chosen item in a new tab. Implements feature requests #3559377 ~~(http://bit.ly/OqnAjd)~~ and #3559378 ~~(http://bit.ly/NPtEkX)~~. + - Different link styles are now used for the different types of link in the Detail pane. Implements feature request #3559464 ~~(http://bit.ly/Pwsqg6)~~. - Pressing Ctrl+Return on an active snippet or category link in the Details pane now opens the item in a new tab instead of the current tab. Pressing Return now opens the item in the current tab. - - The Detail pane's context menu now displays more options when text selections and links are right clicked. Implements feature request #3559375 (http://bit.ly/NzaY8a) with some minor differences. - - New button added to the Display tab of the Preferences dialogue box that resets default snippet heading colours. Implements feature request #3559140 (http://bit.ly/QKQo43). + - The Detail pane's context menu now displays more options when text selections and links are right clicked. Implements feature request #3559375 ~~(http://bit.ly/NzaY8a)~~ with some minor differences. + - New button added to the Display tab of the Preferences dialogue box that resets default snippet heading colours. Implements feature request #3559140 ~~(http://bit.ly/QKQo43)~~. - The "Types" unit is now displayed by default in the Snippets Editor Reference Tab's predefined units list. + When a category is printed, any URLs in snippet descriptions are output and styled. + Names of units referenced by snippets may now contain dots. + Some refactoring and internal code changes, including a major reworking of the "first run" program configuration and a revision to the "external" object that communicates with JavaScript in browser controls. + Help file updated: - Re UI changes. - - With a description of the need to configure namespaces for Delphi XE2 for each unit referenced by the code it is test compiling - addresses bug #3536531 (http://bit.ly/Q2bcmY). + - With a description of the need to configure namespaces for Delphi XE2 for each unit referenced by the code it is test compiling - addresses bug #3536531 ~~(http://bit.ly/Q2bcmY)~~. + Updated documentation. @@ -491,12 +491,12 @@ _Internal CodeSnip version 3.99.2_ _Internal CodeSnip version 3.99.1_ + New features: - - Structure of snippet pages in details pane is now customisable: various page elements can be omitted and order of elements can be specified. Each snippet type has its own page customisation. Implements feature request #3519456 (http://bit.ly/NhT8Kr). - - Snippets can now have a "display name" that can contain any characters and does not need to be unique. When provided the display name is displayed in preference to the normal name. Implements feature request #3519460 (http://bit.ly/NN6kRP). - - Snippet descriptions can now be formatted and contain multiple paragraphs. This implements feature requests #3411890 (http://bit.ly/OS8a5a) and #3520405 (http://bit.ly/OS8yRe). - - Snippets can now be configured so that their source code is not syntax highlighted. This change allows snippets in other languages not to be highlighted as if they are Pascal. Implements feature request #3519935 (http://bit.ly/LrNiAg) - - Colour of headings for snippets and categories from main and user databases are now user configurable. This implements feature request #3519463 (http://bit.ly/Nz9JH2). - - User can now limit the number of compilers that appear in the compiler results table in the display pane. This is done via the Configure Compilers dialogue box. Implements feature request #3519459 (http://bit.ly/Q5O51z). + - Structure of snippet pages in details pane is now customisable: various page elements can be omitted and order of elements can be specified. Each snippet type has its own page customisation. Implements feature request #3519456 ~~(http://bit.ly/NhT8Kr)~~. + - Snippets can now have a "display name" that can contain any characters and does not need to be unique. When provided the display name is displayed in preference to the normal name. Implements feature request #3519460 ~~(http://bit.ly/NN6kRP)~~. + - Snippet descriptions can now be formatted and contain multiple paragraphs. This implements feature requests #3411890 ~~(http://bit.ly/OS8a5a)~~ and #3520405 ~~(http://bit.ly/OS8yRe)~~. + - Snippets can now be configured so that their source code is not syntax highlighted. This change allows snippets in other languages not to be highlighted as if they are Pascal. Implements feature request #3519935 ~~(http://bit.ly/LrNiAg)~~. + - Colour of headings for snippets and categories from main and user databases are now user configurable. This implements feature request #3519463 ~~(http://bit.ly/Nz9JH2)~~. + - User can now limit the number of compilers that appear in the compiler results table in the display pane. This is done via the Configure Compilers dialogue box. Implements feature request #3519459 ~~(http://bit.ly/Q5O51z)~~. - New option on Tools menu that checks availability of new versions of CodeSnip. + User interface changes: - "Test Compile" link removed from snippet display in details pane. @@ -520,7 +520,7 @@ _Internal CodeSnip version 3.99.1_ - Changed handling of multiple spaces in REML code to be the same as in HTML. - Formatting of REML code improved when re-displayed. + Bug fixes: - - Bug #3536331 fixed (http://bit.ly/KQTYc3): words at the end of some paragraphs in a snippet's extra information were not being found in "whole word only" searches. + - Bug #3536331 fixed ~~(http://bit.ly/KQTYc3)~~: words at the end of some paragraphs in a snippet's extra information were not being found in "whole word only" searches. - Fixed unreported file parsing bug that occurred when loading a saved snippet selection from disk. + Changed Delphi compiler detection so that compilers can be detected by examining current user registry key in addition to local machine registry key. This enables Delphis that were installed for a given user only to be detected. + Improved error handling when reading and writing snippet selection files. @@ -564,8 +564,8 @@ _Internal CodeSnip version 3.98.3_ - Program tab of About box updated with credits for new third party code. + Bug fixes: - Error in logic of code that generates program ID was fixed. - - Bug #2868708 fixed (http://bit.ly/KeyAvS): edited snippets are no longer lost from manual snippet selections unless snippet names are changed. - - Bug #3534138 fixed (http://bit.ly/Mg9gJG): details pane display is now cleared when last tab is closed: previously content of last closed tab remained on screen. + - Bug #2868708 fixed ~~(http://bit.ly/KeyAvS)~~: edited snippets are no longer lost from manual snippet selections unless snippet names are changed. + - Bug #3534138 fixed ~~(http://bit.ly/Mg9gJG)~~: details pane display is now cleared when last tab is closed: previously content of last closed tab remained on screen. + Info about user's OS and IE version is now sent to web server during online database updates. + Some refactoring. + Help file updated in line with changes and new features. Some US English spellings changed to UK English for consistency. @@ -592,7 +592,7 @@ _Internal CodeSnip version 3.98.2_ + Bug fixes: - Fixed potential source of a bug in code that edits user-defined categories. - Fixed unreported minor bug in dialogue boxes that display tabbed page controls: clicking a tab did not always give it the keyboard focus. - - Fixed bug #3519784 (http://bit.ly/IsCsun) where multi-line "type" or "constant" snippets that start on the same line as the type or const keyword were corrupted when included in units using the "comments after snippet header" comment style. + - Fixed bug #3519784 ~~(http://bit.ly/IsCsun)~~ where multi-line "type" or "constant" snippets that start on the same line as the type or const keyword were corrupted when included in units using the "comments after snippet header" comment style. + Characters used to introduced switches on the command line were changed: '/' replaces '\'. '-' is still permitted. + User and main database formats modified. User databases saved with this version may not be readable with release 4.0 alpha 1. + Some refactoring. @@ -672,7 +672,7 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.13.1 of 18 September 2013 -+ Removed File | Page Setup menu option because some settings made there were being ignored when a file was printed. This is a fix for bug #89 "Setup selections not being remembered" (http://bit.ly/1a3V94x). ++ Removed File | Page Setup menu option because some settings made there were being ignored when a file was printed. This is a fix for bug #89 "Setup selections not being remembered" ~~(http://bit.ly/1a3V94x)~~. + Updated help file re changes. @@ -685,34 +685,34 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.12.1 of 01 July 2013 -+ Fixed bug #82 "Fatal divide by zero exception on start-up" (http://bit.ly/15aIJqQ) that affected all v3.x versions when the IE 10 browser was installed. ++ Fixed bug #82 "Fatal divide by zero exception on start-up" ~~(http://bit.ly/15aIJqQ)~~ that affected all v3.x versions when the IE 10 browser was installed. + Fixed unreported bug where IE 10 browser was being reported as IE 9. + Updated all third party DelphiDabbler code to latest available versions. + Updated documentation re changes. ## Release v3.12.0 of 02 May 2013 -+ Added support for Delphi XE4 compiler. Implements feature request #78 (http://bit.ly/10uGhoD). -+ Fixed bug #78 (http://bit.ly/ZQl3T4) - CodeSnip doesn't restore window in correct position when task bar on left or top of screen. ++ Added support for Delphi XE4 compiler. Implements feature request #78 ~~(http://bit.ly/10uGhoD)~~. ++ Fixed bug #78 ~~(http://bit.ly/ZQl3T4)~~ - CodeSnip doesn't restore window in correct position when task bar on left or top of screen. + Updated documentation re changes. + Updated help file re changes. ## Release v3.11.1 of 08 December 2012 -+ Fixed bug #3578654 (http://bit.ly/T7fTxu): "Pre-processor directive errors in main db ini files" by removing support for problematic directives. -+ Hints are no longer displayed in status bar when user rolls mouse over a link in the display pane. This fixes bug #3577408 (http://bit.ly/WEzZGg): "Clicking detail pane snippet link leaves hint in status bar". -+ Windows no longer scale automatically when screen DPI differs from that on design system. This fixes bugs #3591818 (http://bit.ly/TvNaUL) "Strange window behaviour in Windows 7" and bug #3591820 (http://bit.ly/SEH6dO) "Incorrect font size used for some bold text". ++ Fixed bug #3578654 ~~(http://bit.ly/T7fTxu)~~: "Pre-processor directive errors in main db ini files" by removing support for problematic directives. ++ Hints are no longer displayed in status bar when user rolls mouse over a link in the display pane. This fixes bug #3577408 ~~(http://bit.ly/WEzZGg)~~: "Clicking detail pane snippet link leaves hint in status bar". ++ Windows no longer scale automatically when screen DPI differs from that on design system. This fixes bugs #3591818 ~~(http://bit.ly/TvNaUL)~~ "Strange window behaviour in Windows 7" and bug #3591820 ~~(http://bit.ly/SEH6dO)~~ "Incorrect font size used for some bold text". + Updated operating system detection code to detect W0ndows 8 & 2012 server. + Updated documentation ## Release v3.11.0 of 17 September 2012 -+ Added support for Delphi XE3 compiler. Implements feature request #3566345 (http://bit.ly/OvbBPp). ++ Added support for Delphi XE3 compiler. Implements feature request #3566345 ~~(http://bit.ly/OvbBPp)~~. + Bug fixes: - - #3561713 (http://bit.ly/QEYRFx): The Category view in the Overview pane sometimes appears fully expanded when it is expected to be fully collapsed. - - #3566430 (http://bit.ly/U1KnGZ): About Box Paths Page displays wrongly when themes not available. + - #3561713 ~~(http://bit.ly/QEYRFx)~~: The Category view in the Overview pane sometimes appears fully expanded when it is expected to be fully collapsed. + - #3566430 ~~(http://bit.ly/U1KnGZ)~~: About Box Paths Page displays wrongly when themes not available. + Updated documentation re changes. + Updated help file re changes. @@ -720,18 +720,18 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.10.5 of 21 August 2012 + Fixed bugs: - - #3559257 (http://bit.ly/Qc8Fqu): Compile Results accessed from menu can get out of sync. - - #3559156 (http://bit.ly/TKXYQ7): "Previews" disappearing in Preferences dialogue box + - #3559257 ~~(http://bit.ly/Qc8Fqu)~~: Compile Results accessed from menu can get out of sync. + - #3559156 ~~(http://bit.ly/TKXYQ7)~~: "Previews" disappearing in Preferences dialogue box ## Release v3.10.4 of 16 August 2012 -+ Added support for displaying pop-up menus over appropriate control when Alt+F10 is pressed. Fixes bug #3556713 (http://bit.ly/RIzfvQ). ++ Added support for displaying pop-up menus over appropriate control when Alt+F10 is pressed. Fixes bug #3556713 ~~(http://bit.ly/RIzfvQ)~~. + Changes to snippets editor: - - Added missing edit context menu to "add unit" edit control on References tab. Fixes bug #3556718 (http://bit.ly/RVanCE) as it relates to v3. + - Added missing edit context menu to "add unit" edit control on References tab. Fixes bug #3556718 ~~(http://bit.ly/RVanCE~~) as it relates to v3. - Predefined list of units in Units list on References tab now includes the "Types" unit. - Referenced unit names may now contain dots. - - Snippets Editor help topic now explains need to configure Delphi XE2 compiler to search namespaces containing referenced units. This provides a solution to bug #3536531 (http://bit.ly/Q2bcmY). + - Snippets Editor help topic now explains need to configure Delphi XE2 compiler to search namespaces containing referenced units. This provides a solution to bug #3536531 ~~(http://bit.ly/Q2bcmY)~~. ## Release v3.10.3 of 25 July 2012 @@ -742,14 +742,14 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.10.2 of 19 June 2012 -+ Fixed bug #3536331 (http://bit.ly/KQVATf) where some distinct words in a snippet's Extra text where not being found in text searches. ++ Fixed bug #3536331 ~~(http://bit.ly/KQVATf)~~ where some distinct words in a snippet's Extra text where not being found in text searches. + Info about user's OS and IE version is now sent to web server during online database updates. + Updated privacy statement re changes in information sent by update web service. ## Release v3.10.1 of 20 April 2012 -+ Fixed bug #3519784 (http://bit.ly/IsCsun) where multi-line type or constant snippets that start on same line as type or const keyword were corrupted when included in units using the "comments after snippet header" comment style. ++ Fixed bug #3519784 ~~(http://bit.ly/IsCsun)~~ where multi-line type or constant snippets that start on same line as type or const keyword were corrupted when included in units using the "comments after snippet header" comment style. + Also fixed potential source of a bug in code that edits user-defined categories. @@ -775,14 +775,14 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.9.2 of 28 October 2011 -+ Fixed bug #3427741 (http://bit.ly/vq2fAz) where details pane tabs didn't change in response to key presses. -+ Fixed bug #3427866 (http://bit.ly/w31z8L) where selection in overview was not always same as item displayed in details pane. -+ Fixed bug #3427889 (http://bit.ly/tijnmF) where there was the possibility of a GPF in overview pane. ++ Fixed bug #3427741 ~~(http://bit.ly/vq2fAz)~~ where details pane tabs didn't change in response to key presses. ++ Fixed bug #3427866 ~~(http://bit.ly/w31z8L)~~ where selection in overview was not always same as item displayed in details pane. ++ Fixed bug #3427889 ~~(http://bit.ly/tijnmF)~~ where there was the possibility of a GPF in overview pane. ## Release v3.9.1 of 18 September 2011 -+ Fixed bug #3369422 (http://bit.ly/omSp6F) in Pascal highlighter that was causing an assertion failure when parsing malformed Pascal general format floating point numbers. ++ Fixed bug #3369422 ~~(http://bit.ly/omSp6F)~~ in Pascal highlighter that was causing an assertion failure when parsing malformed Pascal general format floating point numbers. ## Release v3.9.0 of 07 September 2011 @@ -797,7 +797,7 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.8.11 of 02 July 2011 -+ Fixed display problem in about box and compiler error dialogue boxes on systems using Internet Explorer v9 web browser control. This fixes issue #3349186 (http://bit.ly/lF6bTO). ++ Fixed display problem in about box and compiler error dialogue boxes on systems using Internet Explorer v9 web browser control. This fixes issue #3349186 ~~(http://bit.ly/lF6bTO)~~. + Updated read-me file re support for IE9 browser control. @@ -810,9 +810,9 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.8.9 of 10 May 2011 -+ Fixed bug #3299870 (http://bit.ly/iX8Its) that was allowing imported snippets with duplicate names to be renamed with invalid names. ++ Fixed bug #3299870 ~~(http://bit.ly/iX8Its)~~ that was allowing imported snippets with duplicate names to be renamed with invalid names. + Improved UI used to edit imported snippet names. -+ Any "warning" compile results in main database are now treated and displayed as "success" results per feature request #3290359 (http://bit.ly/mshbRa). ++ Any "warning" compile results in main database are now treated and displayed as "success" results per feature request #3290359 ~~(http://bit.ly/mshbRa)~~. + Fixed unreported potential bug in code that sets window class names. + Updated documentation. @@ -843,14 +843,14 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.8.5 of 28 November 2010 -+ Fixed bug where user was able to create snippets with valid names that would crash the alphabetic overview. Snippet names are now limited to letters from English alphabet and the underscore. Fixes bug #3120958 (http://bit.ly/fDAswL). -+ Fixed bug where snippets that have names beginning with a lower case letter were being omitted from from the associated list of snippets shown in the detail pane. Fixes bug #3120962 (http://bit.ly/eGhQvc). ++ Fixed bug where user was able to create snippets with valid names that would crash the alphabetic overview. Snippet names are now limited to letters from English alphabet and the underscore. Fixes bug #3120958 ~~(http://bit.ly/fDAswL)~~. ++ Fixed bug where snippets that have names beginning with a lower case letter were being omitted from from the associated list of snippets shown in the detail pane. Fixes bug #3120962 ~~(http://bit.ly/eGhQvc)~~. + Updated Snippets Editor topic in help file. ## Release v3.8.4 of 26 November 2010 -+ User can now opt to terminate the application when an unexpected exception is trapped. This implements feature request #3074914 (http://bit.ly/hUyEAw). ++ User can now opt to terminate the application when an unexpected exception is trapped. This implements feature request #3074914 ~~(http://bit.ly/hUyEAw)~~. + Wording of bug report dialogue boxes changed. + Snippets selection dialogue box now displays wait cursor while waiting for it to be displayed. + Some corrections and clarifications made to comments that appear in generated "include" files. @@ -862,7 +862,7 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.8.3 of 24 November 2010 -+ Added button to "Compile" tab of Snippets Editor to display unit used to test compile snippets. This implements feature request #3108008 (http://bit.ly/elBZnn). ++ Added button to "Compile" tab of Snippets Editor to display unit used to test compile snippets. This implements feature request #3108008 ~~(http://bit.ly/elBZnn)~~. + Fixed unreported bugs in handling of exceptions raised in threads. + Simplified method used to load database on start up. No longer uses a separate thread. + Overhauled and simplified code used to display "wait" dialogues during test compilations and database reloading. @@ -875,13 +875,13 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.8.2 of 16 November 2010 -+ The position of the caret in the Snippets Editor's Extra Information control is now displayed. Implements feature request #3105288 (http://bit.ly/bRV86Z). ++ The position of the caret in the Snippets Editor's Extra Information control is now displayed. Implements feature request #3105288 ~~(http://bit.ly/bRV86Z)~~. + Code that displays caret positions was refactored and improved. -+ Display of errors in the Snippets Editor's text edit controls has been improved in most cases either by positioning the caret near the error or selecting the erroneous text. This implements feature request #3107042 (http://bit.ly/cKx5YQ). ++ Display of errors in the Snippets Editor's text edit controls has been improved in most cases either by positioning the caret near the error or selecting the erroneous text. This implements feature request #3107042 ~~(http://bit.ly/cKx5YQ)~~. + Made significant changes to code that parses REML mark-up: - Rationalised error reporting and added support for reporting the position of errors. - Fixed unreported bug that produced wrong error message when empty tags are encountered. - - Fixed bug #3107982 (http://bit.ly/cp9Cff) that failed to report some unclosed tags as errors. + - Fixed bug #3107982 ~~(http://bit.ly/cp9Cff)~~ that failed to report some unclosed tags as errors. - Refactored and reorganised much of the code. + All encoding and decoding of URIs is now RFC 3986 compliant. + Refactored character detection and string encoding support code. @@ -891,7 +891,7 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.8.1 of 08 November 2010 -+ Fixed bug #3015589 (http://bit.ly/cdPedH) where some user syntax highlighter settings were being ignored in main display. ++ Fixed bug #3015589 ~~(http://bit.ly/cdPedH)~~ where some user syntax highlighter settings were being ignored in main display. + Changed Test Unit view dialogue box to use user syntax highlighter settings. + Revised credits in About Box program tab. + Updated third party units: PJMD5 to v0.3, PJSysInfo to v3.3, PJVersionInfo to v3.3. @@ -958,7 +958,7 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.6.0 of 26 May 2010 -+ Added support for emitting compiler directives to switch off specified warnings. This implement feature request #2994485 (see http://bit.ly/cxDJG4). ++ Added support for emitting compiler directives to switch off specified warnings. This implement feature request #2994485 ~~(see http://bit.ly/cxDJG4)~~. + Preferences dialogue box updated: - New "Code Generation" tab used to configure which if any warnings are to be inhibited. - Renamed "Source Code" tab to "Code Formatting". @@ -977,18 +977,18 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.5.5 of 24 March 2010 -+ Fixes download stream read bug #2976048 (see http://bit.ly/ds6mBr). ++ Fixes download stream read bug #2976048 ~~(see http://bit.ly/ds6mBr)~~. ## Release v3.5.4 of 18 March 2010 -+ Temporary fix for download error checking bug #2970055 (see http://bit.ly/cvf9Mm). -+ Fixed https protocol bug #2970896 (see http://bit.ly/bCIx38). ++ Temporary fix for download error checking bug #2970055 ~~(see http://bit.ly/cvf9Mm)~~. ++ Fixed https protocol bug #2970896 ~~(see http://bit.ly/bCIx38)~~. ## Release v3.5.3 of 08 March 2010 -+ Fixed database download error checking bug #2964767 (see http://bit.ly/90vFfp). ++ Fixed database download error checking bug #2964767 ~~(see http://bit.ly/90vFfp)~~. + Updated PayPal donations narrative on welcome page. @@ -998,7 +998,7 @@ _Internal CodeSnip version 3.98.1_ - Use web service's revised download file format - Validate download data before updating local database. - Provide better download error messages. -+ Fixed bug #2947794 in view link dialogue box (see http://bit.ly/beiZZ8). ++ Fixed bug #2947794 in view link dialogue box ~~(see http://bit.ly/beiZZ8)~~. + Refactored some exception handling code. @@ -1039,7 +1039,7 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.4.6 of 18 November 2009 -+ Changed code that takes a security backup of main database during updates to store backup in a single file rather as separate files in a temporary folder. This should fix bug #2898687 (see http://bit.ly/bKg6oH). ++ Changed code that takes a security backup of main database during updates to store backup in a single file rather as separate files in a temporary folder. This should fix bug #2898687 ~~(see http://bit.ly/bKg6oH)~~. + Slightly modified user database backup file format to match that now used for main database backup. + Fixed potential bugs: - Code that performs busy waits could have caused program to freeze. @@ -1049,9 +1049,9 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.4.5 of 09 November 2009 -+ Home, Ctrl+Home, End and Ctrl+End keys now work in overview pane and go to first and last item in tree view respectively per feature request #2888880 - see http://bit.ly/bgJCVU). ++ Home, Ctrl+Home, End and Ctrl+End keys now work in overview pane and go to first and last item in tree view respectively per feature request #2888880 ~~(see http://bit.ly/bgJCVU)~~. + State of tree view in overview pane is now maintained after editing the user database: the tree is no longer always fully expanded after each edit. -+ Removed "Properties" button from print dialogue box along with associated dialogue boxes. This option has always been buggy. This "fixes" bug #2868706 (see http://bit.ly/9LArqI). ++ Removed "Properties" button from print dialogue box along with associated dialogue boxes. This option has always been buggy. This "fixes" bug #2868706 ~~(see http://bit.ly/9LArqI)~~. + Fixed unreported makefile bug. @@ -1059,7 +1059,7 @@ _Internal CodeSnip version 3.98.1_ + Changed bug reporting mechanism. Bugs are now reported via the on-line bug tracker. Bug report dialogues changed accordingly. Access to the old bug report web service was removed. + Added two new default syntax highlighter styles: "Visual Studio" and "No Highlighter". The latter switches off syntax highlighting. -+ Fixed bug no. 2882331 (see http://bit.ly/beArcC). This was a bug in the syntax highlighter that occurred when an unexpected character was encountered. ++ Fixed bug no. 2882331 ~~(see http://bit.ly/beArcC)~~. This was a bug in the syntax highlighter that occurred when an unexpected character was encountered. + Updated help file re changes. + Some minor source code corrections. @@ -1076,7 +1076,7 @@ _Internal CodeSnip version 3.98.1_ ## Release v3.4.2 of 10 October 2009 -+ Fixed bugs #2868706 (see http://bit.ly/9LArqI) and #2875857 (see http://bit.ly/bN4xqE) ++ Fixed bugs #2868706 ~~(see http://bit.ly/9LArqI)~~ and #2875857 ~~(see http://bit.ly/bN4xqE)~~ + Updated GIF image handling code. From 44dfc2015d6826aad7520c84f347fd18e21213e8 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 15 May 2020 00:33:07 +0100 Subject: [PATCH 326/714] Add introductory text to change log --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a83755ec3..be1f28277 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ # Changelog +This is the change log for _DelphiDabbler CodeSnip_. + +All notable changes to this project are documented in this file. + +This change log begins with the first ever pre-release version of _CodeSnip_. Releases are sequential in reverse version number order. + +> Note that _CodeSnip_ v4 was developed in parallel with v3 for a while. As a consequence some later v3 releases have later release dates than early v4 releases. + +From v4.1.0 the version numbering has attempted to adhere to the principles of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + ## Release v4.15.1 of 22 September 2016 + Updated OS detection code to detect Windows 10 Version 1607 (Anniversary update) and all technical previews of Windows 2016 Server to date. From 790824d1a36425f5f34273605fa6ccf0a496b76a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 15 May 2020 01:02:56 +0100 Subject: [PATCH 327/714] Remove ChangeLogs folder from example folder tree --- Build.html | 1684 ++++++++++++++++++++++++++-------------------------- 1 file changed, 841 insertions(+), 843 deletions(-) diff --git a/Build.html b/Build.html index e83f81d2e..79315fab2 100644 --- a/Build.html +++ b/Build.html @@ -1,843 +1,841 @@ - - - - - - - - - Building CodeSnip - - - - - - -

    - CodeSnip Build Instructions -

    - -

    - Introduction -

    - -

    - CodeSnip is written in Object Pascal and is targeted at Delphi - XE. Compilation with other compilers is not guaranteed. -

    - -

    - The are currently two editions of CodeSnip: the standard edition and - the portable edition. They both share the same code base: the different - editions are created using conditional compilation. These instructions show - how to build either edition. -

    - -

    - Dependencies -

    - -

    - Several DelphiDabbler and other 3rd party libraries and components are - required to compile CodeSnip. They are all included in the code - repository in the Src/3rdParty directory. -

    - -

    - It goes without saying that you will also need the RTL and VCL that ships with - Delphi. -

    - -

    - Build Tools -

    - -

    - The following tools are required to build CodeSnip. -

    - -

    - Delphi -

    - -

    - All the following tools that ship with Delphi XE are required: -

    - -
    -
    - MAKE -
    -
    - The make tool – do not use the Microsoft make tool. -
    -
    - DCC32 -
    -
    - The Delphi command line compiler. -
    -
    - BRCC32 -
    -
    - The Borland resource compiler. Used to compile various resource source - (.rc) files. -
    -
    - GenTLB -
    -
    - Type library generator. Used to create the ExternalObj.tlb type - library from source code in ExternalObj.ridl. -
    -
    - TLibImpl -
    -
    - Type library importer tool. Used to create a Pascal unit that describes - code contained in ExternalObj.idl. -
    -
    - -

    - The following environment variables are associated with these tools: -

    - -
    -
    - DELPHIROOT - required unless DELPHIXE is set. -
    -
    - Should be set to the install directory of the version of Delphi being - used. DCC32, BRCC32 and TLibImpl - are expected to be in the Bin sub-directory of - DELPHIROOT. -
    -
    - DELPHIXE - optional -
    -
    - This environment variable can be set to the Delphi XE install - directory. When DELPHIXE is defined - DELPHIROOT will be set to the value of - DELPHIXE. -
    -
    - -

    - DelphiDabbler Version Information Editor (VIEd) -

    - -

    - This tool is used to compile version information (.vi) files - into intermediate resource source (.rc) files. Version 2.11.2 - or later is required. - Version Information Editor can be obtained from - https://github.com/delphidabbler/vied/releases. -

    - -

    - The program is expected to be on the path unless its install directory is - specified by the VIEDROOT environment variable. -

    - -

    - DelphiDabbler HTML Resource Compiler (HTMLRes) -

    - -

    - HTMLRes is used to compile HTML.hrc which adds various - HTML, JavaScript, CSS and images to HTML resources. Version 1.1 or later - is required. - The HTML Resource Compiler can be obtained from - https://github.com/delphidabbler/htmlres/releases. -

    - -

    - The program is expected to be on the path unless its install directory is - specified by the HTMLRESROOT environment variable. -

    - -

    - Inno Setup -

    - -

    - The Unicode version of the Inno setup command line compiler is needed to - create CodeSnip's install program. v5.5.2(u) or later is required. -

    - -

    - You can get Inno Setup at http://www.jrsoftware.org/isinfo.php. Choose the Unicode version and - ensure that the ISPP pre-processor is installed. If you already have the ANSI - version the Unicode version can be installed alongside it - just use a - different install directory and program group name. -

    - -

    - The path to Unicode Inno Setup's install directory will be looked for in the - INNOSETUP_U environment variable, or, if that is not set, in the - INNOSETUP environment variable. If neither of these is set then - the correct version of Inno Setup is expected to be on the path. -

    - -

    - Note: Inno Setup is not required if you are creating only the - portable edition of CodeSnip since that edition does not have an - install program. -

    - -

    - Microsoft HTML Help Compiler (HHC) -

    - -

    - This command line compiler is supplied with Microsoft HTML Help Workshop. It - is used to compile the CodeSnip help file. -

    - -

    - The program is expected to be on the path unless its install directory is - specified by the HHCROOT environment variable. -

    - -

    - Zip -

    - -

    - This program is used to create CodeSnip's release file. - You can get a Windows command line version at - http://stahlforce.com/dev/index.php?tool=zipunzip. -

    - -

    - The program is expected to be on the path unless its install directory is - specified by the ZIPROOT environment variable. -

    - -

    - You do not need Zip if you do not intend to create release files. -

    - -

    - Note: You can use the Delphi IDE to edit the code and test compile it. However you will need to build the code from the makefile first to ensure all the required resource files and auto-generated files are present. If you change any resource files or type libraries you also need to re-run the makefile. Final builds should always be created using the makefile. -

    - - -

    - Preparation -

    - -

    - Configure the environment. -

    - -

    - You can configure environment variables either by modifying your system - environment variables or by creating a batch file that you run before - performing the build. -

    - -

    - Step 1 -

    - -

    - Configure the required environment variables. Compilation will fail if these - environment variables are not set: -

    - -
      -
    • - DELPHIROOT or DELPHIXE -
    • -
    - -

    - Step 2 -

    - -

    - Update the PATH environment variable to include - %DELPHIROOT%\Bin as its first path, i.e. do: -

    - -
    > set PATH=%DELPHIROOT%\Bin;%PATH%
    - -

    - You do not have to do this but it means you can run - Make from the command line without having to specify its path - every time. -

    - -

    - Step 3 -

    - -

    - Set any of the following environment variables that are needed to specify - the path to any tools that cannot be found on the path: -

    - -
      -
    • - VIEDROOT -
    • -
    • - HTMLRESROOT -
    • -
    • - INNOSETUP_U or INNOSETUP -
    • -
    • - HHCROOT -
    • -
    • - ZIPROOT -
    • -
    - -

    - Get the Source Code -

    - -

    - The source code is maintained in the delphidabbler/codesnip Git respository on GitHub. -

    - -

    - If you are intending to contribute code to the project you need to: -

    - -
      -
    1. - Fork the project on GitHub. -
    2. -
    3. - Create a new branch off the development branch. -
    4. -
    5. - Make your changes on the branch you created. -
    6. -
    7. - Once finished raise a pull request for your code on the delphidabbler/codesnip repo. -
    8. -
    - -

    - If you only intend to use the code for your own purposes you can still fork the repository as above. Alternatively you can download the source code from the project's Releases section on GitHub – just choose the version you want. -

    - -

    - Configure the Source Tree -

    - -

    - After forking the repository or downloading and extracting the source code you should have the following directory structure: -

    - -
    ./
    -  |
    -  +-- Docs                  - documentation
    -  |   |
    -  |   +-- ChangeLogs        - program change log files
    -  |   |
    -  |   +-- Design            - documents concerning program design
    -  |      |
    -  |      +-- FileFormats    - documentation of CodeSnip's file formats
    -  |
    -  +-- Src                   - main CodeSnip source code
    -  |   |
    -  |   +-- 3rdParty          - third party & DelphiDabbler library source code
    -  |   |
    -  |   +-- AutoGen           - receives automatically generated code
    -  |   |
    -  |   +-- Help              - help source files
    -  |   |   |
    -  |   |   +-- CSS           - CSS code for help files
    -  |   |   |
    -  |   |   +-- HTML          - HTML files included in help file
    -  |   |   |
    -  |   |   +-- Images        - images included in help file
    -  |   |
    -  |   +-- Install           - setup script and support code
    -  |   |   |
    -  |   |   +-- Assets        - files required for inclusion in install program
    -  |   |
    -  |   +-- Res               - container for files that are embedded in resources
    -  |       |
    -  |       +-- CSS           - CSS files
    -  |       |
    -  |       +-- HTML          - HTML files
    -  |       |
    -  |       +-- Img           - image files
    -  |       |   |
    -  |       |   +-- Branding  - image files used for CodeSnip branding
    -  |       |   |
    -  |       |   +-- Egg       - image files for 'Easter Egg'
    -  |       |
    -  |       +-- Misc          - other resources
    -  |       |
    -  |       +-- Scripts       - scripting files
    -  |           |
    -  |           +-- 3rdParty  - 3rd party scripting files
    -  |
    -  +-- Tests                 - contains test code
    -      |
    -      +-- Src               - test source code
    -          |
    -          +-- DUnit         - test source code that uses the DUnit framework
    -

    - If, by chance you also have Bin, Exe and / or - Release directories don't worry - all will become clear. - Git users may also see the usual .git hidden - directory. If you have done some editing in the Delphi IDE you may also see - occasional hidden __history folders. -

    - -

    - Before you can get hacking, you need to prepare the code tree. Open a command - console then run any script you may have created to set the required environment variables. Now navigate into the Src sub-folder and do: -

    - -
    > Make config
    - -

    - You may need to replace Make with the full path to - Make if it isn't on the path. If this is the case try: -

    - -
    > %DELPHIROOT%\Bin\Make config
    - -

    - or -

    - -
    > %DELPHIXE%\Bin\Make config
    - -

    - depending on which environment variable you have set. -

    - -

    - Once Make config has run your folder structure should - have acquired the following new folders, if they weren't present already: -

    - -
    ./
    -  |
    -  +-- Bin                   - receives object files for CodeSnip
    -  |
    -  ...
    -  |
    -  +-- Exe                   - receives executable code and compiled help file
    -  |
    -  +-- Release               - receives release files
    -  |
    -  ...
    - -

    - If the Bin folder already existed, it will have been emptied. - In addition, Make will have created a .cfg file from - template in the Src folder. This .cfg file is needed - for DCC32 to run correctly. The file will be ignored by Git. -

    - -

    - Using the Delphi IDE -

    - -

    - If you are intending to use the Delphi IDE to compile code, you should also - do: -

    - -
    > Make resources
    -> Make typelib
    -> Make autogen
    - -

    - This compiles the resource files that the IDE needs to link into compiled - executables, compiles the type library from IDL code and generates the - Pascal file that provides an interface to the type library. -

    - -

    - If you wish to build the portable edition of CodeSnip you also need - to do: -

    - -
    > Make -DPORTABLE resources
    - -

    - and define the PORTABLE conditional define in Project - Options. The standard name for the portable exe file is - CodeSnip-p.exe, but the IDE will generate - CodeSnip.exe. You can rename the file manually. -

    - -

    - Note that building with the make file insted of the IDE performs all the above - steps automatically. -

    - -

    - Building CodeSnip -

    - -

    - This section guides you through building CodeSnip from the command - line, not from the IDE. -

    - -

    - You have several options: -

    - -
      -
    • - Build the CodeSnip Executable -
    • -
    • - Build the Help File. -
    • -
    • - Build the Setup Program. -
    • -
    • - Build the Release Zip File. -
    • -
    • - Build and Release Everything. -
    • -
    • - Clean Up. -
    • -
    - -

    - Each of these options is described below. All except the last assume that - Make config has been run. -

    - -

    - Note: This information applies only to building - CodeSnip itself, not to building and using the code in the - Test directory. -

    - -

    - Build the CodeSnip Executable -

    - -

    - This is the most common build and has a simple command: -

    - -
    > Make codesnip
    - -

    - This is the same as doing this sequence of commands: -

    - -
    > Make typelib
    -> Make resources
    -> Make autogen
    -> Make pascal
    - -

    - The CodeSnip executable, named CodeSnip.exe will be - placed in the Exe folder. -

    - -

    - Portable edition -

    - -

    - To build the portable edition of CodeSnip you must either define the - PORTABLE environment variable or do: -

    - -
    > Make -DPORTABLE codesnip
    - -

    - Again the executable is placed in the Exe folder, but this time - it is named CodeSnip-p.exe -

    - -

    - Build the Help File -

    - -

    - To build the help file just do -

    - -
    > Make help
    - -

    - Build the Setup Program -

    - -

    - The setup program requires that the CodeSnip excutable and the - compiled help file are already present in the Exe directory. -

    - -

    - As an aside, you can make all the required files by doing: -

    - -
    > Make exes
    - -

    - Once you have built all the required files you build the setup file by - doing: -

    - -
    > Make setup
    - -

    - The setup program is named CodeSnip-Setup-x.x.x.exe, where - x.x.x is the version number extracted from CodeSnip's version - information. It is placed in the Exe directory. -

    - -

    - If the SpecialBuild string is defined in CodeSnip's - version information the string will be appended to the setup file name like - this CodeSnip-Setup-x.x.x-SPECIALBUILD. -

    - -

    - Portable edition -

    - -

    - CodeSnip's portable edition does not use a setup file so Make - setup does nothing except print a message if it is run when the - PORTABLE symbol is defined. -

    - -

    - Build the Release Zip File -

    - -

    - Make can create zip files containing all the files that are included in a release. -

    - -

    - Standard edition -

    - -

    - The release file for the standard edition of CodeSnip includes the - setup file along with ReadMe.txt from the Docs - directory. Both files must exist. -

    - -

    - Build the release by doing: -

    - -
    > Make release
    - -

    - By default the release file is named dd-codesnip.zip. You can - change this name by defining the RELEASEFILENAME macro or - enviroment variable. For example, you can name the file - MyRelease.zip by doing: -

    - -
    > Make -DRELEASEFILENAME=MyRelease.zip release
    - -

    - Portable edition -

    - -

    - The release file for the portable edition includes the portable executable - file, CodeSnip-p.exe, the help file CodeSnip.chm and - several files from the Docs directory. All must be present. -

    - -

    - Build the portable release by doing: -

    - -
    > Make -DPORTABLE release
    - -

    - By default the release file is named dd-codesnip-portable.zip. - You can change this name by defining the RELEASEFILENAME macro or - enviroment variable. For example, you can name the file - MyPortableRelease.zip by doing: -

    - -
    > Make -DPORTABLE -DRELEASEFILENAME=MyPortableRelease.zip release
    - -

    - Warning: If you are building both the standard and portable - releases with custom file names, make sure you supply a different value of - the RELEASEFILENAME macro for each release, otherwise the last - built release will overwrite the first. -

    - - -

    - Build and Release Everything -

    - -

    - You can do a complete build of everything, and generate the release zip file - simply by doing: -

    - -
    > Make
    - -

    - without specifying a target. This is the equivalent of: -

    - -
    > Make config
    -> Make exes
    -> Make setup
    -> Make release
    - -

    - Portable edition -

    - -

    - To perform a complete build of the portable edition of CodeSnip do -

    - -
    > Make -DPORTABLE
    - -

    - Clean Up -

    - -

    - Various temporary files and directories are created by the IDE. These can be - deleted by running. -

    - -
    > Make clean
    - -

    - Warning: This command removes the __history - folders that Delphi uses to roll back to earlier versions of files. -

    - -

    - Running the Tests -

    - -

    - At present all tests use the DUnit unit testing framework and are - combined into a single test application. -

    - -

    - To compile the tests, open the .\Src\CodeSnip.groupproj group - project file in the Delphi XE IDE. Now select the CodeSnipTests.exe - target in the project manager and compile. -

    - -

    - If they were not already present Bin and Exe - sub-directories will have been created in the .\Tests directory. - The Exe directory contains the DUnit test program while - Bin contains intermediate binaries. -

    - -

    - You can compile the tests as either a GUI application (default) or as a - console application. For details please see the comments in - .\Tests\Src\DUnit\CodeSnipTests.dpr. -

    - -

    - License -

    - -

    - The majority of CodeSnip's original source code is licensed under the - Mozilla Public License v2.0. The are a few exceptions, mainly relating to - third party source code and image files. For full details of all applicable - licenses please read License.html in the Docs - directory. -

    - - - - + + + + + + + + + Building CodeSnip + + + + + + +

    + CodeSnip Build Instructions +

    + +

    + Introduction +

    + +

    + CodeSnip is written in Object Pascal and is targeted at Delphi + XE. Compilation with other compilers is not guaranteed. +

    + +

    + The are currently two editions of CodeSnip: the standard edition and + the portable edition. They both share the same code base: the different + editions are created using conditional compilation. These instructions show + how to build either edition. +

    + +

    + Dependencies +

    + +

    + Several DelphiDabbler and other 3rd party libraries and components are + required to compile CodeSnip. They are all included in the code + repository in the Src/3rdParty directory. +

    + +

    + It goes without saying that you will also need the RTL and VCL that ships with + Delphi. +

    + +

    + Build Tools +

    + +

    + The following tools are required to build CodeSnip. +

    + +

    + Delphi +

    + +

    + All the following tools that ship with Delphi XE are required: +

    + +
    +
    + MAKE +
    +
    + The make tool – do not use the Microsoft make tool. +
    +
    + DCC32 +
    +
    + The Delphi command line compiler. +
    +
    + BRCC32 +
    +
    + The Borland resource compiler. Used to compile various resource source + (.rc) files. +
    +
    + GenTLB +
    +
    + Type library generator. Used to create the ExternalObj.tlb type + library from source code in ExternalObj.ridl. +
    +
    + TLibImpl +
    +
    + Type library importer tool. Used to create a Pascal unit that describes + code contained in ExternalObj.idl. +
    +
    + +

    + The following environment variables are associated with these tools: +

    + +
    +
    + DELPHIROOT - required unless DELPHIXE is set. +
    +
    + Should be set to the install directory of the version of Delphi being + used. DCC32, BRCC32 and TLibImpl + are expected to be in the Bin sub-directory of + DELPHIROOT. +
    +
    + DELPHIXE - optional +
    +
    + This environment variable can be set to the Delphi XE install + directory. When DELPHIXE is defined + DELPHIROOT will be set to the value of + DELPHIXE. +
    +
    + +

    + DelphiDabbler Version Information Editor (VIEd) +

    + +

    + This tool is used to compile version information (.vi) files + into intermediate resource source (.rc) files. Version 2.11.2 + or later is required. + Version Information Editor can be obtained from + https://github.com/delphidabbler/vied/releases. +

    + +

    + The program is expected to be on the path unless its install directory is + specified by the VIEDROOT environment variable. +

    + +

    + DelphiDabbler HTML Resource Compiler (HTMLRes) +

    + +

    + HTMLRes is used to compile HTML.hrc which adds various + HTML, JavaScript, CSS and images to HTML resources. Version 1.1 or later + is required. + The HTML Resource Compiler can be obtained from + https://github.com/delphidabbler/htmlres/releases. +

    + +

    + The program is expected to be on the path unless its install directory is + specified by the HTMLRESROOT environment variable. +

    + +

    + Inno Setup +

    + +

    + The Unicode version of the Inno setup command line compiler is needed to + create CodeSnip's install program. v5.5.2(u) or later is required. +

    + +

    + You can get Inno Setup at http://www.jrsoftware.org/isinfo.php. Choose the Unicode version and + ensure that the ISPP pre-processor is installed. If you already have the ANSI + version the Unicode version can be installed alongside it - just use a + different install directory and program group name. +

    + +

    + The path to Unicode Inno Setup's install directory will be looked for in the + INNOSETUP_U environment variable, or, if that is not set, in the + INNOSETUP environment variable. If neither of these is set then + the correct version of Inno Setup is expected to be on the path. +

    + +

    + Note: Inno Setup is not required if you are creating only the + portable edition of CodeSnip since that edition does not have an + install program. +

    + +

    + Microsoft HTML Help Compiler (HHC) +

    + +

    + This command line compiler is supplied with Microsoft HTML Help Workshop. It + is used to compile the CodeSnip help file. +

    + +

    + The program is expected to be on the path unless its install directory is + specified by the HHCROOT environment variable. +

    + +

    + Zip +

    + +

    + This program is used to create CodeSnip's release file. + You can get a Windows command line version at + http://stahlforce.com/dev/index.php?tool=zipunzip. +

    + +

    + The program is expected to be on the path unless its install directory is + specified by the ZIPROOT environment variable. +

    + +

    + You do not need Zip if you do not intend to create release files. +

    + +

    + Note: You can use the Delphi IDE to edit the code and test compile it. However you will need to build the code from the makefile first to ensure all the required resource files and auto-generated files are present. If you change any resource files or type libraries you also need to re-run the makefile. Final builds should always be created using the makefile. +

    + + +

    + Preparation +

    + +

    + Configure the environment. +

    + +

    + You can configure environment variables either by modifying your system + environment variables or by creating a batch file that you run before + performing the build. +

    + +

    + Step 1 +

    + +

    + Configure the required environment variables. Compilation will fail if these + environment variables are not set: +

    + +
      +
    • + DELPHIROOT or DELPHIXE +
    • +
    + +

    + Step 2 +

    + +

    + Update the PATH environment variable to include + %DELPHIROOT%\Bin as its first path, i.e. do: +

    + +
    > set PATH=%DELPHIROOT%\Bin;%PATH%
    + +

    + You do not have to do this but it means you can run + Make from the command line without having to specify its path + every time. +

    + +

    + Step 3 +

    + +

    + Set any of the following environment variables that are needed to specify + the path to any tools that cannot be found on the path: +

    + +
      +
    • + VIEDROOT +
    • +
    • + HTMLRESROOT +
    • +
    • + INNOSETUP_U or INNOSETUP +
    • +
    • + HHCROOT +
    • +
    • + ZIPROOT +
    • +
    + +

    + Get the Source Code +

    + +

    + The source code is maintained in the delphidabbler/codesnip Git respository on GitHub. +

    + +

    + If you are intending to contribute code to the project you need to: +

    + +
      +
    1. + Fork the project on GitHub. +
    2. +
    3. + Create a new branch off the development branch. +
    4. +
    5. + Make your changes on the branch you created. +
    6. +
    7. + Once finished raise a pull request for your code on the delphidabbler/codesnip repo. +
    8. +
    + +

    + If you only intend to use the code for your own purposes you can still fork the repository as above. Alternatively you can download the source code from the project's Releases section on GitHub – just choose the version you want. +

    + +

    + Configure the Source Tree +

    + +

    + After forking the repository or downloading and extracting the source code you should have the following directory structure: +

    + +
    ./
    +  |
    +  +-- Docs                  - documentation
    +  |   |
    +  |   +-- Design            - documents concerning program design
    +  |      |
    +  |      +-- FileFormats    - documentation of CodeSnip's file formats
    +  |
    +  +-- Src                   - main CodeSnip source code
    +  |   |
    +  |   +-- 3rdParty          - third party & DelphiDabbler library source code
    +  |   |
    +  |   +-- AutoGen           - receives automatically generated code
    +  |   |
    +  |   +-- Help              - help source files
    +  |   |   |
    +  |   |   +-- CSS           - CSS code for help files
    +  |   |   |
    +  |   |   +-- HTML          - HTML files included in help file
    +  |   |   |
    +  |   |   +-- Images        - images included in help file
    +  |   |
    +  |   +-- Install           - setup script and support code
    +  |   |   |
    +  |   |   +-- Assets        - files required for inclusion in install program
    +  |   |
    +  |   +-- Res               - container for files that are embedded in resources
    +  |       |
    +  |       +-- CSS           - CSS files
    +  |       |
    +  |       +-- HTML          - HTML files
    +  |       |
    +  |       +-- Img           - image files
    +  |       |   |
    +  |       |   +-- Branding  - image files used for CodeSnip branding
    +  |       |   |
    +  |       |   +-- Egg       - image files for 'Easter Egg'
    +  |       |
    +  |       +-- Misc          - other resources
    +  |       |
    +  |       +-- Scripts       - scripting files
    +  |           |
    +  |           +-- 3rdParty  - 3rd party scripting files
    +  |
    +  +-- Tests                 - contains test code
    +      |
    +      +-- Src               - test source code
    +          |
    +          +-- DUnit         - test source code that uses the DUnit framework
    +

    + If, by chance you also have Bin, Exe and / or + Release directories don't worry - all will become clear. + Git users may also see the usual .git hidden + directory. If you have done some editing in the Delphi IDE you may also see + occasional hidden __history folders. +

    + +

    + Before you can get hacking, you need to prepare the code tree. Open a command + console then run any script you may have created to set the required environment variables. Now navigate into the Src sub-folder and do: +

    + +
    > Make config
    + +

    + You may need to replace Make with the full path to + Make if it isn't on the path. If this is the case try: +

    + +
    > %DELPHIROOT%\Bin\Make config
    + +

    + or +

    + +
    > %DELPHIXE%\Bin\Make config
    + +

    + depending on which environment variable you have set. +

    + +

    + Once Make config has run your folder structure should + have acquired the following new folders, if they weren't present already: +

    + +
    ./
    +  |
    +  +-- Bin                   - receives object files for CodeSnip
    +  |
    +  ...
    +  |
    +  +-- Exe                   - receives executable code and compiled help file
    +  |
    +  +-- Release               - receives release files
    +  |
    +  ...
    + +

    + If the Bin folder already existed, it will have been emptied. + In addition, Make will have created a .cfg file from + template in the Src folder. This .cfg file is needed + for DCC32 to run correctly. The file will be ignored by Git. +

    + +

    + Using the Delphi IDE +

    + +

    + If you are intending to use the Delphi IDE to compile code, you should also + do: +

    + +
    > Make resources
    +> Make typelib
    +> Make autogen
    + +

    + This compiles the resource files that the IDE needs to link into compiled + executables, compiles the type library from IDL code and generates the + Pascal file that provides an interface to the type library. +

    + +

    + If you wish to build the portable edition of CodeSnip you also need + to do: +

    + +
    > Make -DPORTABLE resources
    + +

    + and define the PORTABLE conditional define in Project + Options. The standard name for the portable exe file is + CodeSnip-p.exe, but the IDE will generate + CodeSnip.exe. You can rename the file manually. +

    + +

    + Note that building with the make file insted of the IDE performs all the above + steps automatically. +

    + +

    + Building CodeSnip +

    + +

    + This section guides you through building CodeSnip from the command + line, not from the IDE. +

    + +

    + You have several options: +

    + +
      +
    • + Build the CodeSnip Executable +
    • +
    • + Build the Help File. +
    • +
    • + Build the Setup Program. +
    • +
    • + Build the Release Zip File. +
    • +
    • + Build and Release Everything. +
    • +
    • + Clean Up. +
    • +
    + +

    + Each of these options is described below. All except the last assume that + Make config has been run. +

    + +

    + Note: This information applies only to building + CodeSnip itself, not to building and using the code in the + Test directory. +

    + +

    + Build the CodeSnip Executable +

    + +

    + This is the most common build and has a simple command: +

    + +
    > Make codesnip
    + +

    + This is the same as doing this sequence of commands: +

    + +
    > Make typelib
    +> Make resources
    +> Make autogen
    +> Make pascal
    + +

    + The CodeSnip executable, named CodeSnip.exe will be + placed in the Exe folder. +

    + +

    + Portable edition +

    + +

    + To build the portable edition of CodeSnip you must either define the + PORTABLE environment variable or do: +

    + +
    > Make -DPORTABLE codesnip
    + +

    + Again the executable is placed in the Exe folder, but this time + it is named CodeSnip-p.exe +

    + +

    + Build the Help File +

    + +

    + To build the help file just do +

    + +
    > Make help
    + +

    + Build the Setup Program +

    + +

    + The setup program requires that the CodeSnip excutable and the + compiled help file are already present in the Exe directory. +

    + +

    + As an aside, you can make all the required files by doing: +

    + +
    > Make exes
    + +

    + Once you have built all the required files you build the setup file by + doing: +

    + +
    > Make setup
    + +

    + The setup program is named CodeSnip-Setup-x.x.x.exe, where + x.x.x is the version number extracted from CodeSnip's version + information. It is placed in the Exe directory. +

    + +

    + If the SpecialBuild string is defined in CodeSnip's + version information the string will be appended to the setup file name like + this CodeSnip-Setup-x.x.x-SPECIALBUILD. +

    + +

    + Portable edition +

    + +

    + CodeSnip's portable edition does not use a setup file so Make + setup does nothing except print a message if it is run when the + PORTABLE symbol is defined. +

    + +

    + Build the Release Zip File +

    + +

    + Make can create zip files containing all the files that are included in a release. +

    + +

    + Standard edition +

    + +

    + The release file for the standard edition of CodeSnip includes the + setup file along with ReadMe.txt from the Docs + directory. Both files must exist. +

    + +

    + Build the release by doing: +

    + +
    > Make release
    + +

    + By default the release file is named dd-codesnip.zip. You can + change this name by defining the RELEASEFILENAME macro or + enviroment variable. For example, you can name the file + MyRelease.zip by doing: +

    + +
    > Make -DRELEASEFILENAME=MyRelease.zip release
    + +

    + Portable edition +

    + +

    + The release file for the portable edition includes the portable executable + file, CodeSnip-p.exe, the help file CodeSnip.chm and + several files from the Docs directory. All must be present. +

    + +

    + Build the portable release by doing: +

    + +
    > Make -DPORTABLE release
    + +

    + By default the release file is named dd-codesnip-portable.zip. + You can change this name by defining the RELEASEFILENAME macro or + enviroment variable. For example, you can name the file + MyPortableRelease.zip by doing: +

    + +
    > Make -DPORTABLE -DRELEASEFILENAME=MyPortableRelease.zip release
    + +

    + Warning: If you are building both the standard and portable + releases with custom file names, make sure you supply a different value of + the RELEASEFILENAME macro for each release, otherwise the last + built release will overwrite the first. +

    + + +

    + Build and Release Everything +

    + +

    + You can do a complete build of everything, and generate the release zip file + simply by doing: +

    + +
    > Make
    + +

    + without specifying a target. This is the equivalent of: +

    + +
    > Make config
    +> Make exes
    +> Make setup
    +> Make release
    + +

    + Portable edition +

    + +

    + To perform a complete build of the portable edition of CodeSnip do +

    + +
    > Make -DPORTABLE
    + +

    + Clean Up +

    + +

    + Various temporary files and directories are created by the IDE. These can be + deleted by running. +

    + +
    > Make clean
    + +

    + Warning: This command removes the __history + folders that Delphi uses to roll back to earlier versions of files. +

    + +

    + Running the Tests +

    + +

    + At present all tests use the DUnit unit testing framework and are + combined into a single test application. +

    + +

    + To compile the tests, open the .\Src\CodeSnip.groupproj group + project file in the Delphi XE IDE. Now select the CodeSnipTests.exe + target in the project manager and compile. +

    + +

    + If they were not already present Bin and Exe + sub-directories will have been created in the .\Tests directory. + The Exe directory contains the DUnit test program while + Bin contains intermediate binaries. +

    + +

    + You can compile the tests as either a GUI application (default) or as a + console application. For details please see the comments in + .\Tests\Src\DUnit\CodeSnipTests.dpr. +

    + +

    + License +

    + +

    + The majority of CodeSnip's original source code is licensed under the + Mozilla Public License v2.0. The are a few exceptions, mainly relating to + third party source code and image files. For full details of all applicable + licenses please read License.html in the Docs + directory. +

    + + + + From bcc16da4e85aebb55e92edd498a10d53289cde6e Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 15 May 2020 01:12:16 +0100 Subject: [PATCH 328/714] Modify README re new changelog file --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 04ae179ef..b4d161653 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,9 @@ There is also an [FAQ](https://github.com/delphidabbler/codesnip-faq) -- (see [S ## Change Log -The program's current change log can be found in the file `Docs/ChangeLogs/ChangeLog-v4.txt` on the `master` branch. Change logs for other major releases are in the same directory. +The program's current change log can be found in the file `CHANGELOG.md` in the root of the `master` branch. + +> Note that CodeSnip v4.15.1 and earlier did not have `CHANGELOG.md`. Instead, some versions maintained a separate change log for each major version in the `Docs/ChangeLogs` directory. ## License From 43e5fed9f330c9f5cce3b74975a21163b2485cd4 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 24 May 2020 12:46:04 +0100 Subject: [PATCH 329/714] Change text and identifier referencing SWAG snippets to "packets" SWAG terminology for "snippets" is "packets". So all references to "snippets" in the context of SWAG packages have been renamed. This includes identifiers, dialogue box text, and comments. Any text referencing "snippets" in the context of CodeSnip snippets has been left unchanged. No XML tag names have been changed as yet: those names are still valid in pre-release copies of the SWAG database, though that will change. --- Src/FmSWAGImportDlg.dfm | 73 ++++++---- Src/FmSWAGImportDlg.pas | 285 +++++++++++++++++++------------------ Src/SWAG.UCommon.pas | 26 ++-- Src/SWAG.UImporter.pas | 109 +++++++------- Src/SWAG.UReader.pas | 216 ++++++++++++++-------------- Src/SWAG.USnippetCache.pas | 60 ++++---- Src/SWAG.UXMLProcessor.pas | 270 +++++++++++++++++------------------ 7 files changed, 531 insertions(+), 508 deletions(-) diff --git a/Src/FmSWAGImportDlg.dfm b/Src/FmSWAGImportDlg.dfm index 72874178a..38ae143cc 100644 --- a/Src/FmSWAGImportDlg.dfm +++ b/Src/FmSWAGImportDlg.dfm @@ -19,12 +19,16 @@ inherited SWAGImportDlg: TSWAGImportDlg inherited pcWizard: TPageControl Width = 671 Height = 456 - ActivePage = tsUpdate + ActivePage = tsCategories ExplicitWidth = 671 ExplicitHeight = 456 object tsIntro: TTabSheet Caption = 'tsIntro' TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 inline frmIntro: THTMLTpltDlgFrame Left = 0 Top = 0 @@ -55,6 +59,10 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsFolder' ImageIndex = 4 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblFolder: TLabel Left = 0 Top = 8 @@ -68,9 +76,9 @@ inherited SWAGImportDlg: TSWAGImportDlg object lblFolderPageInfo: TLabel Left = 0 Top = 72 - Width = 270 + Width = 267 Height = 13 - Caption = 'Click the Next button to choose which snippets to import' + Caption = 'Click the Next button to choose which packets to import' end object edPath: TEdit Left = 0 @@ -113,20 +121,20 @@ inherited SWAGImportDlg: TSWAGImportDlg Height = 36 AutoSize = False Caption = - 'Select a category from the list on the left and click "Show Snip' + - 'pets In Category" (or double click the category) to display a li' + - 'st of its snippets in the right hand list. Tick the snippets you' + - ' want to import. Repeat with as many categories as you wish. Whe' + - 'n you are ready to import click "Next".' + 'Select a category from the list on the left and click "Show Pack' + + 'ets In Category" (or double click the category) to display a lis' + + 't of its packets in the right hand list. Tick the packet(s) you ' + + 'want to import. Repeat with as many categories as you wish. When' + + ' you are ready to import click "Next".' WordWrap = True end - object lblSelectSnippets: TLabel + object lblSelectPackets: TLabel Left = 256 Top = 45 - Width = 119 + Width = 116 Height = 13 - Caption = '&Select required snippets:' - FocusControl = clbSelectSnippets + Caption = '&Select required packets:' + FocusControl = clbSelectPackets end object lbCategories: TListBox Left = 0 @@ -138,16 +146,16 @@ inherited SWAGImportDlg: TSWAGImportDlg OnDblClick = lbCategoriesDblClick OnKeyDown = lbCategoriesKeyDown end - object clbSelectSnippets: TCheckListBox + object clbSelectPackets: TCheckListBox Left = 256 Top = 64 Width = 404 Height = 321 - OnClickCheck = clbSelectSnippetsClickCheck + OnClickCheck = clbSelectPacketsClickCheck ItemHeight = 13 TabOrder = 2 - OnDblClick = clbSelectSnippetsDblClick - OnKeyDown = clbSelectSnippetsKeyDown + OnDblClick = clbSelectPacketsDblClick + OnKeyDown = clbSelectPacketsKeyDown end object btnDisplayCategory: TButton Left = 30 @@ -157,12 +165,12 @@ inherited SWAGImportDlg: TSWAGImportDlg Action = actDisplayCategory TabOrder = 1 end - object btnDisplaySnippet: TButton + object btnDisplayPacket: TButton Left = 280 Top = 391 Width = 185 Height = 25 - Action = actDisplaySnippet + Action = actDisplayPacket TabOrder = 3 end end @@ -170,6 +178,10 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsUpdate' ImageIndex = 2 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblUpdateDesc: TLabel Left = 0 Top = 3 @@ -177,11 +189,12 @@ inherited SWAGImportDlg: TSWAGImportDlg Height = 36 AutoSize = False Caption = - 'You have chosen to import the following SWAG snippets. They will' + - ' be imported with the given Display Names and Snippet IDs. You c' + - 'an change these if you wish using the Snippets Editor. To make c' + - 'hanges go back to the previous page. When you are ready to impor' + - 't the snippets click "Import". This step can'#39't be undone.' + 'You have chosen to import the following SWAG packets as CodeSnip' + + ' snippets. They will be imported with the given Display Names an' + + 'd Packet IDs. You can change these if you wish using the Snippet' + + 's Editor. To make changes go back to the previous page. When you' + + ' are ready to import the packets click "Import". This step can'#39't' + + ' be undone.' WordWrap = True end object lvImports: TListView @@ -212,6 +225,10 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsFinish' ImageIndex = 3 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 inline frmOutro: THTMLTpltDlgFrame Left = 0 Top = 0 @@ -250,14 +267,14 @@ inherited SWAGImportDlg: TSWAGImportDlg Left = 336 Top = 256 object actDisplayCategory: TAction - Caption = 'S&how Snippets In Category' + Caption = 'S&how Packets In Category' OnExecute = actDisplayCategoryExecute OnUpdate = actDisplayCategoryUpdate end - object actDisplaySnippet: TAction - Caption = '&Preview Selected Snippet...' - OnExecute = actDisplaySnippetExecute - OnUpdate = actDisplaySnippetUpdate + object actDisplayPacket: TAction + Caption = '&Preview Selected Packet...' + OnExecute = actDisplayPacketExecute + OnUpdate = actDisplayPacketUpdate end object actBrowse: TAction Caption = '...' diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index c9cf0f444..02d5b841f 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -6,7 +6,8 @@ * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a wizard dialogue box that lets the user select and import - * snippets from the DelphiDabbler implementation of the SWAG Pascal archive. + * packets from the DelphiDabbler implementation of the SWAG Pascal archive as + * new user-defined CodeSnip snippets. } @@ -41,16 +42,16 @@ interface type /// Class that implements a wizard dialogue box that lets the user - /// select and import snippets from the DelphiDabbler implementation of the - /// SWAG Pascal archive. + /// select and import packets from the DelphiDabbler implementation of the + /// SWAG Pascal archive as new user-defined CodeSnip snippets. TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) tsIntro: TTabSheet; tsCategories: TTabSheet; lblCategories: TLabel; lbCategories: TListBox; lblCategoriesDesc: TLabel; - lblSelectSnippets: TLabel; - clbSelectSnippets: TCheckListBox; + lblSelectPackets: TLabel; + clbSelectPackets: TCheckListBox; tsUpdate: TTabSheet; lvImports: TListView; lblUpdateDesc: TLabel; @@ -59,8 +60,8 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) btnDisplayCategory: TButton; alWizard: TActionList; actDisplayCategory: TAction; - actDisplaySnippet: TAction; - btnDisplaySnippet: TButton; + actDisplayPacket: TAction; + btnDisplayPacket: TButton; tsFolder: TTabSheet; lblFolder: TLabel; edPath: TEdit; @@ -68,39 +69,39 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) btnBrowse: TButton; actBrowse: TAction; frmIntro: THTMLTpltDlgFrame; - /// Handles clicks on the check boxes next to snippets in the - /// snippet selection list box by selecting and deselecting snippets for + /// Handles clicks on the check boxes next to packets in the + /// packet selection list box by selecting and deselecting packets for /// inclusion in the import. - procedure clbSelectSnippetsClickCheck(Sender: TObject); - /// Handles double clicks on snippets in the snippet selection - /// list box by causing the selected snippet to be previewed. - procedure clbSelectSnippetsDblClick(Sender: TObject); - /// Handles key down events on the snippet selection list box by - /// causing the selected snippet to be previewed when the user presses + procedure clbSelectPacketsClickCheck(Sender: TObject); + /// Handles double clicks on packets in the packet selection + /// list box by causing the selected packet to be previewed. + procedure clbSelectPacketsDblClick(Sender: TObject); + /// Handles key down events on the packet selection list box by + /// causing the selected packet to be previewed when the user presses /// Enter. - procedure clbSelectSnippetsKeyDown(Sender: TObject; var Key: Word; + procedure clbSelectPacketsKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); /// Handles double clicks on categories in the SWAG categories - /// list box by displaying the category's snippets in the snippet selection + /// list box by displaying the category's packets in the packet selection /// list box. procedure lbCategoriesDblClick(Sender: TObject); /// Handles key down events on categories in the SWAG categories - /// list box by displaying the category's snippets in the snippet selection + /// list box by displaying the category's packets in the packet selection /// list box when the user presses enter. procedure lbCategoriesKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); /// Executes action to display a Browse for Folders dialogue box /// and store the chosen folder in an edit box. procedure actBrowseExecute(Sender: TObject); - /// Executes action to display the snippets in the selected + /// Executes action to display the packets in the selected /// category. procedure actDisplayCategoryExecute(Sender: TObject); /// Updates enabled state of display category action. procedure actDisplayCategoryUpdate(Sender: TObject); - /// Executes action to preview the selected snippet. - procedure actDisplaySnippetExecute(Sender: TObject); - /// Updates enabled state of display snippet category. - procedure actDisplaySnippetUpdate(Sender: TObject); + /// Executes action to preview the selected packet. + procedure actDisplayPacketExecute(Sender: TObject); + /// Updates enabled state of display packet category. + procedure actDisplayPacketUpdate(Sender: TObject); strict private const /// Index of introductory page in wizard. @@ -108,7 +109,7 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) /// Index of SWAG database folder selection page in wizard. /// cChooseFolderPage = 1; - /// Index of snippet selection page in wizard. + /// Index of packet selection page in wizard. cSelectionPage = 2; /// Index of import page in wizard. cUpdatePage = 3; @@ -122,13 +123,13 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) /// List of all categories in SWAG database, sorted by title. /// fSortedCategories: TSortedList; - /// List of snippets in the current category, sorted by title. + /// List of packets in the current category, sorted by title. /// - fCurrentCatSnippets: TSortedList; - /// List of snippets selected for import, sorted by ID. + fCurrentCatPackets: TSortedList; + /// List of packets selected for import, sorted by ID. /// - fSelectedSnippets: TSortedList; - /// Object that imports selected SWAG snippets into CodeSnip's + fSelectedPackets: TSortedList; + /// Object that imports selected SWAG packets into CodeSnip's /// user database. fImporter: TSWAGImporter; /// ID of currently selected category. @@ -147,7 +148,7 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) /// TCSSBuilder [in] Object used to construct the /// CSS. procedure BuildCSS(Sender: TObject; const CSSBuilder: TCSSBuilder); - /// Displays snippets selected for import in list view on Update + /// Displays packets selected for import in list view on Update /// page. procedure PopulateImportsLV; /// Initialises SWAG database XML file for reading before @@ -161,27 +162,27 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) /// procedure InitSelectionPage; /// Initialises Update page by retrieving all the selected - /// snippets, preparing them for import and displaying them in the page's + /// packets, preparing them for import and displaying them in the page's /// list view. - /// May display a wait dialogue box while loading the snippets. + /// May display a wait dialogue box while loading the packets. /// procedure InitUpdatePage; - /// Gets the snippets contained in any selected category and - /// displays them in the snippet selection list box on the Selection page. + /// Gets the packets contained in any selected category and + /// displays them in the packet selection list box on the Selection page. /// - /// May display a wait dialogue box while the snippets are being + /// May display a wait dialogue box while the packets are being /// retrieved. - procedure DisplaySnippetsForCategory; + procedure DisplayPacketsForCategory; /// Creates and displays a preview of the currently selected - /// snippet in the Selection page's snippet selection list box. - /// May display a wait dialogue box while the selected snippet is + /// packet in the Selection page's packet selection list box. + /// May display a wait dialogue box while the selected packet is /// retrieved. - procedure PreviewSelectedSnippet; - /// Gets the complete information for each snippet selected for + procedure PreviewSelectedPacket; + /// Gets the complete information for each packet selected for /// import and stores in the given list. - procedure GetImportSnippets(const SnipList: TList); - /// Performs the import of the selected snippets into CodeSnip's - /// user database. + procedure GetImportPackets(const PacketList: TList); + /// Performs the import of the selected packets as into CodeSnip's + /// user database as new user-defined snippets. /// Displays a wait dialogue box while the import is proceeding. /// procedure UpdateDatabase; @@ -281,7 +282,7 @@ procedure TSWAGImportDlg.actBrowseExecute(Sender: TObject); procedure TSWAGImportDlg.actDisplayCategoryExecute(Sender: TObject); begin - DisplaySnippetsForCategory; + DisplayPacketsForCategory; end; procedure TSWAGImportDlg.actDisplayCategoryUpdate(Sender: TObject); @@ -289,14 +290,14 @@ procedure TSWAGImportDlg.actDisplayCategoryUpdate(Sender: TObject); actDisplayCategory.Enabled := lbCategories.ItemIndex >= 0; end; -procedure TSWAGImportDlg.actDisplaySnippetExecute(Sender: TObject); +procedure TSWAGImportDlg.actDisplayPacketExecute(Sender: TObject); begin - PreviewSelectedSnippet; + PreviewSelectedPacket; end; -procedure TSWAGImportDlg.actDisplaySnippetUpdate(Sender: TObject); +procedure TSWAGImportDlg.actDisplayPacketUpdate(Sender: TObject); begin - actDisplaySnippet.Enabled := clbSelectSnippets.ItemIndex >= 0; + actDisplayPacket.Enabled := clbSelectPackets.ItemIndex >= 0; end; procedure TSWAGImportDlg.ArrangeForm; @@ -321,19 +322,19 @@ procedure TSWAGImportDlg.ArrangeForm; [lblCategoriesDesc, lblCategories, lbCategories], 0 ); TCtrlArranger.AlignTops( - [lblCategories, lblSelectSnippets], + [lblCategories, lblSelectPackets], TCtrlArranger.BottomOf(lblCategoriesDesc, 12) ); TCtrlArranger.AlignTops( - [lbCategories, clbSelectSnippets], - TCtrlArranger.BottomOf([lblCategories, lblSelectSnippets], 6) + [lbCategories, clbSelectPackets], + TCtrlArranger.BottomOf([lblCategories, lblSelectPackets], 6) ); TCtrlArranger.AlignTops( - [btnDisplayCategory, btnDisplaySnippet], - TCtrlArranger.BottomOf([lbCategories, clbSelectSnippets], 8) + [btnDisplayCategory, btnDisplayPacket], + TCtrlArranger.BottomOf([lbCategories, clbSelectPackets], 8) ); TCtrlArranger.AlignHCentresTo([lbCategories], [btnDisplayCategory]); - TCtrlArranger.AlignHCentresTo([clbSelectSnippets], [btnDisplaySnippet]); + TCtrlArranger.AlignHCentresTo([clbSelectPackets], [btnDisplayPacket]); // tsUpdate lblUpdateDesc.Width := tsUpdate.ClientWidth; @@ -370,7 +371,7 @@ procedure TSWAGImportDlg.BeforeSelectionPage; Exit; lbCategories.Clear; - clbSelectSnippets.Clear; + clbSelectPackets.Clear; WaitProc := procedure begin @@ -418,37 +419,37 @@ procedure TSWAGImportDlg.BuildCSS(Sender: TObject; end; end; -procedure TSWAGImportDlg.clbSelectSnippetsClickCheck(Sender: TObject); +procedure TSWAGImportDlg.clbSelectPacketsClickCheck(Sender: TObject); var SelIdx: Integer; DelIdx: Integer; begin - SelIdx := clbSelectSnippets.ItemIndex; + SelIdx := clbSelectPackets.ItemIndex; if SelIdx = -1 then Exit; - if clbSelectSnippets.Checked[SelIdx] then + if clbSelectPackets.Checked[SelIdx] then begin - if not fSelectedSnippets.Contains(fCurrentCatSnippets[SelIdx]) then - fSelectedSnippets.Add(fCurrentCatSnippets[SelIdx]); + if not fSelectedPackets.Contains(fCurrentCatPackets[SelIdx]) then + fSelectedPackets.Add(fCurrentCatPackets[SelIdx]); end else begin - DelIdx := fSelectedSnippets.IndexOf(fCurrentCatSnippets[SelIdx]); + DelIdx := fSelectedPackets.IndexOf(fCurrentCatPackets[SelIdx]); if DelIdx >= 0 then - fSelectedSnippets.Delete(DelIdx); + fSelectedPackets.Delete(DelIdx); end; end; -procedure TSWAGImportDlg.clbSelectSnippetsDblClick(Sender: TObject); +procedure TSWAGImportDlg.clbSelectPacketsDblClick(Sender: TObject); begin - PreviewSelectedSnippet; + PreviewSelectedPacket; end; -procedure TSWAGImportDlg.clbSelectSnippetsKeyDown(Sender: TObject; +procedure TSWAGImportDlg.clbSelectPacketsKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = VK_RETURN then - PreviewSelectedSnippet; + PreviewSelectedPacket; end; procedure TSWAGImportDlg.ConfigForm; @@ -484,20 +485,20 @@ destructor TSWAGImportDlg.Destroy; begin fSWAGReader.Free; fImporter.Free; - fSelectedSnippets.Free; - fCurrentCatSnippets.Free; + fSelectedPackets.Free; + fCurrentCatPackets.Free; fSortedCategories.Free; inherited; end; -procedure TSWAGImportDlg.DisplaySnippetsForCategory; +procedure TSWAGImportDlg.DisplayPacketsForCategory; resourcestring - sSnippetListCaption = '&Select snippets from "%s"'; + sPacketListCaption = '&Select packets from "%s"'; var CatIdx: Integer; Idx: Integer; N: Integer; - Snippets: TList; + Packets: TList; begin CatIdx := lbCategories.ItemIndex; if CatIdx = -1 then @@ -509,36 +510,36 @@ procedure TSWAGImportDlg.DisplaySnippetsForCategory; // nothing to do if current category selected again Exit; fCurrentCatID := fSortedCategories[CatIdx].ID; - lblSelectSnippets.Caption := Format( - sSnippetListCaption, + lblSelectPackets.Caption := Format( + sPacketListCaption, // double up ampersands to avoid being treated as accelerator characters [StrReplace(fSortedCategories[CatIdx].Title, '&', '&&')] ); - Snippets := TList.Create; + Packets := TList.Create; try - fSWAGReader.GetPartialSnippets(fCurrentCatID, Snippets); - clbSelectSnippets.Items.BeginUpdate; + fSWAGReader.GetPartialPackets(fCurrentCatID, Packets); + clbSelectPackets.Items.BeginUpdate; try - fCurrentCatSnippets.Clear; - clbSelectSnippets.Clear; - // We set fCurrentCatSnippets first because it is a sorted list which + fCurrentCatPackets.Clear; + clbSelectPackets.Clear; + // We set fCurrentCatPackets first because it is a sorted list which // means indices of new items added are not sequential, and we must have - // displayed title at same index in clbSelectSnippets as its snippet is in - // fCurrentCatSnippets. - fCurrentCatSnippets.AddRange(Snippets); - for Idx := 0 to Pred(fCurrentCatSnippets.Count) do + // displayed title at same index in clbSelectPackets as its packet is in + // fCurrentCatPackets. + fCurrentCatPackets.AddRange(Packets); + for Idx := 0 to Pred(fCurrentCatPackets.Count) do begin - N := clbSelectSnippets.Items.Add(fCurrentCatSnippets[Idx].Title); + N := clbSelectPackets.Items.Add(fCurrentCatPackets[Idx].Title); Assert(Idx = N, 'Idx <> N'); - clbSelectSnippets.Checked[Idx] := fSelectedSnippets.Contains( - fCurrentCatSnippets[Idx] + clbSelectPackets.Checked[Idx] := fSelectedPackets.Contains( + fCurrentCatPackets[Idx] ); end; finally - clbSelectSnippets.Items.EndUpdate; + clbSelectPackets.Items.EndUpdate; end; finally - Snippets.Free; + Packets.Free; end; end; @@ -557,20 +558,20 @@ function TSWAGImportDlg.GetDirNameFromEditCtrl: string; Result := StrTrim(edPath.Text); end; -procedure TSWAGImportDlg.GetImportSnippets(const SnipList: TList); +procedure TSWAGImportDlg.GetImportPackets(const PacketList: TList); var - SnipIDs: TList; - PartialSnippet: TSWAGSnippet; + PacketIDs: TList; + PartialPacket: TSWAGPacket; resourcestring - sWaitMsg = 'Retrieving snippets...'; + sWaitMsg = 'Retrieving packets...'; begin - SnipIDs := TList.Create; + PacketIDs := TList.Create; try - for PartialSnippet in fSelectedSnippets do - SnipIDs.Add(PartialSnippet.ID); - fSWAGReader.GetCompleteSnippets( - SnipIDs, - SnipList, + for PartialPacket in fSelectedPackets do + PacketIDs.Add(PartialPacket.ID); + fSWAGReader.GetCompletePackets( + PacketIDs, + PacketList, procedure begin Application.ProcessMessages; @@ -581,15 +582,15 @@ procedure TSWAGImportDlg.GetImportSnippets(const SnipList: TList); end ); finally - SnipIDs.Free; + PacketIDs.Free; end; end; function TSWAGImportDlg.HeadingText(const PageIdx: Integer): string; resourcestring - sIntroPageHeading = 'Import snippets from SWAG'; + sIntroPageHeading = 'Import packets from SWAG as new snippets'; sFolderPage = 'Select SWAG database download folder'; - sSelectionPageHeading = 'Select required snippets'; + sSelectionPageHeading = 'Select required packets'; sUpdatePage = 'Ready to import'; sFinishPage = 'Import complete'; begin @@ -648,20 +649,20 @@ procedure TSWAGImportDlg.InitSelectionPage; procedure TSWAGImportDlg.InitUpdatePage; var - FullSnippets: TList; - Snippet: TSWAGSnippet; + FullPackets: TList; + Packet: TSWAGPacket; resourcestring - sWaitMsg = 'Retrieving snippets...'; + sWaitMsg = 'Retrieving packets...'; begin Application.ProcessMessages; - FullSnippets := TList.Create; + FullPackets := TList.Create; try - GetImportSnippets(FullSnippets); + GetImportPackets(FullPackets); fImporter.Reset; - for Snippet in FullSnippets do - fImporter.IncludeSnippet(Snippet); + for Packet in FullPackets do + fImporter.IncludePacket(Packet); finally - FullSnippets.Free; + FullPackets.Free; end; PopulateImportsLV; end; @@ -681,25 +682,25 @@ constructor TSWAGImportDlg.InternalCreate(AOwner: TComponent); ); fSortedCategories.PermitDuplicates := True; - fCurrentCatSnippets := TSortedList.Create( - TDelegatedComparer.Create( - function (const Left, Right: TSWAGSnippet): Integer + fCurrentCatPackets := TSortedList.Create( + TDelegatedComparer.Create( + function (const Left, Right: TSWAGPacket): Integer begin Result := StrCompareStr(Left.Title, Right.Title); end ) ); - fCurrentCatSnippets.PermitDuplicates := True; + fCurrentCatPackets.PermitDuplicates := True; - fSelectedSnippets := TSortedList.Create( - TDelegatedComparer.Create( - function (const Left, Right: TSWAGSnippet): Integer + fSelectedPackets := TSortedList.Create( + TDelegatedComparer.Create( + function (const Left, Right: TSWAGPacket): Integer begin Result := Left.ID - Right.ID; end ) ); - fSelectedSnippets.PermitDuplicates := False; + fSelectedPackets.PermitDuplicates := False; fImporter := TSWAGImporter.Create; @@ -707,14 +708,14 @@ constructor TSWAGImportDlg.InternalCreate(AOwner: TComponent); procedure TSWAGImportDlg.lbCategoriesDblClick(Sender: TObject); begin - DisplaySnippetsForCategory; + DisplayPacketsForCategory; end; procedure TSWAGImportDlg.lbCategoriesKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = VK_RETURN then - DisplaySnippetsForCategory; + DisplayPacketsForCategory; end; procedure TSWAGImportDlg.MoveForward(const PageIdx: Integer; @@ -740,31 +741,31 @@ procedure TSWAGImportDlg.MoveForward(const PageIdx: Integer; procedure TSWAGImportDlg.PopulateImportsLV; var - Snippet: TSWAGSnippet; + Packet: TSWAGPacket; LI: TListItem; begin lvImports.Items.BeginUpdate; try lvImports.Clear; - for Snippet in fSelectedSnippets do + for Packet in fSelectedPackets do begin LI := lvImports.Items.Add; - LI.Caption := Snippet.Title; - LI.SubItems.Add(TSWAGImporter.MakeValidSnippetName(Snippet.ID)); + LI.Caption := Packet.Title; + LI.SubItems.Add(TSWAGImporter.MakeValidSnippetName(Packet.ID)); end; finally lvImports.Items.EndUpdate; end; end; -procedure TSWAGImportDlg.PreviewSelectedSnippet; +procedure TSWAGImportDlg.PreviewSelectedPacket; var - PartialSnippet: TSWAGSnippet; - FullSnippet: TSWAGSnippet; + PartialPacket: TSWAGPacket; + FullPacket: TSWAGPacket; SelIdx: Integer; Content: string; resourcestring - sWaitMsg = 'Retrieving snippet...'; + sWaitMsg = 'Retrieving packet...'; sContentTplt = 'ID: %0:d' + EOL + 'Category: "%1:s"' + EOL + 'File Name: "%2:s"' + EOL + @@ -772,12 +773,12 @@ procedure TSWAGImportDlg.PreviewSelectedSnippet; 'Author: "%4:s"' + EOL2 + 'Source Code:' + EOL + '%5:s' + EOL + '%6:s'; begin - SelIdx := clbSelectSnippets.ItemIndex; + SelIdx := clbSelectPackets.ItemIndex; if SelIdx = -1 then Exit; - PartialSnippet := fCurrentCatSnippets[SelIdx]; - FullSnippet := fSWAGReader.GetCompleteSnippet( - PartialSnippet.ID, + PartialPacket := fCurrentCatPackets[SelIdx]; + FullPacket := fSWAGReader.GetCompletePacket( + PartialPacket.ID, procedure (CallProc: TProc) begin WaitWrapper(Self, CallProc, sWaitMsg); @@ -786,13 +787,13 @@ procedure TSWAGImportDlg.PreviewSelectedSnippet; Content := Format( sContentTplt, [ - FullSnippet.ID, - FullSnippet.Category, - FullSnippet.FileName, - FullSnippet.Title, - FullSnippet.Author, + FullPacket.ID, + FullPacket.Category, + FullPacket.FileName, + FullPacket.Title, + FullPacket.Author, StringOfChar('-', 80), - StrWindowsLineBreaks(FullSnippet.SourceCode) + StrWindowsLineBreaks(FullPacket.SourceCode) ] ); TPreviewDlg.Execute( @@ -825,6 +826,8 @@ procedure TSWAGImportDlg.UpdateDatabase; Application.ProcessMessages; end; +resourcestring + sWaitMsg = 'Importing packets into database as new snippets...'; begin SetBtnVisibility(False); try @@ -833,13 +836,13 @@ procedure TSWAGImportDlg.UpdateDatabase; procedure begin fImporter.Import( - procedure (const Snippet: TSWAGSnippet) + procedure (const Packet: TSWAGPacket) begin Application.ProcessMessages; end ); end, - 'Importing Snippets Into Database...' + sWaitMsg ); finally SetBtnVisibility(True); @@ -862,9 +865,9 @@ procedure TSWAGImportDlg.ValidatePage(const PageIdx: Integer); procedure ValidateSelectionPage; resourcestring - sEmptySelection = 'You must select one or more snippets to import.'; + sEmptySelection = 'You must select one or more packets to import.'; begin - if fSelectedSnippets.Count = 0 then + if fSelectedPackets.Count = 0 then raise EDataEntry.Create(sEmptySelection); end; diff --git a/Src/SWAG.UCommon.pas b/Src/SWAG.UCommon.pas index 6eba1b193..1a87a40a6 100644 --- a/Src/SWAG.UCommon.pas +++ b/Src/SWAG.UCommon.pas @@ -5,7 +5,7 @@ * * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * - * Defines records that encapsulate SWAG database categories and snippets. + * Defines records that encapsulate SWAG database categories and packets. } @@ -25,27 +25,27 @@ TSWAGCategory = record end; type - /// Record that encapsulates the data that defines a SWAG snippet + /// Record that encapsulates the data that defines a SWAG packet /// - TSWAGSnippet = record - /// Number that uniquely identifies a SWAG snippet. + TSWAGPacket = record + /// Number that uniquely identifies a SWAG packet. ID: Cardinal; - /// ID of SWAG category that snippet belongs to. + /// ID of SWAG category that packet belongs to. Category: string; - /// File name of snippet in original SWAG archive. + /// File name of packet in original SWAG archive. FileName: string; - /// Date and time snippet was added to or updated in the SWAG + /// Date and time packet was added to or updated in the SWAG /// archive. DateStamp: TDateTime; - /// SWAG snippet title. + /// SWAG packet title. Title: string; - /// Name of author(s) of SWAG snippet. + /// Name of author(s) of SWAG packet. Author: string; - /// Source code of SWAG snippet. - /// Strictly speaking this is the text of the snippet since not - /// all snippets are pure source code - some are text documents. + /// Source code of SWAG packet. + /// Strictly speaking this is the text of the packet since not + /// all packets are pure source code - some are text documents. SourceCode: string; - /// Flag that indicates if SWAG snippet is a text document (True) + /// Flag that indicates if SWAG packet is a text document (True) /// or is Pascal source code (False). IsDocument: Boolean; end; diff --git a/Src/SWAG.UImporter.pas b/Src/SWAG.UImporter.pas index efd59cb17..61580e3d7 100644 --- a/Src/SWAG.UImporter.pas +++ b/Src/SWAG.UImporter.pas @@ -5,8 +5,8 @@ * * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * - * Implements a class that converts snippets from the SWAG database into - * CodeSnip format and adds them to the database. + * Implements a class that converts packets from the SWAG database into CodeSnip + * format snippets and adds them to the database. } @@ -26,61 +26,63 @@ interface type - /// Class that converts snippets from the SWAG database into - /// CodeSnip database format and imports them into the user defined + /// Class that converts packets from the SWAG database into CodeSnip + /// database format snippets and imports them into the user defined /// database. /// This class creates new user-defined snippets from records that - /// define a SWAF snippet. It is for the caller to acquire the required SWAG - /// snippets from the SWAG database. + /// define a SWAG packet. It is for the caller to acquire the required SWAG + /// packets from the SWAG database. TSWAGImporter = class(TObject) strict private type /// Type of callback function used to notify the caller that a - /// snippet has been imported. - /// TSWAGSnippet [in] Data of imported snippet. + /// packet has been imported as new snippet. + /// TSWAGPacket [in] Data of imported packet. /// TProgressCallback = reference to procedure ( - const SWAGSnippet: TSWAGSnippet); + const SWAGPacket: TSWAGPacket); var - /// List of SWAG snippets to be imported. - fImportList: TList; + /// List of SWAG packets to be imported. + fImportList: TList; /// Records the common active text that is included in the Extra - /// property of each imported snippet. + /// property of each imported CodeSnip snippet. fExtraBoilerplate: IActiveText; /// Returns the common active text that will be included in the - /// Extra property of each imported snippet. + /// Extra property of each imported CodeSnip snippet. function ExtraBoilerplate: IActiveText; - /// Records the data from the given SWAG snippet into a data - /// structure suitable for adding to CodeSnip's user database. - function BuildSnippetInfo(const SWAGSnippet: TSWAGSnippet): + /// Records the data from the given SWAG packet into a data + /// structure suitable for adding as a snippet in CodeSnip's user database. + /// + function BuildSnippetInfo(const SWAGPacket: TSWAGPacket): TSnippetEditData; - /// Imports (i.e. adds) the given SWAG snippet into the user - /// database. - procedure ImportSnippet(const SWAGSnippet: TSWAGSnippet); + /// Imports (i.e. adds) the given SWAG packet into the user + /// database as a CodeSnip format snippet. + procedure ImportPacketAsSnippet(const SWAGPacket: TSWAGPacket); public /// Constructs new object instance. constructor Create; /// Destroys object instance. destructor Destroy; override; - /// Resets list of snippets to import. - /// After calling this method no snippets are recorded for + /// Resets list of packets to import. + /// After calling this method no packets are recorded for /// inclusion in the import. procedure Reset; - /// Records the given SWAG snippet ready for import into the user + /// Records the given SWAG packet ready for import into the user /// database. - procedure IncludeSnippet(const SWAGSnippet: TSWAGSnippet); - /// Imports all the required SWAG snippets into the user database. - /// + procedure IncludePacket(const SWAGPacket: TSWAGPacket); + /// Imports all the required SWAG packets into the user database + /// as new snippets. /// TProgressCallback [in] Optional callback to be - /// called after each SWAG snippet is imported. - /// The snippets that are imported are those that have been - /// recorded by calling IncludeSnippet. + /// called after each SWAG packet is imported. + /// The packets that are imported are those that have been + /// recorded by calling IncludePacket. procedure Import(const Callback: TProgressCallback = nil); - /// Creates and returns a valid snippet name, based on the given - /// SWAG snippet ID, that is unique in the user database. - class function MakeValidSnippetName(SWAGSnippetID: Cardinal): string; + /// Creates and returns a valid CodeSnip snippet name, based on + /// the given SWAG packet ID, that is unique in the user database. + /// + class function MakeValidSnippetName(SWAGPacketID: Cardinal): string; /// Description of the category in the user database used for all - /// imported SWAG snippets. + /// imported SWAG packets. class function SWAGCategoryDesc: string; end; @@ -101,7 +103,7 @@ implementation { TSWAGImporter } -function TSWAGImporter.BuildSnippetInfo(const SWAGSnippet: TSWAGSnippet): +function TSWAGImporter.BuildSnippetInfo(const SWAGPacket: TSWAGPacket): TSnippetEditData; // Constructs and returns the new snippet's description as active text. @@ -111,7 +113,7 @@ function TSWAGImporter.BuildSnippetInfo(const SWAGSnippet: TSWAGSnippet): Result.AddElem( TActiveTextFactory.CreateActionElem(ekPara, fsOpen) ); - Result.AddElem(TActiveTextFactory.CreateTextElem(SWAGSnippet.Title)); + Result.AddElem(TActiveTextFactory.CreateTextElem(SWAGPacket.Title)); Result.AddElem( TActiveTextFactory.CreateActionElem(ekPara, fsClose) ); @@ -126,7 +128,7 @@ function TSWAGImporter.BuildSnippetInfo(const SWAGSnippet: TSWAGSnippet): Result := TActiveTextFactory.CloneActiveText(ExtraBoilerplate); Result.AddElem(TActiveTextFactory.CreateActionElem(ekPara, fsOpen)); Result.AddElem( - TActiveTextFactory.CreateTextElem(Format(sAuthor, [SWAGSnippet.Author])) + TActiveTextFactory.CreateTextElem(Format(sAuthor, [SWAGPacket.Author])) ); Result.AddElem(TActiveTextFactory.CreateActionElem(ekPara, fsClose)); end; @@ -136,9 +138,9 @@ function TSWAGImporter.BuildSnippetInfo(const SWAGSnippet: TSWAGSnippet): Result.Props.Kind := skFreeform; Result.Props.Cat := TReservedCategories.SWAGCatID; Result.Props.Desc := BuildDescription; - Result.Props.SourceCode := SWAGSnippet.SourceCode; - Result.Props.HiliteSource := not SWAGSnippet.IsDocument; - Result.Props.DisplayName := SWAGSnippet.Title; + Result.Props.SourceCode := SWAGPacket.SourceCode; + Result.Props.HiliteSource := not SWAGPacket.IsDocument; + Result.Props.DisplayName := SWAGPacket.Title; Result.Props.Extra := BuildExtra; // TSnippetEditData.Refs properties can keep default values end; @@ -146,7 +148,7 @@ function TSWAGImporter.BuildSnippetInfo(const SWAGSnippet: TSWAGSnippet): constructor TSWAGImporter.Create; begin inherited Create; - fImportList := TList.Create; + fImportList := TList.Create; end; destructor TSWAGImporter.Destroy; @@ -157,12 +159,13 @@ destructor TSWAGImporter.Destroy; function TSWAGImporter.ExtraBoilerplate: IActiveText; resourcestring - sStatementPrefix = 'This snippet was imported from the '; + sStatementPrefix = 'This snippet was imported from a packet in the '; sStatementLinkText = 'SWAG Pascal Archive'; sStatementPostfix = '. '; - sLicense = 'The code snippets in the archive pages are generally freeware or ' + sLicense = 'The code packets in the archive pages are generally freeware or ' + 'public domain as defined by any accompanying comments and copyright ' + 'statements. Contact the author if in doubt.'; + // TODO: Check license wording against SWAG docs // URL of web page referenced from links in boilerplate SWAGDBURI = 'https://github.com/delphidabbler/swag'; var @@ -205,40 +208,40 @@ function TSWAGImporter.ExtraBoilerplate: IActiveText; procedure TSWAGImporter.Import(const Callback: TProgressCallback); var - SWAGSnippet: TSWAGSnippet; + SWAGPacket: TSWAGPacket; begin - for SWAGSnippet in fImportList do + for SWAGPacket in fImportList do begin if Assigned(Callback) then - Callback(SWAGSnippet); - ImportSnippet(SWAGSnippet); + Callback(SWAGPacket); + ImportPacketAsSnippet(SWAGPacket); end; end; -procedure TSWAGImporter.ImportSnippet(const SWAGSnippet: TSWAGSnippet); +procedure TSWAGImporter.ImportPacketAsSnippet(const SWAGPacket: TSWAGPacket); var SnippetName: string; // unique name of new snippet SnippetDetails: TSnippetEditData; // data describing new snippet begin - SnippetName := MakeValidSnippetName(SWAGSnippet.ID); - SnippetDetails := BuildSnippetInfo(SWAGSnippet); + SnippetName := MakeValidSnippetName(SWAGPacket.ID); + SnippetDetails := BuildSnippetInfo(SWAGPacket); (Database as IDatabaseEdit).AddSnippet(SnippetName, SnippetDetails); end; -procedure TSWAGImporter.IncludeSnippet(const SWAGSnippet: TSWAGSnippet); +procedure TSWAGImporter.IncludePacket(const SWAGPacket: TSWAGPacket); begin - fImportList.Add(SWAGSnippet); + fImportList.Add(SWAGPacket); end; -class function TSWAGImporter.MakeValidSnippetName(SWAGSnippetID: Cardinal): +class function TSWAGImporter.MakeValidSnippetName(SWAGPacketID: Cardinal): string; var Appendix: Integer; RootName: string; begin - RootName := 'SWAG_' + IntToStr(SWAGSnippetID); + RootName := 'SWAG_' + IntToStr(SWAGPacketID); Assert(IsValidIdent(RootName, False), ClassName - + '.GetValidSnippetName: RootName is not a valid Pascal identifier'); + + '.MakeValidSnippetName: RootName is not a valid snippet identifier'); Result := RootName; Appendix := 0; while not TSnippetValidator.ValidateName(Result, True) do diff --git a/Src/SWAG.UReader.pas b/Src/SWAG.UReader.pas index ef10d6d95..f3e75e981 100644 --- a/Src/SWAG.UReader.pas +++ b/Src/SWAG.UReader.pas @@ -44,21 +44,21 @@ TSWAGReader = class(TObject) TSWAGCallbackWrapper = reference to procedure (CallProc: TProc); strict private const - /// Maximum size of cache of complete snippets read from the + /// Maximum size of cache of complete packets read from the /// SWAG database. - MaxSnippetCacheSize = 50; + MaxPacketCacheSize = 50; var /// List of all categories in the SWAG database. fCategories: TList; - /// Map of category IDs onto the snippets that belong to the + /// Map of category IDs onto the packets that belong to the /// category. /// - /// This object is used to cache the snippets for each category, to + /// This object is used to cache the packets for each category, to /// avoid having to read from the database more than once. - /// Only partial information that summarises each snippet is + /// Only partial information that summarises each packet is /// stored. /// - fSnippetsByCategory: TDictionary>; + fPacketsByCategory: TDictionary>; /// Object used to interogate SWAG XML file. fXMLProcessor: TSWAGXMLProcessor; /// Default wrapper for calls to the local SWAG database. @@ -67,9 +67,9 @@ TSWAGReader = class(TObject) /// unless a different wrapper is specified by the caller in certain /// method calls. fDefaultCallWrapper: TSWAGCallbackWrapper; - /// Cache of complete snippets read from the SWAG database. + /// Cache of complete packets read from the SWAG database. /// - fSnippetCache: TSWAGSnippetCache; + fPacketCache: TSWAGPacketCache; /// Handles the given exception by converting expected exceptions /// into ESWAGReader exceptions. /// Always raises an exception. ESWAGReader is raised if E is @@ -83,42 +83,42 @@ TSWAGReader = class(TObject) /// to the constructor is used. /// The fetched categories are cached in fCategories. procedure FetchCategories(CallWrapper: TSWAGCallbackWrapper); - /// Fetches summaries of all the snippets contained in a given + /// Fetches summaries of all the packets contained in a given /// SWAG category from the SWAG database. - /// string [in] ID of category for which snippet + /// string [in] ID of category for which packet /// summaries are required. /// TSWAGCallbackWrapper [in] Callback that is /// called and passed a closure which can retrive the required category /// information from the database. If nil then the default callback passed /// to the constructor is used. - /// The fetched snippet summaries are cached in - /// fSnippetsByCategory. - procedure FetchPartialSnippets(const CatID: string; + /// The fetched packet summaries are cached in + /// fPacketsByCategory. + procedure FetchPartialPackets(const CatID: string; CallWrapper: TSWAGCallbackWrapper); - /// Fetches full details a snippet from the SWAG database. + /// Fetches full details a packet from the SWAG database. /// - /// Cardinal [in] ID of required snippet. + /// Cardinal [in] ID of required packet. /// TSWAGCallbackWrapper [in] Callback that is - /// called and passed a closure which can retrive the required snippet + /// called and passed a closure which can retrive the required packet /// from the database. If nil then the default callback passed to the /// constructor is used. - /// TSWAGSnippet. The retrieved snippet. - function FetchCompleteSnippet(const SnippetID: Cardinal; - CallWrapper: TSWAGCallbackWrapper): TSWAGSnippet; - /// Fetches multiple complete snippets from the SWAG database. + /// TSWAGPacket. The retrieved packet. + function FetchCompletePacket(const PacketID: Cardinal; + CallWrapper: TSWAGCallbackWrapper): TSWAGPacket; + /// Fetches multiple complete packets from the SWAG database. /// - /// TList<Cardinal> [in] List of IDs of the - /// required snippets. - /// TList<TSWAGSnippet> [in] Receives the list - /// of retrieved snippets. + /// TList<Cardinal> [in] List of IDs of the + /// required packets. + /// TList<TSWAGPacket> [in] Receives the list + /// of retrieved packets. /// TSWAGCallbackWrapper [in] Callback that is - /// called and passed a closure which can retrive the required snippets + /// called and passed a closure which can retrive the required packets /// from the database. If nil then the default callback passed to the /// constructor is used. /// TProc [in] Callback procedure called between - /// reading each snippet. - procedure FetchCompleteSnippets(const SnipIDs: TList; - Snippets: TList; BreatherProc: TProc; + /// reading each packet. + procedure FetchCompletePackets(const PacketIDs: TList; + Packets: TList; BreatherProc: TProc; CallWrapper: TSWAGCallbackWrapper); public /// Creates a new object instance. @@ -145,54 +145,54 @@ TSWAGReader = class(TObject) /// procedure GetCategories(const Cats: TList; CallWrapper: TSWAGCallbackWrapper = nil); - /// Gets summaries of all the snippets contained in a given SWAG + /// Gets summaries of all the packets contained in a given SWAG /// category. /// string [in] ID of the required category. - /// TList<TSWAGSnippet> [in] Receives the - /// required list of snippet summaries. + /// TList<TSWAGPacket> [in] Receives the + /// required list of packet summaries. /// TSWAGCallbackWrapper [in] Callback that is - /// called and passed a closure which can retrive the required snippet + /// called and passed a closure which can retrive the required packet /// summaries from the database. If nil then the default callback passed to /// the constructor is used. /// The first time this method is called for any category - /// CallWrapper is called to retrieve the required snippets. On subsequent - /// calls for that category the snippets summaries are read from a cache + /// CallWrapper is called to retrieve the required packets. On subsequent + /// calls for that category the packets summaries are read from a cache /// and CallWrapper is not called. - procedure GetPartialSnippets(const CatID: string; - const Snippets: TList; + procedure GetPartialPackets(const CatID: string; + const Packets: TList; CallWrapper: TSWAGCallbackWrapper = nil); - /// Gets full details a snippet from the SWAG database. - /// Cardinal [in] Unique ID of the required snippet. + /// Gets full details a packet from the SWAG database. + /// Cardinal [in] Unique ID of the required packet. /// /// TSWAGCallbackWrapper [in] Callback that is - /// called and passed a closure which can retrive the required snippet + /// called and passed a closure which can retrive the required packet /// from the database. If nil then the default callback passed to the /// constructor is used. - /// TSWAGSnippet. The required snippet. - /// The first time this method is called for any snippet - /// CallWrapper is called to retrieve the snippet. On subsequent calls for - /// calls for that snippet the snippet is read from a cache and CallWrapper - /// is not called. - function GetCompleteSnippet(const ID: Cardinal; - CallWrapper: TSWAGCallbackWrapper = nil): TSWAGSnippet; - /// Gets full details of multiple snippets from the SWAG database. + /// TSWAGPacket. The required packet. + /// The first time this method is called for any packet + /// CallWrapper is called to retrieve the packet. On subsequent calls for + /// that packet the packet is read from a cache and CallWrapper is not + /// called. + function GetCompletePacket(const ID: Cardinal; + CallWrapper: TSWAGCallbackWrapper = nil): TSWAGPacket; + /// Gets full details of multiple packets from the SWAG database. /// - /// TList<Cardinal> [in] List of IDs of the - /// required snippets. - /// TList<TSWAGSnippet> [in] Receives the - /// required list of snippets. + /// TList<Cardinal> [in] List of IDs of the + /// required packets. + /// TList<TSWAGPacket> [in] Receives the + /// required list of packets. /// TSWAGCallbackWrapper [in] Callback that is - /// called and passed a closure which can retrive the required snippets + /// called and passed a closure which can retrive the required packets /// from the database. If nil then the default callback passed to the /// constructor is used. /// TProc [in] Callback procedure called between - /// reading each snippet. + /// reading each packet. /// The first time this method is called for any category - /// CallWrapper is called to retrieve the required snippets. On subsequent - /// calls for that category the snippets are read from a cache and + /// CallWrapper is called to retrieve the required packets. On subsequent + /// calls for that category the packets are read from a cache and /// CallWrapper is not called. - procedure GetCompleteSnippets(SnipIDs: TList; - Snippets: TList; BreatherProc: TProc = nil; + procedure GetCompletePackets(PacketIDs: TList; + Packets: TList; BreatherProc: TProc = nil; CallWrapper: TSWAGCallbackWrapper = nil); end; @@ -222,11 +222,11 @@ constructor TSWAGReader.Create(const SWAGDBDir: string; inherited Create; fDefaultCallWrapper := DefaultSWAGCallbackWrapper; fCategories := TList.Create; - fSnippetsByCategory := TObjectDictionary>.Create( + fPacketsByCategory := TObjectDictionary>.Create( [doOwnsValues], TStringEqualityComparer.Create ); - fSnippetCache := TSWAGSnippetCache.Create(MaxSnippetCacheSize); + fPacketCache := TSWAGPacketCache.Create(MaxPacketCacheSize); fXMLProcessor := TSWAGXMLProcessor.Create; fXMLProcessor.Initialise(SWAGDBDir); end; @@ -234,8 +234,8 @@ constructor TSWAGReader.Create(const SWAGDBDir: string; destructor TSWAGReader.Destroy; begin fXMLProcessor.Free; - fSnippetCache.Free; - fSnippetsByCategory.Free; + fPacketCache.Free; + fPacketsByCategory.Free; fCategories.Free; inherited; end; @@ -261,24 +261,24 @@ procedure TSWAGReader.FetchCategories(CallWrapper: TSWAGCallbackWrapper); ); end; -function TSWAGReader.FetchCompleteSnippet(const SnippetID: Cardinal; - CallWrapper: TSWAGCallbackWrapper): TSWAGSnippet; +function TSWAGReader.FetchCompletePacket(const PacketID: Cardinal; + CallWrapper: TSWAGCallbackWrapper): TSWAGPacket; var - Snippet: TSWAGSnippet; + Packet: TSWAGPacket; begin if not Assigned(CallWrapper) then CallWrapper := fDefaultCallWrapper; CallWrapper( procedure begin - Snippet := fXMLProcessor.GetSnippet(SnippetID); + Packet := fXMLProcessor.GetPacket(PacketID); end ); - Result := Snippet; + Result := Packet; end; -procedure TSWAGReader.FetchCompleteSnippets(const SnipIDs: TList; - Snippets: TList; +procedure TSWAGReader.FetchCompletePackets(const PacketIDs: TList; + Packets: TList; BreatherProc: TProc; CallWrapper: TSWAGCallbackWrapper); begin @@ -287,21 +287,21 @@ procedure TSWAGReader.FetchCompleteSnippets(const SnipIDs: TList; CallWrapper( procedure var - SnipID: Cardinal; - Snippet: TSWAGSnippet; + PacketID: Cardinal; + Packet: TSWAGPacket; begin BreatherProc; - for SnipID in SnipIDs do + for PacketID in PacketIDs do begin - Snippet := fXMLProcessor.GetSnippet(SnipID); - Snippets.Add(Snippet); + Packet := fXMLProcessor.GetPacket(PacketID); + Packets.Add(Packet); BreatherProc; end; end ); end; -procedure TSWAGReader.FetchPartialSnippets(const CatID: string; +procedure TSWAGReader.FetchPartialPackets(const CatID: string; CallWrapper: TSWAGCallbackWrapper); begin if not Assigned(CallWrapper) then @@ -309,11 +309,11 @@ procedure TSWAGReader.FetchPartialSnippets(const CatID: string; CallWrapper( procedure var - SnipList: TList; + PacketList: TList; begin - SnipList := TList.Create; - fXMLProcessor.GetPartialSnippets(CatID, SnipList); - fSnippetsByCategory.Add(CatID, SnipList); + PacketList := TList.Create; + fXMLProcessor.GetPartialPackets(CatID, PacketList); + fPacketsByCategory.Add(CatID, PacketList); end ); end; @@ -331,63 +331,63 @@ procedure TSWAGReader.GetCategories(const Cats: TList; Cats.AddRange(fCategories); end; -function TSWAGReader.GetCompleteSnippet(const ID: Cardinal; - CallWrapper: TSWAGCallbackWrapper): TSWAGSnippet; +function TSWAGReader.GetCompletePacket(const ID: Cardinal; + CallWrapper: TSWAGCallbackWrapper): TSWAGPacket; begin - if not fSnippetCache.Retrieve(ID, Result) then + if not fPacketCache.Retrieve(ID, Result) then begin - Result := FetchCompleteSnippet(ID, CallWrapper); - fSnippetCache.Add(Result); + Result := FetchCompletePacket(ID, CallWrapper); + fPacketCache.Add(Result); end; end; -procedure TSWAGReader.GetCompleteSnippets(SnipIDs: TList; - Snippets: TList; BreatherProc: TProc; +procedure TSWAGReader.GetCompletePackets(PacketIDs: TList; + Packets: TList; BreatherProc: TProc; CallWrapper: TSWAGCallbackWrapper); var - RemoteSnippetIDs: TList; - FetchedSnippets: TList; - Snippet: TSWAGSnippet; - SnipID: Cardinal; + RemotePacketIDs: TList; + FetchedPackets: TList; + Packet: TSWAGPacket; + PacketID: Cardinal; begin - RemoteSnippetIDs := TList.Create; + RemotePacketIDs := TList.Create; try - for SnipID in SnipIDs do + for PacketID in PacketIDs do begin - if fSnippetCache.Retrieve(SnipID, Snippet) then - Snippets.Add(Snippet) + if fPacketCache.Retrieve(PacketID, Packet) then + Packets.Add(Packet) else - RemoteSnippetIDs.Add(SnipID); + RemotePacketIDs.Add(PacketID); end; - if RemoteSnippetIDs.Count > 0 then + if RemotePacketIDs.Count > 0 then begin - FetchedSnippets := TList.Create; + FetchedPackets := TList.Create; try if not Assigned(BreatherProc) then BreatherProc := procedure begin end; - FetchCompleteSnippets( - RemoteSnippetIDs, FetchedSnippets, BreatherProc, CallWrapper + FetchCompletePackets( + RemotePacketIDs, FetchedPackets, BreatherProc, CallWrapper ); - for Snippet in FetchedSnippets do + for Packet in FetchedPackets do begin - fSnippetCache.Add(Snippet); - Snippets.Add(Snippet); + fPacketCache.Add(Packet); + Packets.Add(Packet); end; finally - FetchedSnippets.Free; + FetchedPackets.Free; end; end; finally - RemoteSnippetIDs.Free; + RemotePacketIDs.Free; end; end; -procedure TSWAGReader.GetPartialSnippets(const CatID: string; - const Snippets: TList; CallWrapper: TSWAGCallbackWrapper); +procedure TSWAGReader.GetPartialPackets(const CatID: string; + const Packets: TList; CallWrapper: TSWAGCallbackWrapper); begin - if not fSnippetsByCategory.ContainsKey(CatID) then - FetchPartialSnippets(CatID, CallWrapper); - Snippets.AddRange(fSnippetsByCategory[CatID]); + if not fPacketsByCategory.ContainsKey(CatID) then + FetchPartialPackets(CatID, CallWrapper); + Packets.AddRange(fPacketsByCategory[CatID]); end; procedure TSWAGReader.HandleException(E: Exception); diff --git a/Src/SWAG.USnippetCache.pas b/Src/SWAG.USnippetCache.pas index 903176374..10b3eec87 100644 --- a/Src/SWAG.USnippetCache.pas +++ b/Src/SWAG.USnippetCache.pas @@ -5,7 +5,7 @@ * * Copyright (C) 2013-2020, Peter Johnson (gravatar.com/delphidabbler). * - * Provides a class that implements a cache of SWAG snippets. + * Provides a class that implements a cache of SWAG packets. } @@ -23,12 +23,12 @@ interface type - /// Class that implements a cache of SWAG snippets. - /// When the cache is full a snippet must be removed from the cache - /// for each one added. The cache is implemented so that the snippets + /// Class that implements a cache of SWAG packets. + /// When the cache is full a packet must be removed from the cache + /// for each one added. The cache is implemented so that the packets /// referenced the most are the least likely to be removed from the cache. /// - TSWAGSnippetCache = class(TObject) + TSWAGPacketCache = class(TObject) strict private const /// Minimum permitted size of cache. @@ -36,13 +36,13 @@ TSWAGSnippetCache = class(TObject) /// Maximum permitted size of cache. MaxCacheSize = 200; var - /// Stores the cached snippets. - fCache: TList; + /// Stores the cached packets. + fCache: TList; /// Records size of cache. fCacheSize: Integer; - /// Returns index of SWAG snippet with given ID in cache, or -1 if - /// snippet not in cache. - function IndexOfID(const SnippetID: Cardinal): Integer; + /// Returns index of SWAG packet with given ID in cache, or -1 if + /// packet not in cache. + function IndexOfID(const PacketID: Cardinal): Integer; public /// Creates a new cache instance with given size. /// CacheSize may be adjusted to fall within valid range of cache @@ -50,16 +50,16 @@ TSWAGSnippetCache = class(TObject) constructor Create(CacheSize: Integer); /// Destroys current object instance. destructor Destroy; override; - /// Retrieves the SWAG snippet with the given ID from the cache. - /// If the snippet is present it is stored in Snippet and True is returned. - /// If the snippet is not present False is returned and Snippet is + /// Retrieves the SWAG packet with the given ID from the cache. + /// If the packet is present it is stored in Packet and True is returned. + /// If the packet is not present False is returned and Packet is /// undefined. - function Retrieve(const SnippetID: Cardinal; out Snippet: TSWAGSnippet): + function Retrieve(const PacketID: Cardinal; out Packet: TSWAGPacket): Boolean; - /// Adds the given SWAG snippet to the cache. - /// If the cache is full a snippet will be removed from the cache - /// to make way for the newly added snippet. - procedure Add(const Snippet: TSWAGSnippet); + /// Adds the given SWAG packet to the cache. + /// If the cache is full a packet will be removed from the cache + /// to make way for the newly added packet. + procedure Add(const Packet: TSWAGPacket); end; @@ -71,51 +71,51 @@ implementation UStructs; -{ TSWAGSnippetCache } +{ TSWAGPacketCache } -procedure TSWAGSnippetCache.Add(const Snippet: TSWAGSnippet); +procedure TSWAGPacketCache.Add(const Packet: TSWAGPacket); begin if fCache.Count = fCacheSize then fCache.Delete(0); - fCache.Add(Snippet); + fCache.Add(Packet); end; -constructor TSWAGSnippetCache.Create(CacheSize: Integer); +constructor TSWAGPacketCache.Create(CacheSize: Integer); var CacheSizeRange: TRange; begin inherited Create; CacheSizeRange := TRange.Create(MinCacheSize, MaxCacheSize); fCacheSize := CacheSizeRange.Constrain(CacheSize); - fCache := TList.Create; + fCache := TList.Create; end; -destructor TSWAGSnippetCache.Destroy; +destructor TSWAGPacketCache.Destroy; begin fCache.Free; inherited; end; -function TSWAGSnippetCache.IndexOfID(const SnippetID: Cardinal): Integer; +function TSWAGPacketCache.IndexOfID(const PacketID: Cardinal): Integer; var Idx: Integer; begin for Idx := 0 to Pred(fCache.Count) do - if fCache[Idx].ID = SnippetID then + if fCache[Idx].ID = PacketID then Exit(Idx); Result := -1; end; -function TSWAGSnippetCache.Retrieve(const SnippetID: Cardinal; - out Snippet: TSWAGSnippet): Boolean; +function TSWAGPacketCache.Retrieve(const PacketID: Cardinal; + out Packet: TSWAGPacket): Boolean; var Idx: Integer; begin - Idx := IndexOfID(SnippetID); + Idx := IndexOfID(PacketID); if Idx = -1 then Exit(False); fCache.Move(Idx, Pred(fCache.Count)); - Snippet := fCache.Last; + Packet := fCache.Last; Result := True; end; diff --git a/Src/SWAG.UXMLProcessor.pas b/Src/SWAG.UXMLProcessor.pas index 982c3695e..e7db57fa0 100644 --- a/Src/SWAG.UXMLProcessor.pas +++ b/Src/SWAG.UXMLProcessor.pas @@ -6,7 +6,7 @@ * Copyright (C) 2020, Peter Johnson (gravatar.com/delphidabbler). * * Implements a class that interfaces with a local copy of the DelphiDabbler - * version of the SWAG databases to get snippet and category information. + * version of the SWAG databases to get packet and category information. } @@ -28,7 +28,7 @@ interface type /// Class that interfaces with a local copy of the DelphiDabbler - /// version of the SWAG databases to get snippet and category information. + /// version of the SWAG databases to get packet and category information. /// /// The database meta data is stored in an XML file and source code /// is stored in text files. @@ -47,15 +47,15 @@ TSWAGXMLProcessor = class(TObject) cCategoryNode = 'category'; cCategoryIDAttr = 'id'; cCategoryTitleNode = 'title'; - cSnippetsNode = 'snippets'; - cSnippetNode = 'snippet'; - cSnippetIDAttr = 'id'; - cSnippetCatIdNode = 'category-id'; - cSnippetFileNameNode = 'file-name'; - cSnippetDateNode = 'date'; - cSnippetAuthorNode = 'author'; - cSnippetIsDocumentNode = 'is-document'; - cSnippetTitleNode = 'title'; + cPacketsNode = 'snippets'; + cPacketNode = 'snippet'; + cPacketIDAttr = 'id'; + cPacketCatIdNode = 'category-id'; + cPacketFileNameNode = 'file-name'; + cPacketDateNode = 'date'; + cPacketAuthorNode = 'author'; + cPacketIsDocumentNode = 'is-document'; + cPacketTitleNode = 'title'; var /// Object used to access and search SWAG XML meta data file. /// @@ -70,27 +70,27 @@ TSWAGXMLProcessor = class(TObject) /// ESWAGXMLProcessor raised if document fails validation. /// procedure ValidateXMLDoc; - /// Validates fields of given snippet record as read from XML and + /// Validates fields of given packet record as read from XML and /// source code files. - /// TSWAGSnippet [in] Snippet record to be validated. + /// TSWAGPacket [in] Packet record to be validated. /// - /// ESWAGXMLProcessor raised if snippet fails validation. + /// ESWAGXMLProcessor raised if packet fails validation. /// - procedure ValidateSnippet(const Snippet: TSWAGSnippet); - /// Validates fields of given partial snippet record as read from + procedure ValidatePacket(const Packet: TSWAGPacket); + /// Validates fields of given partial packet record as read from /// XML. - /// TSWAGSnippet [in] Snippet record to be validated. + /// TSWAGPacket [in] Packet record to be validated. /// - /// ESWAGXMLProcessor raised if snippet fails validation. + /// ESWAGXMLProcessor raised if packet fails validation. /// - procedure ValidatePartialSnippet(const Snippet: TSWAGSnippet); - /// Gets source code for a snippet from file and stores it in the - /// snippet record. - /// TSWAGSnippet [in/out] Snippet for which source - /// code is required. Snippet is updated with required source code. - /// ESWAGXMLProcessor raised if snippet source code can't be + procedure ValidatePartialPacket(const Packet: TSWAGPacket); + /// Gets source code for a packet from file and stores it in the + /// packet record. + /// TSWAGPacket [in/out] Packet for which source + /// code is required. Packet is updated with required source code. + /// ESWAGXMLProcessor raised if packet source code can't be /// loaded. - procedure GetSnippetSourceCode(var Snippet: TSWAGSnippet); + procedure GetPacketSourceCode(var Packet: TSWAGPacket); public /// Constructor that sets up object ready to to process XML. /// @@ -108,23 +108,23 @@ TSWAGXMLProcessor = class(TObject) /// ESWAGXMLProcessor raised if categories can't be read or are /// invalid. procedure GetCategories(CatList: TList); - /// Gets partial information about all snippets belonging to a + /// Gets partial information about all packets belonging to a /// category from the SWAG XML file. - /// string [in] ID of category for which snippets are + /// string [in] ID of category for which packets are /// required. - /// TList<TSWAGSnippet> [in] Receives list - /// of snippets read. - /// ESWAGXMLProcessor raised if partial snippets can't be read + /// TList<TSWAGPacket> [in] Receives list + /// of packets read. + /// ESWAGXMLProcessor raised if partial packets can't be read /// or are invalid. - procedure GetPartialSnippets(const CatID: string; - SnippetList: TList); - /// Gets a single snippet from the SWAG XML file. - /// Cardinal [in] Unique ID of the required - /// snippet. - /// TSWAGSnippet. Details of the required snippet. - /// ESWAGXMLProcessor raised if snippet can't be read or is + procedure GetPartialPackets(const CatID: string; + PacketList: TList); + /// Gets a single packet from the SWAG XML file. + /// Cardinal [in] Unique ID of the required packet. + /// + /// TSWAGPacket. Details of the required packet. + /// ESWAGXMLProcessor raised if packet can't be read or is /// invalid. - function GetSnippet(const SnippetID: Cardinal): TSWAGSnippet; + function GetPacket(const PacketID: Cardinal): TSWAGPacket; end; @@ -200,112 +200,112 @@ procedure TSWAGXMLProcessor.GetCategories(CatList: TList); end; end; -procedure TSWAGXMLProcessor.GetPartialSnippets(const CatID: string; - SnippetList: TList); +function TSWAGXMLProcessor.GetPacket(const PacketID: Cardinal): TSWAGPacket; var - AllSnippetsNode: IXMLNode; - SnippetNodes: IXMLSimpleNodeList; - SnippetNode: IXMLNode; - Snippet: TSWAGSnippet; - SnippetID: Integer; -resourcestring - sSnippetsNodeMissing = 'Invalid SWAG XML file: no snippet information found'; - sBadSourceID = 'Invalid SWAG XML file: invalid snippet ID encountered'; -begin - AllSnippetsNode := fXMLDoc.FindNode(NodePath([cSWAGRootNode, cSnippetsNode])); - if not Assigned(AllSnippetsNode) then - raise ESWAGXMLProcessor.Create(sSnippetsNodeMissing); - SnippetNodes := fXMLDoc.FindChildNodes(AllSnippetsNode, cSnippetNode); - if not Assigned(SnippetNodes) then - Exit; - for SnippetNode in SnippetNodes do - begin - if StrSameText( - TXMLDocHelper.GetSubTagText(fXMLDoc, SnippetNode, cSnippetCatIdNode), - CatID - ) then - begin - if not TryStrToInt(SnippetNode.Attributes[cSnippetIDAttr], SnippetID) then - raise ESWAGXMLProcessor.Create(sBadSourceID); - Snippet.ID := SnippetID; - Snippet.Title := TXMLDocHelper.GetSubTagText( - fXMLDoc, SnippetNode, cSnippetTitleNode - ); - ValidatePartialSnippet(Snippet); - SnippetList.Add(Snippet); - end; - end; -end; - -function TSWAGXMLProcessor.GetSnippet(const SnippetID: Cardinal): TSWAGSnippet; -var - AllSnippetsNode: IXMLNode; - SnippetNode: IXMLNode; + AllPacketsNode: IXMLNode; + PacketNode: IXMLNode; DateStr: string; resourcestring - sSnippetsNodeMissing = 'Invalid SWAG XML file: no snippet information found'; - sSnippetNotFound = 'Invalid SWAG XML file: snippet with ID %d not found'; + sPacketsNodeMissing = 'Invalid SWAG XML file: no packet information found'; + sPacketNotFound = 'Invalid SWAG XML file: packet with ID %d not found'; begin - // Find required snippet node - AllSnippetsNode := fXMLDoc.FindNode(NodePath([cSWAGRootNode, cSnippetsNode])); - if not Assigned(AllSnippetsNode) then - raise ESWAGXMLProcessor.Create(sSnippetsNodeMissing); - SnippetNode := fXMLDoc.FindFirstChildNode( - AllSnippetsNode, cSnippetNode, cSnippetIDAttr, SnippetID + // Find required Packet node + AllPacketsNode := fXMLDoc.FindNode(NodePath([cSWAGRootNode, cPacketsNode])); + if not Assigned(AllPacketsNode) then + raise ESWAGXMLProcessor.Create(sPacketsNodeMissing); + PacketNode := fXMLDoc.FindFirstChildNode( + AllPacketsNode, cPacketNode, cPacketIDAttr, PacketID ); - if not Assigned(SnippetNode) then - raise ESWAGXMLProcessor.CreateFmt(sSnippetNotFound, [SnippetID]); - // Get snippet info from snippet node - Result.ID := SnippetID; + if not Assigned(PacketNode) then + raise ESWAGXMLProcessor.CreateFmt(sPacketNotFound, [PacketID]); + // Get Packet info from Packet node + Result.ID := PacketID; Result.Category := TXMLDocHelper.GetSubTagText( - fXMLDoc, SnippetNode, cSnippetCatIdNode + fXMLDoc, PacketNode, cPacketCatIdNode ); Result.FileName := TXMLDocHelper.GetSubTagText( - fXMLDoc, SnippetNode, cSnippetFileNameNode + fXMLDoc, PacketNode, cPacketFileNameNode ); DateStr := TXMLDocHelper.GetSubTagText( - fXMLDoc, SnippetNode, cSnippetDateNode + fXMLDoc, PacketNode, cPacketDateNode ); if not TryParseSQLDateTime(DateStr, Result.DateStamp) then Result.DateStamp := 0.0; Result.Title := TXMLDocHelper.GetSubTagText( - fXMLDoc, SnippetNode, cSnippetTitleNode + fXMLDoc, PacketNode, cPacketTitleNode ); Result.Author := TXMLDocHelper.GetSubTagText( - fXMLDoc, SnippetNode, cSnippetAuthorNode + fXMLDoc, PacketNode, cPacketAuthorNode ); Result.IsDocument := StrSameText( - TXMLDocHelper.GetSubTagText(fXMLDoc, SnippetNode, cSnippetIsDocumentNode), + TXMLDocHelper.GetSubTagText(fXMLDoc, PacketNode, cPacketIsDocumentNode), '1' ); - GetSnippetSourceCode(Result); - ValidateSnippet(Result); + GetPacketSourceCode(Result); + ValidatePacket(Result); end; -procedure TSWAGXMLProcessor.GetSnippetSourceCode(var Snippet: TSWAGSnippet); +procedure TSWAGXMLProcessor.GetPacketSourceCode(var Packet: TSWAGPacket); var FilePath: string; Code: string; resourcestring sSourceCodeNotFound = 'Invalid SWAG database: ' - + 'source code file for snippet %d not found'; + + 'source code file for packet %d not found'; begin - Assert(Snippet.ID > 0, ClassName + '.GetSnippetSourceCode: ' - + 'Snippet.ID not set'); - Assert(not StrIsEmpty(Snippet.Category), - ClassName + '.GetSnippetSourceCode: Snippet.Category not set'); - Assert(not StrIsEmpty(Snippet.FileName), - ClassName + '.GetSnippetSourceCode: Snippet.FileName not set'); + Assert(Packet.ID > 0, ClassName + '.GetPacketSourceCode: ' + + 'Packet.ID not set'); + Assert(not StrIsEmpty(Packet.Category), + ClassName + '.GetPacketSourceCode: Packet.Category not set'); + Assert(not StrIsEmpty(Packet.FileName), + ClassName + '.GetPacketSourceCode: Packet.FileName not set'); FilePath := StrJoin( - [fSWAGRootDir, Snippet.Category, Snippet.FileName], PathDelim + [fSWAGRootDir, Packet.Category, Packet.FileName], PathDelim ); if not TFile.Exists(FilePath, False) then - raise ESWAGXMLProcessor.CreateFmt(sSourceCodeNotFound, [Snippet.ID]); + raise ESWAGXMLProcessor.CreateFmt(sSourceCodeNotFound, [Packet.ID]); Code := TFileIO.ReadAllText(FilePath, TEncoding.Default); // Some if not all the source code files end in the EOF (SUB) character if (Length(Code) > 0) and (Code[Length(Code)] = EOF) then Code := StrSliceLeft(Code, Length(Code) - 1); - Snippet.SourceCode := Code; + Packet.SourceCode := Code; +end; + +procedure TSWAGXMLProcessor.GetPartialPackets(const CatID: string; + PacketList: TList); +var + AllPacketsNode: IXMLNode; + PacketNodes: IXMLSimpleNodeList; + PacketNode: IXMLNode; + Packet: TSWAGPacket; + PacketID: Integer; +resourcestring + sPacketsNodeMissing = 'Invalid SWAG XML file: no packet information found'; + sBadSourceID = 'Invalid SWAG XML file: invalid packet ID encountered'; +begin + AllPacketsNode := fXMLDoc.FindNode(NodePath([cSWAGRootNode, cPacketsNode])); + if not Assigned(AllPacketsNode) then + raise ESWAGXMLProcessor.Create(sPacketsNodeMissing); + PacketNodes := fXMLDoc.FindChildNodes(AllPacketsNode, cPacketNode); + if not Assigned(PacketNodes) then + Exit; + for PacketNode in PacketNodes do + begin + if StrSameText( + TXMLDocHelper.GetSubTagText(fXMLDoc, PacketNode, cPacketCatIdNode), + CatID + ) then + begin + if not TryStrToInt(PacketNode.Attributes[cPacketIDAttr], PacketID) then + raise ESWAGXMLProcessor.Create(sBadSourceID); + Packet.ID := PacketID; + Packet.Title := TXMLDocHelper.GetSubTagText( + fXMLDoc, PacketNode, cPacketTitleNode + ); + ValidatePartialPacket(Packet); + PacketList.Add(Packet); + end; + end; end; procedure TSWAGXMLProcessor.Initialise(const SWAGDirName: string); @@ -350,36 +350,36 @@ class function TSWAGXMLProcessor.NodePath(const Tags: array of string): string; Result := StrJoin(Tags, '\', False); end; -procedure TSWAGXMLProcessor.ValidatePartialSnippet(const Snippet: TSWAGSnippet); +procedure TSWAGXMLProcessor.ValidatePacket(const Packet: TSWAGPacket); resourcestring - sBadID = 'Invalid SWAG XML file: snippet ID not set'; - sBadTitle = 'Invalid SWAG XML file: snippet %d has no title'; + sBadCatID = 'Invalid SWAG XML file: packet %d has no category'; + sBadFileName = 'Invalid SWAG XML file: packet %d has no file name'; + sBadDateStamp = 'Invalid SWAG XML file: packet %d has no date stamp'; + sBadAuthor = 'Invalid SWAG XML file: packet %d has no author'; + sBadSourceCode = 'Invalid SWAG XML file: packet %d has no source code'; begin - if Snippet.ID < 1 then - raise ESWAGXMLProcessor.Create(sBadID); - if StrIsEmpty(Snippet.Title, True) then - raise ESWAGXMLProcessor.CreateFmt(sBadTitle, [Snippet.ID]); + ValidatePartialPacket(Packet); + if StrIsEmpty(Packet.Category, True) then + raise ESWAGXMLProcessor.CreateFmt(sBadCatID, [Packet.ID]); + if StrIsEmpty(Packet.FileName, True) then + raise ESWAGXMLProcessor.CreateFmt(sBadFileName, [Packet.ID]); + if DateUtils.SameDateTime(Packet.DateStamp, 0.0) then + raise ESWAGXMLProcessor.CreateFmt(sBadDateStamp, [Packet.ID]); + if StrIsEmpty(Packet.Author, True) then + raise ESWAGXMLProcessor.CreateFmt(sBadAuthor, [Packet.ID]); + if StrIsEmpty(Packet.SourceCode, True) then + raise ESWAGXMLProcessor.CreateFmt(sBadSourceCode, [Packet.ID]); end; -procedure TSWAGXMLProcessor.ValidateSnippet(const Snippet: TSWAGSnippet); +procedure TSWAGXMLProcessor.ValidatePartialPacket(const Packet: TSWAGPacket); resourcestring - sBadCatID = 'Invalid SWAG XML file: snippet %d has no category'; - sBadFileName = 'Invalid SWAG XML file: snippet %d has no file name'; - sBadDateStamp = 'Invalid SWAG XML file: snippet %d has no date stamp'; - sBadAuthor = 'Invalid SWAG XML file: snippet %d has no author'; - sBadSourceCode = 'Invalid SWAG XML file: snippet %d has no source code'; + sBadID = 'Invalid SWAG XML file: packet ID not set'; + sBadTitle = 'Invalid SWAG XML file: packet %d has no title'; begin - ValidatePartialSnippet(Snippet); - if StrIsEmpty(Snippet.Category, True) then - raise ESWAGXMLProcessor.CreateFmt(sBadCatID, [Snippet.ID]); - if StrIsEmpty(Snippet.FileName, True) then - raise ESWAGXMLProcessor.CreateFmt(sBadFileName, [Snippet.ID]); - if DateUtils.SameDateTime(Snippet.DateStamp, 0.0) then - raise ESWAGXMLProcessor.CreateFmt(sBadDateStamp, [Snippet.ID]); - if StrIsEmpty(Snippet.Author, True) then - raise ESWAGXMLProcessor.CreateFmt(sBadAuthor, [Snippet.ID]); - if StrIsEmpty(Snippet.SourceCode, True) then - raise ESWAGXMLProcessor.CreateFmt(sBadSourceCode, [Snippet.ID]); + if Packet.ID < 1 then + raise ESWAGXMLProcessor.Create(sBadID); + if StrIsEmpty(Packet.Title, True) then + raise ESWAGXMLProcessor.CreateFmt(sBadTitle, [Packet.ID]); end; procedure TSWAGXMLProcessor.ValidateXMLDoc; @@ -419,10 +419,10 @@ procedure TSWAGXMLProcessor.ValidateXMLDoc; // Check for compulsory node SourcesNode := fXMLDoc.FindNode( - NodePath([cSWAGRootNode, cSnippetsNode]) + NodePath([cSWAGRootNode, cPacketsNode]) ); if not Assigned(SourcesNode) then - raise ESWAGXMLProcessor.CreateFmt(sMissingNode, [cSnippetsNode]); + raise ESWAGXMLProcessor.CreateFmt(sMissingNode, [cPacketsNode]); end; end. From e46411fc9c1d6b63205ad8d62aa667b6c6dee2e3 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 24 May 2020 12:48:50 +0100 Subject: [PATCH 330/714] Renamed SWAG.USnippetCache unit as SWAG.UPacketCache --- Src/CodeSnip.dpr | 2 +- Src/CodeSnip.dproj | 2 +- Src/{SWAG.USnippetCache.pas => SWAG.UPacketCache.pas} | 2 +- Src/SWAG.UReader.pas | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename Src/{SWAG.USnippetCache.pas => SWAG.UPacketCache.pas} (99%) diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 52288af56..2f9a47b60 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -179,7 +179,7 @@ uses SWAG.UCommon in 'SWAG.UCommon.pas', SWAG.UImporter in 'SWAG.UImporter.pas', SWAG.UReader in 'SWAG.UReader.pas', - SWAG.USnippetCache in 'SWAG.USnippetCache.pas', + SWAG.UPacketCache in 'SWAG.UPacketCache.pas', SWAG.UXMLProcessor in 'SWAG.UXMLProcessor.pas', UActionFactory in 'UActionFactory.pas', UAnchors in 'UAnchors.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index d035bdb62..f38da34c0 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -376,7 +376,7 @@ - + diff --git a/Src/SWAG.USnippetCache.pas b/Src/SWAG.UPacketCache.pas similarity index 99% rename from Src/SWAG.USnippetCache.pas rename to Src/SWAG.UPacketCache.pas index 10b3eec87..7b0257305 100644 --- a/Src/SWAG.USnippetCache.pas +++ b/Src/SWAG.UPacketCache.pas @@ -9,7 +9,7 @@ } -unit SWAG.USnippetCache; +unit SWAG.UPacketCache; interface diff --git a/Src/SWAG.UReader.pas b/Src/SWAG.UReader.pas index f3e75e981..8fb2c973b 100644 --- a/Src/SWAG.UReader.pas +++ b/Src/SWAG.UReader.pas @@ -21,7 +21,7 @@ interface Generics.Collections, // Project SWAG.UCommon, - SWAG.USnippetCache, + SWAG.UPacketCache, SWAG.UXMLProcessor, UExceptions; From 6198d7743c1fc2bda9f4d33aa0ccccd05a3b736d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 24 May 2020 19:23:03 +0100 Subject: [PATCH 331/714] Adapted to recent changes in SWAG collection data structure --- Src/FmSWAGImportDlg.pas | 6 ++-- Src/SWAG.UCommon.pas | 6 ++-- Src/SWAG.UReader.pas | 28 ++++++++++----- Src/SWAG.UXMLProcessor.pas | 74 +++++++++++++++++++++++++------------- 4 files changed, 74 insertions(+), 40 deletions(-) diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index 02d5b841f..5712de80d 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -133,8 +133,8 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) /// user database. fImporter: TSWAGImporter; /// ID of currently selected category. - /// Set to empty string if no category is selected. - fCurrentCatID: string; + /// Set to zero if no category is selected. + fCurrentCatID: Cardinal; /// Retrieves import directory name from edit control where it is /// entered. function GetDirNameFromEditCtrl: string; @@ -503,7 +503,7 @@ procedure TSWAGImportDlg.DisplayPacketsForCategory; CatIdx := lbCategories.ItemIndex; if CatIdx = -1 then begin - fCurrentCatID := ''; + fCurrentCatID := 0; Exit; end; if fCurrentCatID = fSortedCategories[CatIdx].ID then diff --git a/Src/SWAG.UCommon.pas b/Src/SWAG.UCommon.pas index 1a87a40a6..88de48097 100644 --- a/Src/SWAG.UCommon.pas +++ b/Src/SWAG.UCommon.pas @@ -18,8 +18,8 @@ interface type /// Record that encapsulates the data of a SWAG category. TSWAGCategory = record - /// String that uniquely identifies a SWAG category. - ID: string; + /// Number that uniquely identifies a SWAG category. + ID: Cardinal; /// SWAG category title. Title: string; end; @@ -31,7 +31,7 @@ TSWAGPacket = record /// Number that uniquely identifies a SWAG packet. ID: Cardinal; /// ID of SWAG category that packet belongs to. - Category: string; + Category: Cardinal; /// File name of packet in original SWAG archive. FileName: string; /// Date and time packet was added to or updated in the SWAG diff --git a/Src/SWAG.UReader.pas b/Src/SWAG.UReader.pas index 8fb2c973b..4770f9f4c 100644 --- a/Src/SWAG.UReader.pas +++ b/Src/SWAG.UReader.pas @@ -18,6 +18,7 @@ interface uses // Delphi SysUtils, + Generics.Defaults, Generics.Collections, // Project SWAG.UCommon, @@ -58,7 +59,7 @@ TSWAGReader = class(TObject) /// Only partial information that summarises each packet is /// stored. /// - fPacketsByCategory: TDictionary>; + fPacketsByCategory: TDictionary>; /// Object used to interogate SWAG XML file. fXMLProcessor: TSWAGXMLProcessor; /// Default wrapper for calls to the local SWAG database. @@ -85,7 +86,7 @@ TSWAGReader = class(TObject) procedure FetchCategories(CallWrapper: TSWAGCallbackWrapper); /// Fetches summaries of all the packets contained in a given /// SWAG category from the SWAG database. - /// string [in] ID of category for which packet + /// Cardinal [in] ID of category for which packet /// summaries are required. /// TSWAGCallbackWrapper [in] Callback that is /// called and passed a closure which can retrive the required category @@ -93,7 +94,7 @@ TSWAGReader = class(TObject) /// to the constructor is used. /// The fetched packet summaries are cached in /// fPacketsByCategory. - procedure FetchPartialPackets(const CatID: string; + procedure FetchPartialPackets(const CatID: Cardinal; CallWrapper: TSWAGCallbackWrapper); /// Fetches full details a packet from the SWAG database. /// @@ -147,7 +148,7 @@ TSWAGReader = class(TObject) CallWrapper: TSWAGCallbackWrapper = nil); /// Gets summaries of all the packets contained in a given SWAG /// category. - /// string [in] ID of the required category. + /// Cardinal [in] ID of the required category. /// TList<TSWAGPacket> [in] Receives the /// required list of packet summaries. /// TSWAGCallbackWrapper [in] Callback that is @@ -158,7 +159,7 @@ TSWAGReader = class(TObject) /// CallWrapper is called to retrieve the required packets. On subsequent /// calls for that category the packets summaries are read from a cache /// and CallWrapper is not called. - procedure GetPartialPackets(const CatID: string; + procedure GetPartialPackets(const CatID: Cardinal; const Packets: TList; CallWrapper: TSWAGCallbackWrapper = nil); /// Gets full details a packet from the SWAG database. @@ -222,9 +223,18 @@ constructor TSWAGReader.Create(const SWAGDBDir: string; inherited Create; fDefaultCallWrapper := DefaultSWAGCallbackWrapper; fCategories := TList.Create; - fPacketsByCategory := TObjectDictionary>.Create( + fPacketsByCategory := TObjectDictionary>.Create( [doOwnsValues], - TStringEqualityComparer.Create + TDelegatedEqualityComparer.Create( + function (const Left, Right: Cardinal): Boolean + begin + Result := Left = Right; + end, + function (const Value: Cardinal): Integer + begin + Result := Integer(Value); + end + ) ); fPacketCache := TSWAGPacketCache.Create(MaxPacketCacheSize); fXMLProcessor := TSWAGXMLProcessor.Create; @@ -301,7 +311,7 @@ procedure TSWAGReader.FetchCompletePackets(const PacketIDs: TList; ); end; -procedure TSWAGReader.FetchPartialPackets(const CatID: string; +procedure TSWAGReader.FetchPartialPackets(const CatID: Cardinal; CallWrapper: TSWAGCallbackWrapper); begin if not Assigned(CallWrapper) then @@ -382,7 +392,7 @@ procedure TSWAGReader.GetCompletePackets(PacketIDs: TList; end; end; -procedure TSWAGReader.GetPartialPackets(const CatID: string; +procedure TSWAGReader.GetPartialPackets(const CatID: Cardinal; const Packets: TList; CallWrapper: TSWAGCallbackWrapper); begin if not fPacketsByCategory.ContainsKey(CatID) then diff --git a/Src/SWAG.UXMLProcessor.pas b/Src/SWAG.UXMLProcessor.pas index e7db57fa0..f8f0af588 100644 --- a/Src/SWAG.UXMLProcessor.pas +++ b/Src/SWAG.UXMLProcessor.pas @@ -18,6 +18,7 @@ interface uses // VCL + XMLIntf, Generics.Collections, // Project SWAG.UCommon, @@ -47,8 +48,8 @@ TSWAGXMLProcessor = class(TObject) cCategoryNode = 'category'; cCategoryIDAttr = 'id'; cCategoryTitleNode = 'title'; - cPacketsNode = 'snippets'; - cPacketNode = 'snippet'; + cPacketsNode = 'packets'; + cPacketNode = 'packet'; cPacketIDAttr = 'id'; cPacketCatIdNode = 'category-id'; cPacketFileNameNode = 'file-name'; @@ -91,6 +92,18 @@ TSWAGXMLProcessor = class(TObject) /// ESWAGXMLProcessor raised if packet source code can't be /// loaded. procedure GetPacketSourceCode(var Packet: TSWAGPacket); + /// Read and validate a positive integer value from a node + /// attribute + /// IXMLNode [in] Node whose attribute is to be read. + /// + /// string [in] Name of attribute. + /// string [in] Exception error messsage to be used on + /// error. + /// Required postive integer value. + /// ESWAGXMLProcessor raised if attribute value is missing or + /// is not a positive integer. + function GetPositiveIntAttribute(Node: IXMLNode; const Attr: string; + const ErrMsg: string): Cardinal; public /// Constructor that sets up object ready to to process XML. /// @@ -110,13 +123,13 @@ TSWAGXMLProcessor = class(TObject) procedure GetCategories(CatList: TList); /// Gets partial information about all packets belonging to a /// category from the SWAG XML file. - /// string [in] ID of category for which packets are + /// Cardinal [in] ID of category for which packets are /// required. /// TList<TSWAGPacket> [in] Receives list /// of packets read. /// ESWAGXMLProcessor raised if partial packets can't be read /// or are invalid. - procedure GetPartialPackets(const CatID: string; + procedure GetPartialPackets(const CatID: Cardinal; PacketList: TList); /// Gets a single packet from the SWAG XML file. /// Cardinal [in] Unique ID of the required packet. @@ -142,7 +155,6 @@ implementation Classes, IOUtils, ActiveX, - XMLIntf, Math, DateUtils, // Project @@ -179,6 +191,7 @@ procedure TSWAGXMLProcessor.GetCategories(CatList: TList); sMissingNode = 'Invalid SWAG XML file: no categories information found'; sMissingID = 'Invalid SWAG XML file: missing category ID'; sMissingTitle = 'Invalid SWAG XML file: missing title for category "%s"'; + sBadSourceID = 'Invalid SWAG XML file: invalid or missing category ID'; begin CategoriesNode := fXMLDoc.FindNode( NodePath([cSWAGRootNode, cCategoriesNode]) @@ -188,9 +201,9 @@ procedure TSWAGXMLProcessor.GetCategories(CatList: TList); CategoryNodes := fXMLDoc.FindChildNodes(CategoriesNode, cCategoryNode); for CategoryNode in CategoryNodes do begin - Category.ID := CategoryNode.Attributes[cCategoryIDAttr]; - if StrIsEmpty(Category.ID, True) then - raise ESWAGXMLProcessor.Create(sMissingID); + Category.ID := GetPositiveIntAttribute( + CategoryNode, cCategoryIDAttr, sBadSourceID + ); Category.Title := TXMLDocHelper.GetSubTagText( fXMLDoc, CategoryNode, cCategoryTitleNode ); @@ -205,9 +218,12 @@ function TSWAGXMLProcessor.GetPacket(const PacketID: Cardinal): TSWAGPacket; AllPacketsNode: IXMLNode; PacketNode: IXMLNode; DateStr: string; + PacketCatID: Cardinal; resourcestring sPacketsNodeMissing = 'Invalid SWAG XML file: no packet information found'; sPacketNotFound = 'Invalid SWAG XML file: packet with ID %d not found'; + sBadPacketCategory = 'Invalid SWAG XML file: packet has invalid or missing ' + + 'category ID'; begin // Find required Packet node AllPacketsNode := fXMLDoc.FindNode(NodePath([cSWAGRootNode, cPacketsNode])); @@ -220,9 +236,12 @@ function TSWAGXMLProcessor.GetPacket(const PacketID: Cardinal): TSWAGPacket; raise ESWAGXMLProcessor.CreateFmt(sPacketNotFound, [PacketID]); // Get Packet info from Packet node Result.ID := PacketID; - Result.Category := TXMLDocHelper.GetSubTagText( - fXMLDoc, PacketNode, cPacketCatIdNode - ); + if not TryStrToCardinal( + TXMLDocHelper.GetSubTagText(fXMLDoc, PacketNode, cPacketCatIdNode), + PacketCatID + ) then + raise ESWAGXMLProcessor.Create(sBadPacketCategory); + Result.Category := PacketCatID; Result.FileName := TXMLDocHelper.GetSubTagText( fXMLDoc, PacketNode, cPacketFileNameNode ); @@ -255,12 +274,10 @@ procedure TSWAGXMLProcessor.GetPacketSourceCode(var Packet: TSWAGPacket); begin Assert(Packet.ID > 0, ClassName + '.GetPacketSourceCode: ' + 'Packet.ID not set'); - Assert(not StrIsEmpty(Packet.Category), - ClassName + '.GetPacketSourceCode: Packet.Category not set'); Assert(not StrIsEmpty(Packet.FileName), ClassName + '.GetPacketSourceCode: Packet.FileName not set'); FilePath := StrJoin( - [fSWAGRootDir, Packet.Category, Packet.FileName], PathDelim + [fSWAGRootDir, Packet.FileName], PathDelim ); if not TFile.Exists(FilePath, False) then raise ESWAGXMLProcessor.CreateFmt(sSourceCodeNotFound, [Packet.ID]); @@ -271,17 +288,17 @@ procedure TSWAGXMLProcessor.GetPacketSourceCode(var Packet: TSWAGPacket); Packet.SourceCode := Code; end; -procedure TSWAGXMLProcessor.GetPartialPackets(const CatID: string; +procedure TSWAGXMLProcessor.GetPartialPackets(const CatID: Cardinal; PacketList: TList); var AllPacketsNode: IXMLNode; PacketNodes: IXMLSimpleNodeList; PacketNode: IXMLNode; Packet: TSWAGPacket; - PacketID: Integer; + CatIDFromNode: Cardinal; resourcestring sPacketsNodeMissing = 'Invalid SWAG XML file: no packet information found'; - sBadSourceID = 'Invalid SWAG XML file: invalid packet ID encountered'; + sBadSourceID = 'Invalid SWAG XML file: missing or invalid packet ID'; begin AllPacketsNode := fXMLDoc.FindNode(NodePath([cSWAGRootNode, cPacketsNode])); if not Assigned(AllPacketsNode) then @@ -291,14 +308,14 @@ procedure TSWAGXMLProcessor.GetPartialPackets(const CatID: string; Exit; for PacketNode in PacketNodes do begin - if StrSameText( + if TryStrToCardinal( TXMLDocHelper.GetSubTagText(fXMLDoc, PacketNode, cPacketCatIdNode), - CatID - ) then + CatIDFromNode + ) and (CatIDFromNode > 0) and (CatIDFromNode = CatID) then begin - if not TryStrToInt(PacketNode.Attributes[cPacketIDAttr], PacketID) then - raise ESWAGXMLProcessor.Create(sBadSourceID); - Packet.ID := PacketID; + Packet.ID := GetPositiveIntAttribute( + PacketNode, cPacketIDAttr, sBadSourceID + ); Packet.Title := TXMLDocHelper.GetSubTagText( fXMLDoc, PacketNode, cPacketTitleNode ); @@ -308,6 +325,13 @@ procedure TSWAGXMLProcessor.GetPartialPackets(const CatID: string; end; end; +function TSWAGXMLProcessor.GetPositiveIntAttribute(Node: IXMLNode; const Attr, + ErrMsg: string): Cardinal; +begin + if not TryStrToCardinal(Node.Attributes[Attr], Result) or (Result = 0) then + raise ESWAGXMLProcessor.Create(ErrMsg); +end; + procedure TSWAGXMLProcessor.Initialise(const SWAGDirName: string); resourcestring sFileReadError = 'Can''t read SWAG database file "%0:s"' + EOL2 @@ -352,14 +376,14 @@ class function TSWAGXMLProcessor.NodePath(const Tags: array of string): string; procedure TSWAGXMLProcessor.ValidatePacket(const Packet: TSWAGPacket); resourcestring - sBadCatID = 'Invalid SWAG XML file: packet %d has no category'; + sBadCatID = 'Invalid SWAG XML file: packet %d has invalid category'; sBadFileName = 'Invalid SWAG XML file: packet %d has no file name'; sBadDateStamp = 'Invalid SWAG XML file: packet %d has no date stamp'; sBadAuthor = 'Invalid SWAG XML file: packet %d has no author'; sBadSourceCode = 'Invalid SWAG XML file: packet %d has no source code'; begin ValidatePartialPacket(Packet); - if StrIsEmpty(Packet.Category, True) then + if Packet.Category = 0 then raise ESWAGXMLProcessor.CreateFmt(sBadCatID, [Packet.ID]); if StrIsEmpty(Packet.FileName, True) then raise ESWAGXMLProcessor.CreateFmt(sBadFileName, [Packet.ID]); From fd556101cb60b3780953b7a613e0606f69423a74 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 24 May 2020 19:24:15 +0100 Subject: [PATCH 332/714] Made a few UI changes re recent SWAG data structure changes --- Src/FmSWAGImportDlg.dfm | 10 +++------- Src/FmSWAGImportDlg.pas | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Src/FmSWAGImportDlg.dfm b/Src/FmSWAGImportDlg.dfm index 38ae143cc..7c580e49e 100644 --- a/Src/FmSWAGImportDlg.dfm +++ b/Src/FmSWAGImportDlg.dfm @@ -19,7 +19,7 @@ inherited SWAGImportDlg: TSWAGImportDlg inherited pcWizard: TPageControl Width = 671 Height = 456 - ActivePage = tsCategories + ActivePage = tsUpdate ExplicitWidth = 671 ExplicitHeight = 456 object tsIntro: TTabSheet @@ -178,10 +178,6 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsUpdate' ImageIndex = 2 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object lblUpdateDesc: TLabel Left = 0 Top = 3 @@ -204,11 +200,11 @@ inherited SWAGImportDlg: TSWAGImportDlg Height = 317 Columns = < item - Caption = 'Snippet Title (Display Name)' + Caption = 'Packet Title '#8594' Snippet Display Name' Width = 400 end item - Caption = 'Snippet ID (Name)' + Caption = 'Snippet Name from SWAG ID' Width = 200 end> ColumnClick = False diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index 5712de80d..1337e18e5 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -767,7 +767,7 @@ procedure TSWAGImportDlg.PreviewSelectedPacket; resourcestring sWaitMsg = 'Retrieving packet...'; sContentTplt = 'ID: %0:d' + EOL + - 'Category: "%1:s"' + EOL + + 'Category ID: %1:d' + EOL + 'File Name: "%2:s"' + EOL + 'Title: "%3:s"' + EOL + 'Author: "%4:s"' + EOL2 + From d4f3b3ef3362b45b89e622634f9e29c300dfc982 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 25 May 2020 02:23:01 +0100 Subject: [PATCH 333/714] New unit with class to read/validate SWAG VERSION files --- Src/CodeSnip.dpr | 1 + Src/CodeSnip.dproj | 2 + Src/SWAG.UVersion.pas | 113 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 Src/SWAG.UVersion.pas diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 2f9a47b60..5a0069e9e 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -180,6 +180,7 @@ uses SWAG.UImporter in 'SWAG.UImporter.pas', SWAG.UReader in 'SWAG.UReader.pas', SWAG.UPacketCache in 'SWAG.UPacketCache.pas', + SWAG.UVersion in 'SWAG.UVersion.pas', SWAG.UXMLProcessor in 'SWAG.UXMLProcessor.pas', UActionFactory in 'UActionFactory.pas', UAnchors in 'UAnchors.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index f38da34c0..4ff55c079 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -377,6 +377,7 @@ + @@ -565,6 +566,7 @@ + Base diff --git a/Src/SWAG.UVersion.pas b/Src/SWAG.UVersion.pas new file mode 100644 index 000000000..0585fc9a1 --- /dev/null +++ b/Src/SWAG.UVersion.pas @@ -0,0 +1,113 @@ +unit SWAG.UVersion; + + +interface + + +uses + // VCL + SysUtils, + // Project + UBaseObjects, + UExceptions, + UVersionInfo; + + +type + TSWAGVersion = class(TNoPublicConstructObject) + strict private + const + LowestSupportedVersion: TVersionNumber = (V1: 1; V2: 0; V3: 0; V4: 0); + LowestUnSupportedVersion: TVersionNumber = (V1: 1; V2: 1; V3: 0; V4: 0); + SWAGVersionFileName = 'VERSION'; + var + fSWAGFilePath: TFileName; + function ReadVersionStr: string; + function ReadAndValidateVersionFile: TVersionNumber; + strict protected + constructor InternalCreate(const SWAGDir: TFileName); + public + class procedure ValidateVersionFile(const SWAGDir: TFileName); + class function GetVersion(const SWAGDir: TFileName): TVersionNumber; + end; + + ESWAGVersion = class(ECodeSnip); + ECorruptSWAGVersion = class(ESWAGVersion); + EUnsupportedSWAGVersion = class(ESWAGVersion); + + +implementation + + +uses + // VCL + IOUtils, + // Project + UIOUtils; + + +{ TSWAGVersion } + +class function TSWAGVersion.GetVersion(const SWAGDir: TFileName): + TVersionNumber; +begin + with InternalCreate(SWAGDir) do + try + Result := ReadAndValidateVersionFile; + finally + Free; + end; +end; + +constructor TSWAGVersion.InternalCreate(const SWAGDir: TFileName); +begin + inherited InternalCreate; + fSWAGFilePath := IncludeTrailingPathDelimiter(SWAGDir) + SWAGVersionFileName; +end; + +function TSWAGVersion.ReadAndValidateVersionFile: TVersionNumber; +var + VerStr: string; +resourcestring + sMissingOrEmptyFile = 'Missing or empty %s file'; + sCorruptFile = 'Corrupt %s file'; + sOutOfRange = 'SWAG version %0:s is not supported. ' + + 'The version must be at least v%1:s and less than v%2:s'; +begin + VerStr := ReadVersionStr; + if VerStr = '' then + raise ECorruptSWAGVersion.CreateFmt( + sMissingOrEmptyFile, [SWAGVersionFileName] + ); + if not TVersionNumber.TryStrToVersionNumber(VerStr, Result) then + raise ECorruptSWAGVersion.CreateFmt(sCorruptFile, [SWAGVersionFileName]); + if (Result < LowestSupportedVersion) + or (Result >= LowestUnSupportedVersion) then + raise EUnsupportedSWAGVersion.CreateFmt( + sOutOfRange, + [ + string(Result), + string(LowestSupportedVersion), + string(LowestUnSupportedVersion) + ] + ); +end; + +function TSWAGVersion.ReadVersionStr: string; +begin + if not TFile.Exists(fSWAGFilePath) then + Exit(''); + Result := TFileIO.ReadAllText(fSWAGFilePath, TEncoding.UTF8, False); +end; + +class procedure TSWAGVersion.ValidateVersionFile(const SWAGDir: TFileName); +begin + with InternalCreate(SWAGDir) do + try + ReadAndValidateVersionFile; + finally + Free; + end; +end; + +end. From b77c17abdb9be71fc18041a7f0c26c7c4597aada Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 25 May 2020 02:24:09 +0100 Subject: [PATCH 334/714] Added reading, validation and display of SWAG version number --- Src/FmSWAGImportDlg.dfm | 14 ++++++++++-- Src/FmSWAGImportDlg.pas | 47 +++++++++++++++++++++++++++-------------- 2 files changed, 43 insertions(+), 18 deletions(-) diff --git a/Src/FmSWAGImportDlg.dfm b/Src/FmSWAGImportDlg.dfm index 7c580e49e..a263cef19 100644 --- a/Src/FmSWAGImportDlg.dfm +++ b/Src/FmSWAGImportDlg.dfm @@ -19,7 +19,7 @@ inherited SWAGImportDlg: TSWAGImportDlg inherited pcWizard: TPageControl Width = 671 Height = 456 - ActivePage = tsUpdate + ActivePage = tsCategories ExplicitWidth = 671 ExplicitHeight = 456 object tsIntro: TTabSheet @@ -136,6 +136,12 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = '&Select required packets:' FocusControl = clbSelectPackets end + object lblVersionNumber: TLabel + Left = 2 + Top = 427 + Width = 3 + Height = 13 + end object lbCategories: TListBox Left = 0 Top = 64 @@ -147,7 +153,7 @@ inherited SWAGImportDlg: TSWAGImportDlg OnKeyDown = lbCategoriesKeyDown end object clbSelectPackets: TCheckListBox - Left = 256 + Left = 240 Top = 64 Width = 404 Height = 321 @@ -178,6 +184,10 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsUpdate' ImageIndex = 2 TabVisible = False + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object lblUpdateDesc: TLabel Left = 0 Top = 3 diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index 1337e18e5..0a45c8043 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -69,6 +69,7 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) btnBrowse: TButton; actBrowse: TAction; frmIntro: THTMLTpltDlgFrame; + lblVersionNumber: TLabel; /// Handles clicks on the check boxes next to packets in the /// packet selection list box by selecting and deselecting packets for /// inclusion in the import. @@ -243,6 +244,7 @@ implementation // Project FmPreviewDlg, FmWaitDlg, + SWAG.UVersion, UBrowseForFolderDlg, UColours, UConsts, @@ -254,6 +256,7 @@ implementation UMessageBox, UStrUtils, UUrl, + UVersionInfo, UWaitForThreadUI; {$R *.dfm} @@ -319,7 +322,7 @@ procedure TSWAGImportDlg.ArrangeForm; lblCategoriesDesc.Width := tsCategories.ClientWidth; lblCategoriesDesc.Top := 3; TCtrlArranger.AlignLefts( - [lblCategoriesDesc, lblCategories, lbCategories], 0 + [lblCategoriesDesc, lblCategories, lbCategories, lblVersionNumber], 0 ); TCtrlArranger.AlignTops( [lblCategories, lblSelectPackets], @@ -333,6 +336,11 @@ procedure TSWAGImportDlg.ArrangeForm; [btnDisplayCategory, btnDisplayPacket], TCtrlArranger.BottomOf([lbCategories, clbSelectPackets], 8) ); + TCtrlArranger.MoveBelow( + [btnDisplayCategory, btnDisplayPacket], + lblVersionNumber, + 8 + ); TCtrlArranger.AlignHCentresTo([lbCategories], [btnDisplayCategory]); TCtrlArranger.AlignHCentresTo([clbSelectPackets], [btnDisplayPacket]); @@ -604,28 +612,23 @@ function TSWAGImportDlg.HeadingText(const PageIdx: Integer): string; end; procedure TSWAGImportDlg.InitSelectionPage; -//resourcestring -// sDefaultWaitMsg = 'Accessing SWAG database...'; var Cats: TList; Idx: Integer; + VerNumStr: string; +resourcestring + sLblVersionNumberCaption = 'SWAG version %s'; begin + lblVersionNumber.Caption := Format( + sLblVersionNumberCaption, + [string(TSWAGVersion.GetVersion(GetDirNameFromEditCtrl))] + ); + Application.ProcessMessages; if (lbCategories.Count > 0) then Exit; -// fPrevSWAGDir := GetDirNameFromEditCtrl; -// -// FreeAndNil(fSWAGReader); -// fSWAGReader := TSWAGReader.Create( -// GetDirNameFromEditCtrl, -// procedure (CallProc: TProc) -// begin -// WaitWrapper(Self, CallProc, sDefaultWaitMsg); -// end -// ); -// Cats := TList.Create; try fSWAGReader.GetCategories(Cats); @@ -856,11 +859,23 @@ procedure TSWAGImportDlg.ValidatePage(const PageIdx: Integer); sNoFolder = 'Please enter the directory where you downloaded the SWAG ' + 'database.'; sBadFolder = 'Directory "%s" does not exist. Please specify a valid one.'; + sBadVersion = '%s.' + EOL2 + + 'Please specify a directory containing a supported version.'; + sCorrupt = 'Not a valid SWAG database (%s). ' + EOL2 + + 'Please specify a different directory.'; begin if GetDirNameFromEditCtrl = '' then - raise EDataEntry.Create(sNoFolder); + raise EDataEntry.Create(sNoFolder, edPath); if not TDirectory.Exists(GetDirNameFromEditCtrl, False) then - raise EDataEntry.CreateFmt(sBadFolder, [GetDirNameFromEditCtrl]); + raise EDataEntry.CreateFmt(sBadFolder, [GetDirNameFromEditCtrl], edPath); + try + TSWAGVersion.ValidateVersionFile(GetDirNameFromEditCtrl); + except + on E: ECorruptSWAGVersion do + raise EDataEntry.CreateFmt(sCorrupt, [E.Message], edPath); + on E: EUnsupportedSWAGVersion do + raise EDataEntry.CreateFmt(sBadVersion, [E.Message], edPath); + end; end; procedure ValidateSelectionPage; From 55a150194ff6f1218760395a6d70fa83de03377a Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 25 May 2020 02:45:50 +0100 Subject: [PATCH 335/714] Added comments: License boiler plate & XMLDoc documentation --- Src/SWAG.UVersion.pas | 58 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/Src/SWAG.UVersion.pas b/Src/SWAG.UVersion.pas index 0585fc9a1..db12fc68f 100644 --- a/Src/SWAG.UVersion.pas +++ b/Src/SWAG.UVersion.pas @@ -1,3 +1,15 @@ +{ + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/ + * + * Copyright (C) 2020, Peter Johnson (gravatar.com/delphidabbler). + * + * Provides a class that reads and validates the SWAG collection's version + * information from file. +} + + unit SWAG.UVersion; @@ -14,25 +26,69 @@ interface type + /// Class that reads and validates the SWAG collection's version + /// information from file. TSWAGVersion = class(TNoPublicConstructObject) strict private const + /// First supported SWAG version. LowestSupportedVersion: TVersionNumber = (V1: 1; V2: 0; V3: 0; V4: 0); + /// Lowest SWAG version that is NOT supported. LowestUnSupportedVersion: TVersionNumber = (V1: 1; V2: 1; V3: 0; V4: 0); + /// SWAG version file name, without path. SWAGVersionFileName = 'VERSION'; var + /// Stores fully specified path to SWAG version file. fSWAGFilePath: TFileName; + /// Reads and returns the version string from the version file. + /// function ReadVersionStr: string; + /// Reads, parses and validates version information from file. + /// + /// TVersionNumber. Structure containing version information. + /// + /// ECorruptSWAGVersion raised if version information in file + /// is corrupt, missing, or if the file is missing. + /// EUnsupportedSWAGVersion raised if the version information + /// read represents an unsupported format. function ReadAndValidateVersionFile: TVersionNumber; strict protected + /// Constructor that can only be called from with the class. + /// + /// TFileName [in] Directory where version file + /// should be located. constructor InternalCreate(const SWAGDir: TFileName); public + /// Validates the version file. Returns normally if there are no + /// errors or raises an exception if an error is found. + /// TFileName [in] Directory where version file + /// should be located. + /// ECorruptSWAGVersion raised if version information in file + /// is corrupt, missing, or if the file is missing. + /// EUnsupportedSWAGVersion raised if the version information + /// read represents an unsupported format. class procedure ValidateVersionFile(const SWAGDir: TFileName); - class function GetVersion(const SWAGDir: TFileName): TVersionNumber; + /// Gets SWAG version from file. + /// TFileName [in] Directory where version file + /// should be located. + /// TVersionNumber. Structure containing version information. + /// + /// ECorruptSWAGVersion raised if version information in file + /// is corrupt, missing, or if the file is missing. + /// EUnsupportedSWAGVersion raised if the version information + /// read represents an unsupported format. + class function GetVersion(const SWAGDir: TFileName): TVersionNumber; end; + /// Base class for exceptions raised in this unit. + /// Exceptions of this type should NOT be raised directly: use + /// sub-classes. ESWAGVersion = class(ECodeSnip); + /// Type of exception raised when the SWAG version file is missing + /// or corrupt. ECorruptSWAGVersion = class(ESWAGVersion); + /// Type of exception raised when the SWAG version is outside the + /// range of supported versions. EUnsupportedSWAGVersion = class(ESWAGVersion); From 11e28e35bf877d8dc6f1e2e10311e867ed69aeeb Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 25 May 2020 04:27:46 +0100 Subject: [PATCH 336/714] Made supported version consts public --- Src/SWAG.UVersion.pas | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Src/SWAG.UVersion.pas b/Src/SWAG.UVersion.pas index db12fc68f..a3e23e6a9 100644 --- a/Src/SWAG.UVersion.pas +++ b/Src/SWAG.UVersion.pas @@ -31,10 +31,6 @@ interface TSWAGVersion = class(TNoPublicConstructObject) strict private const - /// First supported SWAG version. - LowestSupportedVersion: TVersionNumber = (V1: 1; V2: 0; V3: 0; V4: 0); - /// Lowest SWAG version that is NOT supported. - LowestUnSupportedVersion: TVersionNumber = (V1: 1; V2: 1; V3: 0; V4: 0); /// SWAG version file name, without path. SWAGVersionFileName = 'VERSION'; var @@ -59,6 +55,11 @@ TSWAGVersion = class(TNoPublicConstructObject) /// should be located. constructor InternalCreate(const SWAGDir: TFileName); public + const + /// First supported SWAG version. + LowestSupportedVersion: TVersionNumber = (V1: 1; V2: 0; V3: 0; V4: 0); + /// Lowest SWAG version that is NOT supported. + LowestUnSupportedVersion: TVersionNumber = (V1: 1; V2: 1; V3: 0; V4: 0); /// Validates the version file. Returns normally if there are no /// errors or raises an exception if an error is found. /// TFileName [in] Directory where version file From 6f0eaf0c643d7bc5c22a7eea0d0ccaa8235687ea Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 25 May 2020 04:28:53 +0100 Subject: [PATCH 337/714] Updated info about SWAG database + some UI tweaks --- Src/FmSWAGImportDlg.dfm | 42 ++++++++------------ Src/FmSWAGImportDlg.pas | 25 ++++++++++-- Src/Res/HTML/dlg-swag-import-intro-tplt.html | 32 ++++++++++----- Src/Res/HTML/dlg-swag-import-outro-tplt.html | 6 +-- 4 files changed, 62 insertions(+), 43 deletions(-) diff --git a/Src/FmSWAGImportDlg.dfm b/Src/FmSWAGImportDlg.dfm index a263cef19..e93311a78 100644 --- a/Src/FmSWAGImportDlg.dfm +++ b/Src/FmSWAGImportDlg.dfm @@ -19,16 +19,12 @@ inherited SWAGImportDlg: TSWAGImportDlg inherited pcWizard: TPageControl Width = 671 Height = 456 - ActivePage = tsCategories + ActivePage = tsFinish ExplicitWidth = 671 ExplicitHeight = 456 object tsIntro: TTabSheet Caption = 'tsIntro' TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frmIntro: THTMLTpltDlgFrame Left = 0 Top = 0 @@ -59,37 +55,41 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsFolder' ImageIndex = 4 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object lblFolder: TLabel Left = 0 Top = 8 - Width = 393 + Width = 383 Height = 13 Caption = - 'Enter the SWAG database download &folder: (click the button to b' + - 'rowse for folder)' + 'Enter the SWAG database download &folder - you need the '#39'swag'#39' s' + + 'ub-directory:' FocusControl = edPath end - object lblFolderPageInfo: TLabel + object lblFolderPageInfo2: TLabel Left = 0 Top = 72 Width = 267 Height = 13 Caption = 'Click the Next button to choose which packets to import' end - object edPath: TEdit + object lblFolderPageInfo1: TLabel Left = 0 - Top = 28 + Top = 26 + Width = 208 + Height = 13 + Caption = 'Click the ... button to browse for the folder' + FocusControl = edPath + end + object edPath: TEdit + Left = 3 + Top = 45 Width = 484 Height = 21 TabOrder = 0 end object btnBrowse: TButton - Left = 490 - Top = 28 + Left = 493 + Top = 45 Width = 27 Height = 21 Action = actBrowse @@ -184,10 +184,6 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsUpdate' ImageIndex = 2 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 object lblUpdateDesc: TLabel Left = 0 Top = 3 @@ -231,10 +227,6 @@ inherited SWAGImportDlg: TSWAGImportDlg Caption = 'tsFinish' ImageIndex = 3 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 0 - ExplicitHeight = 0 inline frmOutro: THTMLTpltDlgFrame Left = 0 Top = 0 diff --git a/Src/FmSWAGImportDlg.pas b/Src/FmSWAGImportDlg.pas index 0a45c8043..5adb83ee2 100644 --- a/Src/FmSWAGImportDlg.pas +++ b/Src/FmSWAGImportDlg.pas @@ -65,11 +65,12 @@ TSWAGImportDlg = class(TWizardDlg, INoPublicConstruct) tsFolder: TTabSheet; lblFolder: TLabel; edPath: TEdit; - lblFolderPageInfo: TLabel; + lblFolderPageInfo2: TLabel; btnBrowse: TButton; actBrowse: TAction; frmIntro: THTMLTpltDlgFrame; lblVersionNumber: TLabel; + lblFolderPageInfo1: TLabel; /// Handles clicks on the check boxes next to packets in the /// packet selection list box by selecting and deselecting packets for /// inclusion in the import. @@ -315,8 +316,12 @@ procedure TSWAGImportDlg.ArrangeForm; TCtrlArranger.AlignVCentres( TCtrlArranger.BottomOf(lblFolder, 6), [edPath, btnBrowse] ); + TCtrlArranger.AlignLefts( + [lblFolder, edPath, lblFolderPageInfo1, lblFolderPageInfo2], 0 + ); TCtrlArranger.MoveToRightOf(edPath, btnBrowse, 8); - lblFolderPageInfo.Top := TCtrlArranger.BottomOf([edPath, btnBrowse], 12); + lblFolderPageInfo1.Top := TCtrlArranger.BottomOf([edPath, btnBrowse], 12); + lblFolderPageInfo2.Top := TCtrlArranger.BottomOf(lblFolderPageInfo1, 8); // tsCategories lblCategoriesDesc.Width := tsCategories.ClientWidth; @@ -423,7 +428,8 @@ procedure TSWAGImportDlg.BuildCSS(Sender: TObject; with CSSBuilder.AddSelector('.framed') do begin AddProperty(TCSS.BorderProp(cssAll, 1, cbsSolid, clBorder)); - AddProperty(TCSS.PaddingProp(4)); + AddProperty(TCSS.PaddingProp(0, 4, 4, 4)); + AddProperty(TCSS.MarginProp(cssTop, 4)); end; end; @@ -461,6 +467,8 @@ procedure TSWAGImportDlg.clbSelectPacketsKeyDown(Sender: TObject; end; procedure TSWAGImportDlg.ConfigForm; +resourcestring + sVersions = 'v%0:s to v%1:s'; begin inherited; pcWizard.ActivePage := tsFinish; @@ -485,6 +493,16 @@ procedure TSWAGImportDlg.ConfigForm; 'SWAGReleaseURL', TURL.SWAGReleases ); + Tplt.ResolvePlaceholderText( + 'SupportedSWAGVersions', + Format( + sVersions, + [ + string(TSWAGVersion.LowestSupportedVersion), + string(TSWAGVersion.LowestUnSupportedVersion) + ] + ) + ); end ); end; @@ -615,7 +633,6 @@ procedure TSWAGImportDlg.InitSelectionPage; var Cats: TList; Idx: Integer; - VerNumStr: string; resourcestring sLblVersionNumberCaption = 'SWAG version %s'; begin diff --git a/Src/Res/HTML/dlg-swag-import-intro-tplt.html b/Src/Res/HTML/dlg-swag-import-intro-tplt.html index b80aba355..4c441390f 100644 --- a/Src/Res/HTML/dlg-swag-import-intro-tplt.html +++ b/Src/Res/HTML/dlg-swag-import-intro-tplt.html @@ -24,35 +24,45 @@

    - This wizard enables you to import snippets from the SWAG database into your local user database.

    -

    - You must have a copy of a specially prepared version of SWAG on your local system before continuing. If you haven't already got it then you need to download it from the delphidabbler/swag repository on GitHub. Go to <%SWAGReleaseURL%> and find the latest release of the XML version of SWAG. The file name will be in the form swag-xml-vX.X.X where X.X.X is the version number. Download the file and unzip it into a folder on your computer. Make a note of the folder's location - it will be needed in the next step. +

    +

    + You must have a copy of a specially prepared version of SWAG on your local system before continuing. If you haven't already got it then you need to download it from the delphidabbler/swag repository on GitHub. +

    +

    + Go to <%SWAGReleaseURL%> and find the latest supported release†. The file name will be in the form dd-swag-vX.Y.Z where X.Y.Z is the version number. Download the file and unzip it into a folder on your computer. Make a note of the folder's location - it will be needed in the next step. +

    +

    + † Currently CodeSnip supports SWAG versions <%SupportedSWAGVersions%>. +

    +
    + +

    + Warning: Although importing snippets should be safe, you may wish to take a backup of your user database before going any further. You can do this from the Database | Backup User Database menu option. +

    - On the next page of the wizard you will be asked for the location of the folder containing the SWAG database. CodeSnip will then open the database and display all SWAG's categories on the following page. From there you can browse and display the snippets in each category before selecting those you want to import. You get a chance to review these before importing. + On the next page of the wizard you will be asked for the location of the folder containing the SWAG database. Note that you will need to specify the swag sub-directory of the download. CodeSnip will then open the database and display all SWAG's categories on the following page. From there you can browse and display the packets in each category before selecting those you want to import. You get a chance to review these before importing.

    - All snippets are imported as freeform. + >freeform snippets.

    - CodeSnip does not keep a track of snippets imported from SWAG – it treats them just like any other user defined snippet. This means it is possible to import the same snippet more than once. It's up to you to keep track of this. + CodeSnip does not keep a track of packets imported from SWAG – it treats them just like any other user defined snippet. This means it is possible to import the same packet more than once. It's up to you to keep track of this.

    - Note: It can take quite some time to import snippets from SWAG. You are advised not to import more than about 20 snippets in one go. If you want to import a lot of snippets you should run this wizard more than once. + Note: It can take quite some time to import packets from SWAG. You are advised not to import more than about 20 packets in one go. If you want to import a lot of packets you should run this wizard more than once.

    diff --git a/Src/Res/HTML/dlg-swag-import-outro-tplt.html b/Src/Res/HTML/dlg-swag-import-outro-tplt.html index 1bc72e4e0..e43c13afb 100644 --- a/Src/Res/HTML/dlg-swag-import-outro-tplt.html +++ b/Src/Res/HTML/dlg-swag-import-outro-tplt.html @@ -23,12 +23,12 @@

    - All the selected snippets have now been imported into the - <%SWAGCategory%> category. + All the selected SWAG packets have now been converted to CodeSnip snippets + and imported into the <%SWAGCategory%> category.

    - The imported snippets can be edited as required. + The snippets can be edited as required.

    From f6773c1b2d7f8f0de26b63a016f0ac86526e05aa Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Mon, 25 May 2020 05:00:58 +0100 Subject: [PATCH 338/714] Updated relevant help topics re SWAG-related changes --- Src/Help/HTML/about_swag.htm | 20 ++++++-- Src/Help/HTML/dlg_swagimport.htm | 80 ++++++++++++++++++-------------- 2 files changed, 60 insertions(+), 40 deletions(-) diff --git a/Src/Help/HTML/about_swag.htm b/Src/Help/HTML/about_swag.htm index 97217312f..05fc14f47 100644 --- a/Src/Help/HTML/about_swag.htm +++ b/Src/Help/HTML/about_swag.htm @@ -28,24 +28,34 @@

    SWAG is a collection of source code and program examples for the Pascal - programming language that was maintained up to the end of 1997. + programming language that was maintained up to the end of 1997. Each chunk + of source code or example is known as a packet.

    - Although the SWAG database is old it is extensive and some of the code is + Although the SWAG database is old, it is extensive and some of the code is still relevant for today's programs.

    CodeSnip provides the SWAG Import Wizard that enables you to - browse a local copy of the SWAG database and import any of its snippets - into your snippets database. + browse a local copy of the SWAG database and convert any of its packets + into snippets that can be imported into your local snippets database

    You can download the database from the delphidabbler/swag project on GitHub. Go to the releases tab and download the latest version. Unpack the zip file into an empty folder then run the SWAG Import Wizard and navigate to the folder where you extracted the zip file contents. + >delphidabbler/swag project on GitHub. Go to the + releases tab and download the latest supported version†. + Unpack the zip file into an empty folder then run the SWAG Import Wizard + and navigate to the swag sub-directory of the folder where + you extracted the zip file . The wizard reads the database and guides you + through the import process. +

    +

    + † The first page of the SWAG Import Wizard specifies which versions + of SWAG are supported by CodeSnip.

    diff --git a/Src/Help/HTML/dlg_swagimport.htm b/Src/Help/HTML/dlg_swagimport.htm index 3f3aefe42..890ac1b14 100644 --- a/Src/Help/HTML/dlg_swagimport.htm +++ b/Src/Help/HTML/dlg_swagimport.htm @@ -27,13 +27,18 @@

    SWAG Import Wizard

    - This wizard is used to enable you to import snippets from the + This wizard is used to enable you to import packets from the SWAG Database into your code snippets - database. The wizard is accessed from the Snippets | Import + database. (A SWAG packet is roughly the equivalent of a + CodeSnip snippet: packets are converted into snippets before + being imported.) +

    +

    + The wizard is accessed from the Snippets | Import Snippets From SWAG menu option.

    - Page 1: Import snippets from SWAG + Page 1: Import packets from SWAG as new snippets

    This page gives an overview of how to use the wizard. @@ -51,11 +56,15 @@

    Page 2: Select SWAG database download folder

    - On this page you need to provide the full path to the folder where you - downloaded the SWAG database. Enter the path in the edit box. You can - click the ellipsis button to the right of the edit box to display a - standard browse for folder dialogue box and choose the folder from there. - The chosen folder will be entered into the edit box for you. + On this page you need to provide the full path to the SWAG database on + your system. By default the required folder is the swag + sub-directory of the folder where you extracted the SWAG zip file. +

    +

    + Enter the path in the edit box. You can click the ellipsis button to the + right of the edit box to display a standard browse for folder dialogue box + and choose the folder from there. The chosen folder will be entered into + the edit box for you.

    Once you have entered the path click Next. The data in the folder @@ -65,36 +74,36 @@

    displayed and the page will not change.

    - Page 3: Select required snippets + Page 3: Select required packets

    When this page is first displayed it displays all the categories of - snippets available in the SWAG database in the SWAG categories + packets available in the SWAG database in the SWAG categories list box.

    - Choose a category in the list and click the Show Snippets In - Category button to display a list of its snippets in the right + Choose a category in the list and click the Show Packets In + Category button to display a list of its packets in the right hand list box. Alternatively just double-click the category name. The - first time you choose a category the wizard will read the list of snippets + first time you choose a category the wizard will read the list of packets from the database and a progress bar may be displayed while this is done.

    - Select any snippets you want to import by ticking the check box next to - the snippet's name. If you want to preview the snippet before deciding - whether to import it, highlight the snippet and click the Preview - Selected Snippet button. Alternatively just double click the snippet - name. The snippet will then be read from the database (if necessary) and - displayed in a dialogue box. + Select any packets you want to import by ticking the check box next to + the packet's name. If you want to preview the packet before deciding + whether to import it, highlight it and click the Preview Selected + Packet button. Alternatively just double click the packet name. The + packet will then be read from the database (if necessary) and displayed + in a dialogue box.

    Repeat this process for further categories if you wish. When you are - ready to import your chosen snippets click the Next button to - display the next page. Note that you must select at least one snippet in + ready to import your chosen packets click the Next button to + display the next page. Note that you must select at least one packet in order to move on.

    - Warning: Do not select too many snippets + Warning: Do not select too many packets to be imported at one time because the import process is not very efficient and can take a long time.

    @@ -102,16 +111,16 @@

    Page 4: Ready to import

    - This page lists all the snippets you have selected for import along with - the unique ID (i.e. snippet name) that will be assigned to it after - import. Note that some snippets may need to be retrieved from the SWAG - database when the page is displayed and a progress bar may be displayed - while this happens. + This page lists all the packets you have selected for import along with + the unique ID (i.e. snippet name) that will be assigned to the + CodeSnip snippet after import. Note that some packets may need to + be retrieved from the SWAG database when the page is displayed and a + progress bar may be displayed while this happens.

    You should review your selection. If you want to make any changes use the Back button to go back to the previous page and de-select any - unwanted snippets or select any snippets you may have missed. + unwanted packets or select any you may have missed.

    When you are ready to proceed, click the Import button. Once @@ -124,9 +133,9 @@

    Page 5: Import complete

    - This page simply confirms the import has completed. You should note that - all the snippets will have been imported into the same special category, - the name of which will be displayed. + This page simply confirms the import has completed. All the selected + packets will have been converted to snippets and imported into the same + special category, the name of which will be displayed.

    Click the Finish button to close the wizard. @@ -136,10 +145,11 @@

    snippet.

    - Note: CodeSnip does not track snippets imported - from SWAG, so if you import the same snippet more than once it will be - duplicated in your local database – it will not overwrite the - original. You will not be warned about such duplications. + Warning: CodeSnip does not track + packets imported from SWAG, so if you import the same packet more than + once a duplicate snippet will be created for it in your local database + – the original will not be overwritten. You will not be warned about + such duplications.

    From e59a14c230b5698a68474fddb717a476fd3e1c3b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 28 May 2020 17:01:26 +0100 Subject: [PATCH 339/714] Corrected SWAG license info added to imported snippets --- Src/SWAG.UImporter.pas | 82 ++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 27 deletions(-) diff --git a/Src/SWAG.UImporter.pas b/Src/SWAG.UImporter.pas index 61580e3d7..dff56f210 100644 --- a/Src/SWAG.UImporter.pas +++ b/Src/SWAG.UImporter.pas @@ -158,47 +158,75 @@ destructor TSWAGImporter.Destroy; end; function TSWAGImporter.ExtraBoilerplate: IActiveText; -resourcestring - sStatementPrefix = 'This snippet was imported from a packet in the '; - sStatementLinkText = 'SWAG Pascal Archive'; - sStatementPostfix = '. '; - sLicense = 'The code packets in the archive pages are generally freeware or ' - + 'public domain as defined by any accompanying comments and copyright ' - + 'statements. Contact the author if in doubt.'; - // TODO: Check license wording against SWAG docs - // URL of web page referenced from links in boilerplate - SWAGDBURI = 'https://github.com/delphidabbler/swag'; -var - // Active text attributes for link included in boilerplate - SWAGDBURIAttr: IActiveTextAttrs; -begin - if not Assigned(fExtraBoilerplate) then + + procedure AddText(const Text: string); begin - SWAGDBURIAttr := TActiveTextFactory.CreateAttrs( - TActiveTextAttr.Create('href', SWAGDBURI) - ); - fExtraBoilerplate := TActiveTextFactory.CreateActiveText; fExtraBoilerplate.AddElem( - TActiveTextFactory.CreateActionElem(ekPara, fsOpen) + TActiveTextFactory.CreateTextElem(Text) ); - fExtraBoilerplate.AddElem( - TActiveTextFactory.CreateTextElem(sStatementPrefix) + end; + + procedure AddLink(const Text, URI: string); + var + HRefAttr: IActiveTextAttrs; + begin + HRefAttr := TActiveTextFactory.CreateAttrs( + TActiveTextAttr.Create('href', URI) ); fExtraBoilerplate.AddElem( - TActiveTextFactory.CreateActionElem(ekLink, SWAGDBURIAttr, fsOpen) + TActiveTextFactory.CreateActionElem(ekLink, HRefAttr, fsOpen) ); + AddText(Text); fExtraBoilerplate.AddElem( - TActiveTextFactory.CreateTextElem(sStatementLinkText) + TActiveTextFactory.CreateActionElem(ekLink, HRefAttr, fsClose) ); + end; + +resourcestring + sStatementPrefix = 'This snippet was imported from a packet in the '; + sStatementLinkText = 'SWAG Pascal Code Collection'; + sStatementPostfix = '. '; + sLicense1 = 'Unless the snippet states otherwise it is deemed to be licensed ' + + 'under either the '; + sLGPLLinkText = 'GNU Lesser General Public License v2.1'; + sLicense2 = ' (source code) or the '; + sFDLLinkText = 'GNU Free Documentation License v1.2'; + sLicense3 = ' (other documents), as appropriate. For further information ' + + 'please see the '; + sSWAGLicenseLinkText = 'SWAG License document'; + sLicense4 = '.'; +const + // URLs of web pages referenced from links in boilerplate + SWAGProjectURL = 'https://github.com/delphidabbler/swag'; + SWAGLicenseURL = SWAGProjectURL + '/blob/master/LICENSE.md'; + LGPLLicenseURL = 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html'; + FDPLicenseURL = 'https://www.gnu.org/licenses/old-licenses/fdl-1.2.html'; + +begin + if not Assigned(fExtraBoilerplate) then + begin + fExtraBoilerplate := TActiveTextFactory.CreateActiveText; + // Intro para fExtraBoilerplate.AddElem( - TActiveTextFactory.CreateActionElem(ekLink, SWAGDBURIAttr, fsClose) + TActiveTextFactory.CreateActionElem(ekPara, fsOpen) ); + AddText(sStatementPrefix); + AddLink(sStatementLinkText, SWAGProjectURL); + AddText(sStatementPostfix); fExtraBoilerplate.AddElem( - TActiveTextFactory.CreateTextElem(sStatementPostfix) + TActiveTextFactory.CreateActionElem(ekPara, fsClose) ); + // License para fExtraBoilerplate.AddElem( - TActiveTextFactory.CreateTextElem(sLicense) + TActiveTextFactory.CreateActionElem(ekPara, fsOpen) ); + AddText(sLicense1); + AddLink(sLGPLLinkText, LGPLLicenseURL); + AddText(sLicense2); + AddLink(sFDLLinkText, FDPLicenseURL); + AddText(sLicense3); + AddLink(sSWAGLicenseLinkText, SWAGLicenseURL); + AddText(sLicense4); fExtraBoilerplate.AddElem( TActiveTextFactory.CreateActionElem(ekPara, fsClose) ); From a3d6120ae9ed977d653158222c36d8f82f6325e0 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 28 May 2020 17:11:51 +0100 Subject: [PATCH 340/714] Fix extra-long line --- Docs/ReadMe.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt index d667b1398..e45a0dddc 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe.txt @@ -144,7 +144,8 @@ Uninstalling the Standard Edition --------------------------------- CodeSnip can be uninstalled via "Apps and Features" (a.k.a. "Programs and -Features", a.k.a. "Add / Remove Programs") from the Windows Control Panel or by choosing "Uninstall DelphiDabbler CodeSnip" from the program's start menu group. +Features", a.k.a. "Add / Remove Programs") from the Windows Control Panel or by +choosing "Uninstall DelphiDabbler CodeSnip" from the program's start menu group. Administrator privileges will be required to uninstall CodeSnip. Windows Vista to Windows 10 with UAC prompts enabled will prompt for an admin password if From 70cd0a8a6551579ab5fddbc6036a7ca58b6a6766 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 28 May 2020 22:03:59 +0100 Subject: [PATCH 341/714] Overhauled README.md Major change to source code section plus some other, more minor changes. Added links to some referenced documents. --- README.md | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index b4d161653..fef54e5d7 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ A code bank designed with Pascal in mind. * [Support](#support) * [Source Code](#source-code) * [Change Log](#change-log) -* [CodeSnip 5 Development](#codesnip-5-development) -- **frozen** +* [License](#license) +* [Bug Reports and Features](#bug-reports-and-features) ## Overview @@ -21,41 +22,53 @@ CodeSnip requires Windows 2000 or later and Internet Explorer 6 or later, althou ## Installation -CodeSnip is installed and removed using a standard Windows installer. Administrator privileges are required for installation. +The standard edition of CodeSnip is installed and removed using a standard Windows installer. Administrator privileges are required for installation. + +The portable edition has no installer. Simply follow the instructions in the [read me file](https://github.com/delphidabbler/codesnip/blob/master/Docs/ReadMe.txt) that is included in the download zip file. ## Support -The following support is available for CodeSnip: +The following support is available CodeSnip users: * A comprehensive help file. * A [read-me file](https://raw.githubusercontent.com/delphidabbler/codesnip/master/Docs/ReadMe.txt) * that discusses installation, configuration, updating and known issues. -* An [FAQ](https://github.com/delphidabbler/codesnip-faq/blob/master/UsingCodeSnip.md) +* A [Using CodeSnip FAQ](https://github.com/delphidabbler/codesnip-faq/blob/master/UsingCodeSnip.md). * A [Blog](http://codesnip-app.blogspot.co.uk/). There's also plenty of info available on how to compile CodeSnip from source - see below. * These links take you to the most recent version of the documents -- they can change from release to release. - ## Source Code -Up to and including release 4.13.1 the project's source code was maintained in a Subversion repository on [SourceForge](https://sourceforge.net/p/codesnip/code/). The Subversion repo was converted to Git in October 2015 and imported to GitHub. All releases from v3.0.0 are marked by tags in the form `version-x.x.x` where `x.x.x` is the version number. +CodeSnip's source code is maintained in the [`delphidabbler/codesnip`](https://github.com/delphidabbler/codesnip) Git repository on GitHub†. + +[Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) methodology has been adopted, with the exception of some branches that have been used in abortive attempts to start work on CodeSnip 5. + +The following branches existed at the time when CodeSnip v4.16.0 was released: + +* `master`: Always reflects the state of the source code as of the latest release.‡ +* `develop`: Main development branch. The head of this branch contains the latest development code. +* `pagoda`: An abortive attempt at developing CodeSnip 5. Work on this branch has halted. It does not follow GitFlow methodology. ***Do not use this branch: it may be pruned.*** +* `pavilion`: Another attempt at working on CodeSnip 5. It branched off `pagoda` and it's future is uncertain. Again it does not follow GitFlow methodology. + +New features and most bug fixes are worked on in `feature/xxxx` branches locally. They are merged into `develop` as they are completed and the branches are deleted. -> Note that any branches that were created and deleted in the Subversion repo are missing from the Git history. So, for full details of the the project's history from v3.0.0 to v4.13.1 please refer to the old Subversion repo on SourceForge. +**Note** that the default branch on GitHub is `develop` rather than `master`. This is because that's where all the work takes place. If you want to see the state of play at the last release make sure to switch to `master`. -Following tag `version-4.13.1` the [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) methodology was adopted. The exception is the `pagoda` branch that sits outside Git Flow. This branch was originally planned to be the CodeSnip v5 development branch (see [below](#codesnip-5-development) for details). +> † Up to and including v4.13.1 the source code was kept in a Subversion repository on SourceForge. It was converted to Git in October 2015 and imported into GitHub. All releases from v3.0.0 are marked by tags in the form `version-x.x.x` where `x.x.x` is the version number. None of the Subversion branches made it through the conversion to Git, so to see a full history look at the old [SourceForge repository](https://sourceforge.net/p/codesnip/code/). -Up to and including release 4.13.1, `master` is simply a copy of the old Subversion `trunk` and, as such, contains various development commits along with numerous commits related to management of Subversion. After release 4.13.1, and the addition of this read-me file, `master` contains only commits relating to an actual release. +> ‡ All the converted Subversion code was committed to `master`, making it a copy of the old Subversion `trunk`. As such `master` contains various development commits along with numerous commits related to management of Subversion. After release 4.13.1, and the the first commit of this read-me file, `master` contains only commits relating to actual releases. ### Contributions -To contribute to the project please fork the repository on GitHub. Create a feature branch off the development branch. Make your changes to that branch then submit a pull request on GitHub. +To contribute to the project please fork the repository on GitHub. Create a feature branch off the `develop` branch. Make your changes to the feature branch then submit a pull request via GitHub. ### Compiling -`master` and each branch will have a file in the root directory named `Build.html` that gives detailed information about how to compile CodeSnip. +`master` has a file in the root directory named [`Build.html`](https://htmlpreview.github.io/?https://github.com/delphidabbler/codesnip/blob/master/Build.html) that gives detailed information about how to compile the current release of CodeSnip. -There is also an [FAQ](https://github.com/delphidabbler/codesnip-faq) -- (see [Support](#support) above). +There is also a [Compiling & Source Code FAQ](https://github.com/delphidabbler/codesnip-faq/blob/master/SourceCode.md). ## Change Log @@ -65,7 +78,7 @@ The program's current change log can be found in the file `CHANGELOG.md` in the ## License -The program's EULA, which gives full details of the license applying to the latest release, can be found in the file `Docs\License.html` in the `master` branch. The license has changed between releases, so if you need to see an older one, select the appropriate `version-x.x.x` tag and read the older version of the file. +The program's EULA, which gives full details of the license applying to the latest release, can be found in the file [`Docs\License.html`](https://htmlpreview.github.io/?https://github.com/delphidabbler/codesnip/blob/master/Docs/License.html) in the `master` branch. The license has changed between releases, so if you need to see an older one, select the appropriate `version-x.x.x` tag and read the older version of the file. Most of the original code is made available under the [Mozilla Public License v2](https://www.mozilla.org/MPL/2.0/). From 9a15dc1774e518a11c88247c4cc93878462e6332 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 28 May 2020 23:12:13 +0100 Subject: [PATCH 342/714] Added warning to use only Inno Setup v5, not v6 v6 fails to compile the setup script because it doesn't support compiling for Windows 2000 or XE. CodeSnip still targets these OSs --- Build.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Build.html b/Build.html index 79315fab2..425b6128f 100644 --- a/Build.html +++ b/Build.html @@ -222,8 +222,15 @@

    - The Unicode version of the Inno setup command line compiler is needed to - create CodeSnip's install program. v5.5.2(u) or later is required. + The Unicode version of the Inno Setup v5 command line + compiler is needed to create CodeSnip's install program. v5.5.2(u) or + later is required. +

    + +

    + Warning: Do not use Inno Setup v6. This will fail to compile + the setup script. Inno Setup 6 does not support Windows 2000 or XE, while + CodeSnip still does.

    From 67b769e9bedcf9ad7408ce91b5acb862ddca40e4 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 28 May 2020 23:32:27 +0100 Subject: [PATCH 343/714] Updated notes on compiling from the Delphi IDE --- Build.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Build.html b/Build.html index 425b6128f..35d54831c 100644 --- a/Build.html +++ b/Build.html @@ -229,7 +229,7 @@

    Warning: Do not use Inno Setup v6. This will fail to compile - the setup script. Inno Setup 6 does not support Windows 2000 or XE, while + the setup script. Inno Setup 6 does not support Windows 2000 or XE, while CodeSnip still does.

    @@ -290,10 +290,6 @@

    You do not need Zip if you do not intend to create release files.

    -

    - Note: You can use the Delphi IDE to edit the code and test compile it. However you will need to build the code from the makefile first to ensure all the required resource files and auto-generated files are present. If you change any resource files or type libraries you also need to re-run the makefile. Final builds should always be created using the makefile. -

    -

    Preparation @@ -545,6 +541,12 @@

    CodeSnip.exe. You can rename the file manually.

    +

    + After you have gone through these steps you can edit Pascal code and test + compile from the Delphi IDE. However if you change any files compiled into resources, or the type library, or run a clean up, then you must repeat the + above steps and do a complete build from the IDE. +

    +

    Note that building with the make file insted of the IDE performs all the above steps automatically. From 1b80b19c36713733756195ab3080394f0deb046d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 29 May 2020 01:02:22 +0100 Subject: [PATCH 344/714] Updated link to change log from "what's new in CodeSnip 4" help topic --- Src/Help/HTML/new.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Help/HTML/new.htm b/Src/Help/HTML/new.htm index aa15e25a5..035be814b 100644 --- a/Src/Help/HTML/new.htm +++ b/Src/Help/HTML/new.htm @@ -258,7 +258,7 @@

    For other features of v4 please read the change log for this release and all preceding v4 releases, including From 16574555ed22e6f28c33dca93282a2c8b523efe0 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 30 May 2020 15:12:44 +0100 Subject: [PATCH 345/714] Add new "What's New" dialogue box and supporting code. What's New uses an associated new frame class to host a new HTML document read from resources. The main CodeSnip project files and HTML resource compilation script were all updated as required. --- Src/CodeSnip.dpr | 2 + Src/CodeSnip.dproj | 8 +- Src/FirstRun.FmWhatsNew.FrHTML.dfm | 12 +++ Src/FirstRun.FmWhatsNew.FrHTML.pas | 104 +++++++++++++++++++++ Src/FirstRun.FmWhatsNew.dfm | 41 ++++++++ Src/FirstRun.FmWhatsNew.pas | 144 +++++++++++++++++++++++++++++ Src/HTML.hrc | 7 +- Src/Res/HTML/dlg-whatsnew.html | 87 +++++++++++++++++ 8 files changed, 403 insertions(+), 2 deletions(-) create mode 100644 Src/FirstRun.FmWhatsNew.FrHTML.dfm create mode 100644 Src/FirstRun.FmWhatsNew.FrHTML.pas create mode 100644 Src/FirstRun.FmWhatsNew.dfm create mode 100644 Src/FirstRun.FmWhatsNew.pas create mode 100644 Src/Res/HTML/dlg-whatsnew.html diff --git a/Src/CodeSnip.dpr b/Src/CodeSnip.dpr index 5a0069e9e..64bebc304 100644 --- a/Src/CodeSnip.dpr +++ b/Src/CodeSnip.dpr @@ -78,6 +78,8 @@ uses Favourites.UFavourites in 'Favourites.UFavourites.pas', Favourites.UPersist in 'Favourites.UPersist.pas', FirstRun.FmV4ConfigDlg in 'FirstRun.FmV4ConfigDlg.pas' {V4ConfigDlg}, + FirstRun.FmWhatsNew in 'FirstRun.FmWhatsNew.pas' {WhatsNewDlg}, + FirstRun.FmWhatsNew.FrHTML in 'FirstRun.FmWhatsNew.FrHTML.pas' {WhatsNewHTMLFrame: TFrame}, FirstRun.UConfigFile in 'FirstRun.UConfigFile.pas', FirstRun.UDatabase in 'FirstRun.UDatabase.pas', FirstRun.UIniFile in 'FirstRun.UIniFile.pas', diff --git a/Src/CodeSnip.dproj b/Src/CodeSnip.dproj index 4ff55c079..b2b923cf6 100644 --- a/Src/CodeSnip.dproj +++ b/Src/CodeSnip.dproj @@ -83,6 +83,13 @@ V4ConfigDlg + +

    WhatsNewDlg
    + + +
    WhatsNewHTMLFrame
    + TFrame +
    @@ -566,7 +573,6 @@ - Base diff --git a/Src/FirstRun.FmWhatsNew.FrHTML.dfm b/Src/FirstRun.FmWhatsNew.FrHTML.dfm new file mode 100644 index 000000000..c67d0ffdf --- /dev/null +++ b/Src/FirstRun.FmWhatsNew.FrHTML.dfm @@ -0,0 +1,12 @@ +inherited WhatsNewHTMLFrame: TWhatsNewHTMLFrame + inherited pnlBrowser: TPanel + inherited wbBrowser: TWebBrowser + ControlData = { + 4C000000A9200000641800000000000000000000000000000000000000000000 + 000000004C000000000000000000000001000000E0D057007335CF11AE690800 + 2B2E126208000000000000004C0000000114020000000000C000000000000046 + 8000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000100000000000000000000000000000000000000} + end + end +end diff --git a/Src/FirstRun.FmWhatsNew.FrHTML.pas b/Src/FirstRun.FmWhatsNew.FrHTML.pas new file mode 100644 index 000000000..ce0274836 --- /dev/null +++ b/Src/FirstRun.FmWhatsNew.FrHTML.pas @@ -0,0 +1,104 @@ +unit FirstRun.FmWhatsNew.FrHTML; + +interface + +uses + // VCL + OleCtrls, + SHDocVw, + Classes, + Controls, + ExtCtrls, + // Project + FrBrowserBase, + UCSSBuilder; + + +type + TWhatsNewHTMLFrame = class(TBrowserBaseFrame) + strict protected + procedure BuildCSS(const CSSBuilder: TCSSBuilder); override; + {Generates CSS classes specific to this frame. This CSS is added + to that provided by parent class. + @param CSSBuilder [in] Object used to build the CSS code. + } + public + constructor Create(AOwner: TComponent); override; + {Object constructor. Sets up frame and initialises web browser. + @param AOwner [in] Component that owns the frame (must be a form). + } + procedure Initialise(const HTML: string); + end; + + +implementation + + +uses + // VCL + Graphics, + // Project + Browser.UUIMgr, + UCSSUtils, + UFontHelper; + +{$R *.dfm} + + +{ TWhatsNewHTMLFrame } + +procedure TWhatsNewHTMLFrame.BuildCSS(const CSSBuilder: TCSSBuilder); +var + CSSFont: TFont; // font used to set CSS properties +begin + inherited; + CSSFont := TFont.Create; + try + TFontHelper.SetContentFont(CSSFont); + CSSFont.Size := CSSFont.Size + 2; + with CSSBuilder.AddSelector('body') do + begin + AddProperty(TCSS.FontProps(CSSFont)); + AddProperty(TCSS.MarginProp(0, 8, 0, 8)); + end; + with CSSBuilder.AddSelector('.lead') do + begin + AddProperty(TCSS.FontSizeProp(CSSFont.Size + 2)); + AddProperty(TCSS.FontWeightProp(cfwBold)); + AddProperty(TCSS.ColorProp($233bc2)); + end; + // Sets paragraph margins and padding + with CSSBuilder.AddSelector('p') do + begin + AddProperty(TCSS.MarginProp(cssTop, 6)); + AddProperty(TCSS.MarginProp(cssBottom, 0)); + AddProperty(TCSS.PaddingProp(0)); + end; + with CSSBuilder.AddSelector('ul') do + begin + AddProperty(TCSS.MarginProp(cssTop, 6)); + AddProperty(TCSS.MarginProp(cssBottom, 0)); + AddProperty(TCSS.PaddingProp(0)); + end; + with CSSBuilder.AddSelector('li') do + begin + AddProperty(TCSS.MarginProp(cssTop, 6)); + end; + finally + CSSFont.Free; + end; +end; + +constructor TWhatsNewHTMLFrame.Create(AOwner: TComponent); +begin + inherited; + WBController.UIMgr.ScrollbarStyle := sbsNormal; + WBController.UIMgr.AllowTextSelection := False; +end; + +procedure TWhatsNewHTMLFrame.Initialise(const HTML: string); +begin + WBController.IOMgr.LoadFromString(HTML); +end; + +end. diff --git a/Src/FirstRun.FmWhatsNew.dfm b/Src/FirstRun.FmWhatsNew.dfm new file mode 100644 index 000000000..47dd35480 --- /dev/null +++ b/Src/FirstRun.FmWhatsNew.dfm @@ -0,0 +1,41 @@ +inherited WhatsNewDlg: TWhatsNewDlg + Caption = 'What'#39's New' + ExplicitWidth = 474 + ExplicitHeight = 375 + PixelsPerInch = 96 + TextHeight = 13 + inherited pnlBody: TPanel + inline frmHTML: TWhatsNewHTMLFrame + Left = 0 + Top = 0 + Width = 377 + Height = 281 + Align = alClient + TabOrder = 0 + TabStop = True + ExplicitWidth = 377 + ExplicitHeight = 281 + inherited pnlBrowser: TPanel + Width = 377 + Height = 281 + ExplicitWidth = 377 + ExplicitHeight = 281 + inherited wbBrowser: TWebBrowser + Width = 377 + Height = 281 + ExplicitWidth = 377 + ExplicitHeight = 281 + ControlData = { + 4C000000F72600000B1D00000000000000000000000000000000000000000000 + 000000004C000000000000000000000001000000E0D057007335CF11AE690800 + 2B2E126208000000000000004C0000000114020000000000C000000000000046 + 8000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000100000000000000000000000000000000000000} + end + end + end + end + inherited btnHelp: TButton + Visible = False + end +end diff --git a/Src/FirstRun.FmWhatsNew.pas b/Src/FirstRun.FmWhatsNew.pas new file mode 100644 index 000000000..495ca9fee --- /dev/null +++ b/Src/FirstRun.FmWhatsNew.pas @@ -0,0 +1,144 @@ +{ + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at http://mozilla.org/MPL/2.0/ + * + * Copyright (C) 2020, Peter Johnson (gravatar.com/delphidabbler). + * + * Implements dialogue box that may be displayed the first time CodeSnip 4.x.x + * is run after an update. The dialogue box displays a HTML page that draws + * attention to key changes in the updated version of CodeSnip. +} + + +unit FirstRun.FmWhatsNew; + +interface + + +uses + // VCL + Controls, + Forms, + StdCtrls, + ExtCtrls, + Classes, + // Project + FirstRun.FmWhatsNew.FrHTML, + FmGenericViewDlg, + FrBrowserBase, + IntfAligner, + UBaseObjects; + + +type + /// Dialogue box that may be displayed the first time CodeSnip 4.x.x + /// is run after an update. The dialogue box displays a HTML page that draws + /// attention to key changes in the updated version of CodeSnip. + TWhatsNewDlg = class(TGenericViewDlg, INoPublicConstruct) + frmHTML: TWhatsNewHTMLFrame; + strict private + type + /// Custom form aligner class for wizard. + TAligner = class(TInterfacedObject, IFormAligner) + public + /// Aligns dialogue box at centre of primary monitor. + /// + procedure AlignForm(const AForm: TCustomForm); + end; + strict protected + /// Returns instance of form aligner object. + function GetAligner: IFormAligner; override; + /// Sets form caption and loads HTML to be displayed from + /// resources. + procedure ConfigForm; override; + /// Sets size of the HTML section of the display and aranges other + /// controls around that. + procedure ArrangeForm; override; + /// Modifies window creation parameters to ensure the dialgue box + /// displays a button in the task bar. + /// This is necessary because the dialogue box is displayed before + /// CodeSnip's main window is shown, so there is no suitable button + /// displayed yet. + procedure CreateParams(var Params: TCreateParams); override; + public + /// Displays dialogue box with given owner. + class procedure Execute(AOwner: TComponent); + end; + + +implementation + + +uses + // VCL + SysUtils, + Math, + Windows, + // Project + UAppInfo, + UConsts, + UEncodings, + UResourceUtils, + UStructs; + +{$R *.dfm} + + +{ TWhatsNewDlg } + +procedure TWhatsNewDlg.ArrangeForm; +const + cBodyWidth = 500; + cBodyHeight = 450; +begin + pnlBody.Width := cBodyWidth; + pnlBody.Height := cBodyHeight; + inherited; +end; + +procedure TWhatsNewDlg.ConfigForm; +resourcestring + sDlgTitle = 'Welcome to CodeSnip v%s'; +begin + Caption := Format(sDlgTitle, [TAppInfo.ProgramReleaseVersion]); + frmHTML.Initialise( + LoadResourceAsString(HInstance, 'dlg-whatsnew.html', RT_HTML, etUTF8) + ); +end; + +procedure TWhatsNewDlg.CreateParams(var Params: TCreateParams); +begin + inherited; + Params.ExStyle := Params.ExStyle OR WS_EX_APPWINDOW; +end; + +class procedure TWhatsNewDlg.Execute(AOwner: TComponent); +begin + with InternalCreate(AOwner) do + try + ShowModal; + finally + Free; + end; +end; + +function TWhatsNewDlg.GetAligner: IFormAligner; +begin + Result := TAligner.Create; +end; + +{ TWhatsNewDlg.TAligner } + +procedure TWhatsNewDlg.TAligner.AlignForm(const AForm: TCustomForm); +var + WorkArea: TRectEx; +begin + // This form is designed for display centred on desktop, so assume it fits + WorkArea := Screen.WorkAreaRect; + AForm.Left := WorkArea.Left + (WorkArea.Width - AForm.Width) div 2; + AForm.Top := WorkArea.Top + (WorkArea.Height - AForm.Height) div 2; +end; + +end. + diff --git a/Src/HTML.hrc b/Src/HTML.hrc index 61611458f..30fd18809 100644 --- a/Src/HTML.hrc +++ b/Src/HTML.hrc @@ -25,7 +25,7 @@ Res\Scripts\3rdParty\jquery.cycle.lite.js # compiler error log Res\HTML\dlg-comperror-tplt.html -# active text preview dialogueue +# active text preview dialogue Res\HTML\dlg-activetext-preview-tplt.html # news dialogue @@ -40,6 +40,11 @@ Res\HTML\dlg-dbupdate-intro-tplt.html Res\HTML\dlg-dbupdate-load.html Res\HTML\dlg-dbupdate-finish.html +# what's new dialogue +# ------------------- +Res\HTML\dlg-whatsnew.html + + # Detail pane pages, scripts and CSS # ================================== diff --git a/Src/Res/HTML/dlg-whatsnew.html b/Src/Res/HTML/dlg-whatsnew.html new file mode 100644 index 000000000..ed590adf3 --- /dev/null +++ b/Src/Res/HTML/dlg-whatsnew.html @@ -0,0 +1,87 @@ + + + + + + + + + + What's New + + + + + +

    + Important information about CodeSnip v4.16.0 +

    +

    + There are several important differences from your old version of CodeSnip that you need to know about. +

    +

    + Please read carefully because this dialogue box will not appear again. +

    +

    + Before v4.16.0, CodeSnip depended for some of its functionality on web services that have now been closed down. +

    +

    + The main purpose of CodeSnip v4.16.0 was to remove the program's dependency on the defunct web services. This was done by removing some features and providing alternatives to others. +

    +

    + The main changes are: +

    +
      +
    • + You can no longer check for new releases of CodeSnip or the main DelphiDabbler Code Snippets Database from within the program. The automatic update checker has been removed along with the menu option to check for program updates manually. +
    • +
    • + The DelphiDabbler Code Snippets database can no longer be updated directly from the web. You now have to download the database youself and install it from disk. + More info. +
    • +
    • + Similarly the SWAG collection must be downloaded manually before you can import snippets from it. More Info. +
    • +
    • + CodeSnip can no longer be registered. +
    • +
    • + You can no longer submit snippets for inclusion in the DelphiDabbler Code Snippets Database. +
    • +
    • + The news feed has gone away. News will now be posted to the + CodeSnip blog. You can display the blog in your web browser from the Help menu. +
    • +
    +

    + There are other changes to this version of CodeSnip that you can read about in the program's change log. However the ones above are the major departures from how CodeSnip used to work. +

    + + + From 057b4162ba6f5a51d206d111c8e6525c37b6f396 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 30 May 2020 15:14:56 +0100 Subject: [PATCH 346/714] Add start-up code to determine if What's New dialogue is required. Some additional version information code was added to enable testing if a version number falls within a desired range. --- Src/FirstRun.UConfigFile.pas | 25 +++++++++++++++++++- Src/FirstRun.UMain.pas | 46 +++++++++++++++++++++++++++++++----- Src/UVersionInfo.pas | 32 +++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 7 deletions(-) diff --git a/Src/FirstRun.UConfigFile.pas b/Src/FirstRun.UConfigFile.pas index edd04b4fe..f2cfaa832 100644 --- a/Src/FirstRun.UConfigFile.pas +++ b/Src/FirstRun.UConfigFile.pas @@ -16,6 +16,11 @@ interface +uses + // Project + UVersionInfo; + + type /// Class that manages the updating of older config files to the /// current format. Missing files will also be created. @@ -60,6 +65,9 @@ TConfigFileUpdater = class abstract(TObject) /// Checks if program version in config file is same as current /// program version. function IsCurrentProgramVer: Boolean; overload; + class function PreviousProgramVer(const CfgFileName: string): + TVersionNumber; overload; + function PreviousProgramVer: TVersionNumber; overload; /// Stamps config file with current file version. procedure Stamp; virtual; end; @@ -234,10 +242,25 @@ class function TConfigFileUpdater.IsCurrentProgramVer( var CfgProgVer: string; // program version from config file begin - CfgProgVer := GetIniString('IniFile', 'ProgramVersion', '', CfgFileName); + CfgProgVer := PreviousProgramVer(CfgFileName); Result := CfgProgVer = TAppInfo.ProgramReleaseVersion; end; +function TConfigFileUpdater.PreviousProgramVer: TVersionNumber; +begin + Result := PreviousProgramVer(fCfgFileName); +end; + +class function TConfigFileUpdater.PreviousProgramVer( + const CfgFileName: string): TVersionNumber; +begin + if not TVersionNumber.TryStrToVersionNumber( + GetIniString('IniFile', 'ProgramVersion', '', CfgFileName), + Result + ) then + Exit(TVersionNumber.Nul); +end; + procedure TConfigFileUpdater.Stamp; begin if not TFile.Exists(fCfgFileName, False) then diff --git a/Src/FirstRun.UMain.pas b/Src/FirstRun.UMain.pas index 39969321e..ba154a241 100644 --- a/Src/FirstRun.UMain.pas +++ b/Src/FirstRun.UMain.pas @@ -19,7 +19,7 @@ interface uses // Project - FirstRun.UConfigFile, FirstRun.UDatabase, FirstRun.UInstallInfo; + FirstRun.UConfigFile, FirstRun.UDatabase, FirstRun.UInstallInfo, UVersionInfo; type @@ -79,8 +79,17 @@ TFirstRun = class(TObject) /// Creates a new, empty, Unicode encoded per-user config file for /// current installation. procedure CreateEmptyUserCfgFile; - /// + /// Checks if the program has been updated since the last run. + /// + /// Compares the version number stored in the brought forward + /// config file against the current program version number from resources. + /// function IsProgramUpdated: Boolean; + /// Checks if the previous program's version number, as specified + /// in the user config file, is contained in the range Lo..Hi with range + /// endpoints determined by IntervalEndPoints. + function IsPreviousProgramVerInRange(const Lo, Hi: TVersionNumber; + const IntervalEndPoints: TVersionNumber.TIntervalEndPoints): Boolean; end; type @@ -108,7 +117,8 @@ TFirstRunMgr = class(TObject) class function IsProgramUpdated: Boolean; public /// Runs start-up checks to detect if program has been run before - /// and performs any required user config and user database updates. + /// and performs any required user config and user database updates. In + /// some circumstances a "what's new" dialogue box may be displayed. /// class procedure Execute; end; @@ -119,9 +129,10 @@ implementation uses // Delphi - SysUtils, IOUtils, Forms - {$IFNDEF PORTABLE} + SysUtils, IOUtils, Forms, // Project + FirstRun.FmWhatsNew + {$IFNDEF PORTABLE} , FirstRun.FmV4ConfigDlg; {$ELSE} @@ -187,6 +198,15 @@ function TFirstRun.HaveOldUserDB: Boolean; Result := TFile.Exists(fInstallInfo.PreviousUserDatabaseFileName, False); end; +function TFirstRun.IsPreviousProgramVerInRange(const Lo, Hi: TVersionNumber; + const IntervalEndPoints: TVersionNumber.TIntervalEndPoints): Boolean; +var + PrevProgVer: TVersionNumber; +begin + PrevProgVer := fUserConfigFile.PreviousProgramVer; + Result := PrevProgVer.IsInRange(Lo, Hi, IntervalEndPoints); +end; + function TFirstRun.IsProgramUpdated: Boolean; begin Result := fUserConfigFile.IsCurrentProgramVer; @@ -270,6 +290,12 @@ procedure TFirstRun.UpdateUserCfgFile(out Changes: TFirstRunCfgChangeSet); { TFirstRunMgr } class procedure TFirstRunMgr.Execute; +const + // Version numbers specifying a range in which previous program version must + // lie in order to display "What's New" dialogue box. + // Range is [NeedWhatsNewLoVerIncl, NeedWhatsNewHiVerExcl) + NeedWhatsNewLoVerIncl: TVersionNumber = (V1: 4; V2: 0; V3: 0; V4: 0); + NeedWhatsNewHiVerExcl: TVersionNumber = (V1: 4; V2: 16; V3: 0; V4: 0); var FR: TFirstRun; Changes: TFirstRunCfgChangeSet; @@ -295,7 +321,15 @@ class procedure TFirstRunMgr.Execute; begin FR := TFirstRun.Create; try - FR.UpdateUserCfgFile(Changes); + // We display "What's New" dialogue box if previous program version number + // is in the given range + if FR.IsPreviousProgramVerInRange( + NeedWhatsNewLoVerIncl, + NeedWhatsNewHiVerExcl, + TVersionNumber.TIntervalEndPoints.iepHalfOpenHi + ) then + TWhatsNewDlg.Execute(Application); + FR.UpdateUserCfgFile(Changes); // we ignore Changes [out] param value finally FR.Free; end; diff --git a/Src/UVersionInfo.pas b/Src/UVersionInfo.pas index d53b5a42a..6a30745c1 100644 --- a/Src/UVersionInfo.pas +++ b/Src/UVersionInfo.pas @@ -33,6 +33,17 @@ TVersionNumber = record strict private /// Converts version number to a string. function ToString: string; + public + type + /// Enumeration that specifies whether intervals used in range + /// checks are open, closed or half-open. + /// + /// iepOpen - open interval (x,y) + /// iepHalfOpenLo - half open interval (x,y] + /// iepHalfOpenHi - half open interval [x,y) + /// iepClosed - closed interval [x,y] + /// + TIntervalEndPoints = (iepOpen, iepHalfOpenLo, iepHalfOpenHi, iepClosed); public V1: Word; // Major version number V2: Word; // Minor version number @@ -45,6 +56,13 @@ TVersionNumber = record {Creates a nul version number with all fields set to zero. @return Required nul record. } + /// Checks if the current version number is contained in the range + /// Lo..Hi with range endpoints determined by EndPoints. + /// Note that when Lo=Hi the intervals (Lo,Hi), (Lo,Hi] and + /// [Lo,Hi) represent the empty set, while [Lo,Hi] = {Lo}. When Lo > Hi + /// all interval types represent the empty set. + function IsInRange(const Lo, Hi: TVersionNumber; + const EndPoints: TIntervalEndPoints): Boolean; /// Attempts to convert a string to a version number. /// string [in] String to convert. /// Word [out] Converted version number. @@ -170,6 +188,7 @@ implementation // Delphi SysUtils, // Project + UExceptions, UIStringList, UUtils; @@ -318,6 +337,19 @@ class function TVersionInfo.SpecialBuildStr: string; raise EConvertError.CreateFmt(sError, [Str]); end; +function TVersionNumber.IsInRange(const Lo, Hi: TVersionNumber; + const EndPoints: TIntervalEndPoints): Boolean; +begin + case EndPoints of + iepOpen: Result := (Lo < Self) and (Self < Hi); + iepHalfOpenLo: Result := (Lo < Self) and (Self <= Hi); + iepHalfOpenHi: Result := (Lo <= Self) and (Self < Hi); + iepClosed: Result := (Lo <= Self) and (Self <= Hi); + else + raise EBug.Create('TVersionNumber.IsInRange: invalid Kind parameter'); + end; +end; + function TVersionNumber.IsNull: Boolean; begin Result := Self = TVersionNumber.Nul; From 31e3a2a9106c0f82850fedaec1d0bc0e1f1393ac Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 30 May 2020 15:32:44 +0100 Subject: [PATCH 347/714] Force first run config dialogue to display task button. Adding WS_EX_APPWINDOW` flag to window creation params enabled the task bar button to be displayed. The reason for this is that the dialogue is displayed before the main CodeSnip window, so the is no CodeSnip task bar button displayed yet. This forces a task b --- Src/FirstRun.FmV4ConfigDlg.pas | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Src/FirstRun.FmV4ConfigDlg.pas b/Src/FirstRun.FmV4ConfigDlg.pas index 505bf8a03..4baa0bab2 100644 --- a/Src/FirstRun.FmV4ConfigDlg.pas +++ b/Src/FirstRun.FmV4ConfigDlg.pas @@ -114,6 +114,12 @@ TAligner = class(TInterfacedObject, IFormAligner) procedure AlignForm(const AForm: TCustomForm); end; strict protected + /// Modifies window creation parameters to ensure the dialgue box + /// displays a button in the task bar. + /// This is necessary because the dialogue box is displayed before + /// CodeSnip's main window is shown, so there is no suitable button + /// displayed yet. + procedure CreateParams(var Params: TCreateParams); override; /// Returns instance of form aligner object. function GetAligner: IFormAligner; override; /// Arranges controls within each tab sheet. @@ -159,6 +165,8 @@ implementation uses + // VCL + Windows, // Project UConsts, UCtrlArranger, UMessageBox, UStructs; @@ -268,6 +276,12 @@ procedure TV4ConfigDlg.CreateBulletPage(TS: TTabSheet; end; end; +procedure TV4ConfigDlg.CreateParams(var Params: TCreateParams); +begin + inherited; + Params.ExStyle := Params.ExStyle OR WS_EX_APPWINDOW; +end; + function TV4ConfigDlg.DatabaseAvailable: Boolean; begin Result := fFirstRun.HaveOldUserDB; From 89320022cf519ae5a644d723b17271a1e7199c70 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 30 May 2020 15:50:07 +0100 Subject: [PATCH 348/714] Remove unused CSS class --- Src/Res/CSS/detail.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Src/Res/CSS/detail.css b/Src/Res/CSS/detail.css index 031cb2a7d..725200e82 100644 --- a/Src/Res/CSS/detail.css +++ b/Src/Res/CSS/detail.css @@ -107,10 +107,6 @@ pre { background-color: #FCD9F3; } -#auto-updates .caption { - background-color: #FFDFAF; -} - #help .caption { background-color: #D3FFB6; } From 999eff378360610f555ff876f346d53a3c56773c Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 30 May 2020 15:58:21 +0100 Subject: [PATCH 349/714] Remove leftover TODO & add comment to TDBUpdateDlg class. --- Src/FmDBUpdateDlg.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Src/FmDBUpdateDlg.pas b/Src/FmDBUpdateDlg.pas index b22a87f3e..6dc03f72f 100644 --- a/Src/FmDBUpdateDlg.pas +++ b/Src/FmDBUpdateDlg.pas @@ -12,10 +12,10 @@ unit FmDBUpdateDlg; -// TODO -cHelp: Make help button visible once help topic is created. interface + uses // Project SysUtils, @@ -41,6 +41,8 @@ interface UDBUpdateMgr; type + /// Wizard dialogue box that handles the updating of the main + /// DelphiDabbler Code Snippets database from disk. TDBUpdateDlg = class(TWizardDlg, INoPublicConstruct) tsIntro: TTabSheet; tsFolder: TTabSheet; From d07ac8f63e8f0dae561f865d1ff72eafb5f44059 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 30 May 2020 16:04:50 +0100 Subject: [PATCH 350/714] Update version numbers to 4.16.0 build 257 and removed [dev] text. --- Src/VCodeSnip.vi | 8 ++++---- Src/VCodeSnipPortable.vi | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Src/VCodeSnip.vi b/Src/VCodeSnip.vi index 810957539..c8bfe4aaf 100644 --- a/Src/VCodeSnip.vi +++ b/Src/VCodeSnip.vi @@ -8,8 +8,8 @@ [Fixed File Info] -File Version #=4, 15, 1, 256 -Product Version #=4, 15, 1, 0 +File Version #=4, 16, 0, 257 +Product Version #=4, 16, 0, 0 File OS=4 File Type=1 File Sub-Type=0 @@ -24,14 +24,14 @@ Character Set=1252 Comments=Released under the terms of the Mozilla Public License v2.0 (http://www.mozilla.org/MPL/2.0/) Company Name=DelphiDabbler File Description=CodeSnip Database Viewer -File Version=<#F1>.<#F2>.<#F3> build <#F4>-[**dev**] +File Version=<#F1>.<#F2>.<#F3> build <#F4> Internal Name= Legal Copyright=Copyright � P.D.Johnson, 2005-. Legal Trademark= Original File Name=CodeSnip.exe Private Build= Product Name=DelphiDabbler CodeSnip -Product Version=Release <#P1>.<#P2>.<#P3>-[**dev**] +Product Version=Release <#P1>.<#P2>.<#P3> Special Build= [Configuration Details] diff --git a/Src/VCodeSnipPortable.vi b/Src/VCodeSnipPortable.vi index f8992f57e..a9ca41177 100644 --- a/Src/VCodeSnipPortable.vi +++ b/Src/VCodeSnipPortable.vi @@ -8,8 +8,8 @@ [Fixed File Info] -File Version #=4, 15, 1, 256 -Product Version #=4, 15, 1, 0 +File Version #=4, 16, 0, 257 +Product Version #=4, 16, 0, 0 File OS=4 File Type=1 File Sub-Type=0 @@ -24,14 +24,14 @@ Character Set=1252 Comments=Released under the terms of the Mozilla Public License v2.0 (http://www.mozilla.org/MPL/2.0/) Company Name=DelphiDabbler File Description=CodeSnip Database Viewer (Portable Edition) -File Version=<#F1>.<#F2>.<#F3> build <#F4>-[**dev**] +File Version=<#F1>.<#F2>.<#F3> build <#F4> Internal Name= Legal Copyright=Copyright � P.D.Johnson, 2005-. Legal Trademark= Original File Name=CodeSnip-p.exe Private Build= Product Name=DelphiDabbler CodeSnip -Product Version=Release <#P1>.<#P2>.<#P3>-[**dev**] +Product Version=Release <#P1>.<#P2>.<#P3> Special Build=Portable [Configuration Details] From 028a3e8e43a5abbfcb49e280c3c6b9330c936d36 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 30 May 2020 16:06:22 +0100 Subject: [PATCH 351/714] Remove global TODO re bumping version number --- Src/CodeSnip.todo | 1 - 1 file changed, 1 deletion(-) diff --git a/Src/CodeSnip.todo b/Src/CodeSnip.todo index 0212d37f5..e69de29bb 100644 --- a/Src/CodeSnip.todo +++ b/Src/CodeSnip.todo @@ -1 +0,0 @@ -{TODO -cPreRelease : Remove -[**dev**] from product and file versions in .vi files before bumping release number} From e9fb804c92f0b2ad5d8d8da8c3276c630ca49cb3 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 31 May 2020 04:22:39 +0100 Subject: [PATCH 352/714] Fixes and tweaks to prior releases in change log. --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be1f28277..9d390f51a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -389,7 +389,7 @@ _Internal CodeSnip version 4.0.1.212_ + Fixed bug #3578652 ~~(http://bit.ly/RXIwBC)~~: "Pre-processor directive errors in main db ini files" by removing support for problematic directives. + Rolling mouse over links in detail pane no longer displays a hint in the status bar. This change fixes bug #3577407 ~~(http://bit.ly/VeSVGg)~~: Clicking detail pane snippet link leaves hint in status bar. + Windows no longer scale automatically when screen DPI differs from that on design system. This fixes bugs #3591818 ~~(http://bit.ly/TvNaUL)~~ "Strange window behaviour in Windows 7" and bug #3591820 ~~(http://bit.ly/SEH6dO)~~ "Incorrect font size used for some bold text". -+ Update operating system detection code to detect W0ndows 8 & 2012 server. ++ Update operating system detection code to detect Windows 8 & 2012 server. + Some refactoring and some redundant code removed. + Updated documentation. + Updated help topic that describes main display. @@ -526,7 +526,7 @@ _Internal CodeSnip version 3.99.1_ - Added controls to "Display" tab to set main and user database heading colours. - Changes that affect appearance of content of details pane are now reflected in the display as soon as the Preferences dialogue box closes, rather than on program restart. + Changes to REML mark-up handling: - - Any REML text not embedded in block level tags is now automatically wrapped in

    tags. + - Any REML text not embedded in block level tags is now automatically wrapped in `

    `...`

    ` tags. - Nested REML block level tags are no longer allowed. - Changed handling of multiple spaces in REML code to be the same as in HTML. - Formatting of REML code improved when re-displayed. @@ -635,7 +635,7 @@ _Internal CodeSnip version 3.98.1_ + Improved Delphi code syntax highlighter: - Recognises Delphi 2010 keywords - Correctly handles context sensitive directives within "property", "exports" and "external" statements. - - Recognises '&' prefix that causes keywords to be treated as identifiers. + - Recognises `&` prefix that causes keywords to be treated as identifiers. + Compiler search paths can now be specified for included units permitting non-VCL units to be used by snippets. + Database: - Non-empty categories can no longer be deleted. @@ -714,7 +714,7 @@ _Internal CodeSnip version 3.98.1_ + Fixed bug #3578654 ~~(http://bit.ly/T7fTxu)~~: "Pre-processor directive errors in main db ini files" by removing support for problematic directives. + Hints are no longer displayed in status bar when user rolls mouse over a link in the display pane. This fixes bug #3577408 ~~(http://bit.ly/WEzZGg)~~: "Clicking detail pane snippet link leaves hint in status bar". + Windows no longer scale automatically when screen DPI differs from that on design system. This fixes bugs #3591818 ~~(http://bit.ly/TvNaUL)~~ "Strange window behaviour in Windows 7" and bug #3591820 ~~(http://bit.ly/SEH6dO)~~ "Incorrect font size used for some bold text". -+ Updated operating system detection code to detect W0ndows 8 & 2012 server. ++ Updated operating system detection code to detect Windows 8 & 2012 server. + Updated documentation From 67cba83d158600e4069eab7b8af9ce41ae0b3164 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 31 May 2020 10:22:52 +0100 Subject: [PATCH 353/714] Edited change log introduction --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d390f51a..a0693cb7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,9 @@ This is the change log for _DelphiDabbler CodeSnip_. All notable changes to this project are documented in this file. -This change log begins with the first ever pre-release version of _CodeSnip_. Releases are sequential in reverse version number order. +This change log begins with the first ever pre-release version of _CodeSnip_. Releases are listed in reverse version number order. -> Note that _CodeSnip_ v4 was developed in parallel with v3 for a while. As a consequence some later v3 releases have later release dates than early v4 releases. +> 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. From v4.1.0 the version numbering has attempted to adhere to the principles of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). From eac173e9967540c35a04528a138c3c25e8efc172 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 31 May 2020 14:56:09 +0100 Subject: [PATCH 354/714] Update change log with details of changes in v4.16.0 --- CHANGELOG.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0693cb7d..9324b3b10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,72 @@ This change log begins with the first ever pre-release version of _CodeSnip_. Re From v4.1.0 the version numbering has attempted to adhere to the principles of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Release v4.16.0 of 31 May 2020 + +This is a significant update. It's purpose is to remove CodeSnip's dependencies on the delphidabbler.com website and associated web services. This was done because of the expected June 2020 closure or reduced functionality of delphidabbler.com. Some affected features were removed and others replaced with alternatives. + ++ Removed all dependencies on web services. The following changes were made as a consequence of this: + - Replaced the option to update the main DelphiDabbler Code Snippets database from the web with an option to update it from locally stored data: + - Replaced the _Update from Web_ dialogue box with a new wizard. Menu options on the _Snippets_ menu were renamed accordingly and the old tool bar button was removed. + - Changed the database update code to use data that has been manually downloaded from the `delphidabbler/code-snippets` GitHub project. + - Modified the database reading code to accept both the new Code Snippets database v2 format _and_ the legacy v1 format. + + Replaced the option to import SWAG snippets from an on-line REST service with an option to import snippets from locally stored data. + - Revised the SWAG import wizard re the changes to the import method. + - Modified the SWAG import code to use data that has been manually downloaded from the `delphidabbler/swag` GitHub project. + - The option to register the program was removed. No registration key is now generated or stored. + - Replaced the option to read and display the CodeSnip RSS news feed with one to display the CodeSnip Blog. + - Removed the menu option used to check for program updates. + - Removed the background task that automatically checked for program and database updates. + - Removed the option to submit snippets for addition to the DelphiDabbler Code Snippets database. + - Removed support for a proxy web server - now unnecessary. + - Removed support for the `--test-server` command line option that enabled use of a different server to test web services. ++ Removed references and links to delphidabbler.com from the program, the installer, the help file and documentation. Some references were deleted while others were replaced with alternatives, including: + - Changed the URL of the FAQs to refer to the `codesnip-faq` GitHub project. + - References to swag.delphidabbler.com were replaced with references to the `delphidabbler/swag` project on GitHub. + - URLs that were redirected via a service on delphidabbler.com were replaced by hard coded URLs. ++ The export file format was changed to exclude personal user information. The original format can still be read but any user information is ignored and discarded. ++ Config file processing changes: + - Removed support for reading or writing data relating to removed features. + - When CodeSnip is first run after updating from an earlier version, any pre-existing config files are purged of any information that is no longer relevant. + - The common config file is no longer used by the portable edition. Any pre-existing file is deleted the first time the portable edition is run. + - The common and per-user config file versions were bumped to 7 and 16 respectively. ++ Welcome page changes: + - Removed the _Update Checks_ and _Donate_ sections and related links. + - Removed links used to check for program and database updates. + - Replaced the link used to display the news feed with one that displays the CodeSnip blog. ++ Added a "What's New" type of dialogue box that can be selectively displayed when a new version of CodeSnip is run for the first time. v4.16.0 _always_ displays the dialogue box when first run. ++ The operating system detection code was updated to correctly detect all Windows and Windows Server releases as of March 2020. ++ Revised the _About_ dialogue box: + - To display version and licensing information extracted from Code Snippets Database v2 meta data. + - To remove credits for 3rd party code that is no longer used. ++ The bug tracker dialogue boxes were updated re the change of issue tracker from SourceForge to GitHub. ++ Removed redundant pages and controls from the _Preferences_ dialogue box. ++ Removed the _Donate_ dialogue box and associated menu options. ++ Revised and re-ordered some menu options. ++ The program no longer generates and saves an application identifier key. ++ Bugs fixed: + - Corrected license information stored in the _Extra_ information section of imported SWAG packages. + - Fixed a text formatting error in the SWAG import wizard ([issue #4](https://github.com/delphidabbler/codesnip/issues/4)). + - Fixed broken help topic links in some dialogue boxes ([issue #3](https://github.com/delphidabbler/codesnip/issues/3)) + - Fixed a bug in the portable edition's startup processing of its config file. + - Fixed the dialogue box displayed when updating from CodeSnip v3 or earlier to display an icon in the Windows task bar. + - Corrected the license details included in comments of generated source code that includes snippets from the main database. + - Corrected typos and errors in the UI. ++ Some source code refactoring and clarifications. ++ Removed redundant library code: + - Encryption library. + - Indy Internet components. ++ Help file overhauled: new topics added, redundant topics removed and many errors corrected. Some restyling. ++ Updated documentation, including: + - Major changes to `./README.md` and `./Docs/ReadMe.txt`. + - Merged all the major version specific changelogs into a single `./CHANGELOG.md` file and deleted the old files. + - File format documentation was overhauled re changes introduced in this release. + - Edited `./Docs/License.html` to remove license information and acknowledgements for 3rd party code that is no longer used. + - Fixed errors in `./Build.html` concerning the source code repository and made some other minor changes. + - Removed the privacy statement document, `./Docs/Privacy.txt` since CodeSnip no longer stores or transmits any personal information. (Also removed privacy help topic and menu item.) + - Removed `./Docs/Design/WebServices.txt` file that described the web services used by CodeSnip. + + ## Release v4.15.1 of 22 September 2016 + Updated OS detection code to detect Windows 10 Version 1607 (Anniversary update) and all technical previews of Windows 2016 Server to date. From 4749a9e4df15be9b5185802bd600b36b3acfb7e4 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 31 May 2020 15:18:59 +0100 Subject: [PATCH 355/714] Fix error in install program UI: caught at last minute!! The install program was displaying a page saying CodeSnip would automatically check online for updates, which it now won't --- Src/Install/Assets/AutoUpdateChecks.rtf | Bin 936 -> 0 bytes Src/Install/CodeSnip.iss | 1 - Src/Install/EventHandlers.ps | Bin 7983 -> 7085 bytes 3 files changed, 1 deletion(-) delete mode 100644 Src/Install/Assets/AutoUpdateChecks.rtf diff --git a/Src/Install/Assets/AutoUpdateChecks.rtf b/Src/Install/Assets/AutoUpdateChecks.rtf deleted file mode 100644 index 61112043e32830d61b3d8d9d41020b51b5bb5773..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 936 zcmZ8gON-ku5bk+l|HIt+fDLxCp)GsrnPr_RC_2w%+cyrXlC5vI-vFR_~vUOHt$y^rJG4C(mr$ke{~3*$y+4 zRPZ5t3=ik??ai}!V_J%oQBsDl?1UOGu;1L*o2@?kx_UU9lc(wEV{>mtTbluMV;Jjt zX9C8yu6Db%SN#qiJI@elf)i!-DME5!JbX$GeUE-Hz5_LW;ph0!d&yvPW>r z0pkpKLLcxD2*#m7Auc7-5ezxC8GF#W3n~=YfrQ~RssqSWdTdrAOQ#O?JOYAKT1+;@ zh5=P*{tr@lJD*vA1+%)KL>h28^&q}qIIi!GGNGfqDL&lZd?bq_Q_(3!`++(&>Q2et zu~lQWl@)*TGQ*t4Tzb%iYCw-OG@gf`Z-fbR^sxo*QkI}Q3%_gU7HVonhXTk)E|A3< z^&|=mlzUCPxL%C>*DtL>Yl+KU0v}a;B)LfV;uf4H#h0Q)6zRIJURQ7hRWpjnHI+5A z!n)9~7>k}IwbH~9%9sfbGmKn{%BBMUSQA|)K?7TjTTZ@ZQeP=5&*ikyAx-V55a}1Z z`a2VAC@b1yN`c`wT;J^}j*tdXGhT1t=Y<~zE~BPHtAQ4dnVv>%IO|MG2UF*5x2n?E blzWd&DJnCd)r>j^s^Geps<=3*Kh%pqA%aXC diff --git a/Src/Install/CodeSnip.iss b/Src/Install/CodeSnip.iss index 446495472..75c364f7d 100644 --- a/Src/Install/CodeSnip.iss +++ b/Src/Install/CodeSnip.iss @@ -91,7 +91,6 @@ Source: {#SrcExePath}{#HelpFile}; DestDir: {app}; Flags: ignoreversion Source: {#SrcDocsPath}{#LicenseTextFile}; DestDir: {app}; Flags: ignoreversion Source: {#SrcDocsPath}{#ReadMeFile}; DestDir: {app}; Flags: ignoreversion Source: {#SrcAssetsPath}UpdatingPreview.rtf; Flags: dontcopy -Source: {#SrcAssetsPath}AutoUpdateChecks.rtf; Flags: dontcopy [Icons] Name: {group}\{#AppPublisher} {#AppName}; Filename: {app}\{#ExeFile} diff --git a/Src/Install/EventHandlers.ps b/Src/Install/EventHandlers.ps index bc278a4db7b79dbaa63a81a3af5dd077e5abc9a6..8ca2cbaf5cd77a6aa8cf78a09bcd2150d9edd8aa 100644 GIT binary patch delta 22 ecmZ2)x7K_^8}nub76FdUA9-1sH_HkM@d5x{JO;D? delta 483 zcmZ`$O-sW-5XJVQDfI)yg9n|1B`E|eC|Cpw5-$ajLaTxYVVg{n#WovuHx#cP`~&+t zL?QSO^k;Yy1pk0%cN0`-73Q*U-n@Bl_J04N^LSTPZ*!~av$B31GCn4fvINMGWfDjx znF0K|1<-0imIg#3_%Zs|G>Nti935%WS<&zeo?lhl^A`m@B@u#*iG+ZPbVP0h(B$78 zrTXMY{V#F#vfvC(sE>(2*AM{g?ysc%jd?70rVvwFbxX*8z!OC<1EterVAd|p3Q*i>7gNVXU_#)JGz>sLK8Z9 Iw%D$J0eYUJPyhe` From 3420b7e01a0b432cdaa38639881db6b604a3506c Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sun, 31 May 2020 15:21:20 +0100 Subject: [PATCH 356/714] Add note of last minute installer fix to change log. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9324b3b10..1335d1cda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ This is a significant update. It's purpose is to remove CodeSnip's dependencies - Removed the option to submit snippets for addition to the DelphiDabbler Code Snippets database. - Removed support for a proxy web server - now unnecessary. - Removed support for the `--test-server` command line option that enabled use of a different server to test web services. + - Updated install program so it no longer displays a page stating that CodeSnip will go automatically go on-line to check for updates. + Removed references and links to delphidabbler.com from the program, the installer, the help file and documentation. Some references were deleted while others were replaced with alternatives, including: - Changed the URL of the FAQs to refer to the `codesnip-faq` GitHub project. - References to swag.delphidabbler.com were replaced with references to the `delphidabbler/swag` project on GitHub. From 9ef6cd95210aa986d6db679351d3f2efb96eff3d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 16 Jul 2020 17:02:13 +0100 Subject: [PATCH 357/714] Add compiler / file support for Delphi 10.2, 10.3 & 10.4 --- Src/Compilers.UBDS.pas | 18 ++++++++++++++++++ Src/Compilers.UGlobals.pas | 6 +++++- Src/DBIO.UIniDataReader.pas | 2 +- Src/UXMLDocConsts.pas | 3 ++- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Src/Compilers.UBDS.pas b/Src/Compilers.UBDS.pas index 3491d7d16..e13e1424a 100644 --- a/Src/Compilers.UBDS.pas +++ b/Src/Compilers.UBDS.pas @@ -144,6 +144,12 @@ function TBDSCompiler.GetIDString: string; Result := 'D10S'; ciD101B: Result := 'D101B'; + ciD102T: + Result := 'D102T'; + ciD103R: + Result := 'D103R'; + ciD104S: + Result := 'D104S'; else raise EBug.Create(ClassName + '.GetIDString: Invalid ID'); end; @@ -162,6 +168,9 @@ function TBDSCompiler.GetName: string; sDelphiXE8 = 'Delphi XE8'; // name of Delphi XE8 compiler sDelphi10S = 'Delphi 10 Seattle'; // name of Delphi 10 compiler sDelphi101B = 'Delphi 10.1 Berlin'; // name of Delphi 10.1 compiler + sDelphi102T = 'Delphi 10.2 Tokyo'; // name of Delphi 10.2 compiler + sDelphi103R = 'Delphi 10.3 Rio'; // name of Delphi 10.3 compiler + sDelphi104S = 'Delphi 10.4 Sydney'; // name of Delphi 10.4 compiler begin case GetID of ciDXE: @@ -184,6 +193,12 @@ function TBDSCompiler.GetName: string; Result := sDelphi10S; ciD101B: Result := sDelphi101B; + ciD102T: + Result := sDelphi102T; + ciD103R: + Result := sDelphi103R; + ciD104S: + Result := sDelphi104S; else Result := Format(sCompilerName, [ProductVersion]); end; @@ -214,6 +229,9 @@ function TBDSCompiler.InstallationRegKey: string; ciDXE8 : Result := '\Software\Embarcadero\BDS\16.0'; ciD10S : Result := '\Software\Embarcadero\BDS\17.0'; ciD101B : Result := '\Software\Embarcadero\BDS\18.0'; + ciD102T : Result := '\Software\Embarcadero\BDS\19.0'; + ciD103R : Result := '\Software\Embarcadero\BDS\20.0'; + ciD104S : Result := '\Software\Embarcadero\BDS\21.0'; else raise EBug.Create(ClassName + '.InstallationRegKey: Invalid ID'); end; end; diff --git a/Src/Compilers.UGlobals.pas b/Src/Compilers.UGlobals.pas index 9bae8f23a..aff4f39d3 100644 --- a/Src/Compilers.UGlobals.pas +++ b/Src/Compilers.UGlobals.pas @@ -40,6 +40,9 @@ interface ciDXE8, // Delphi XE8 ciD10S, // Delphi 10 Seattle ciD101B, // Delphi 10.1 Berlin + ciD102T, // Delphi 10.2 Tokyo + ciD103R, // Delphi 10.3 Rio + ciD104S, // Delphi 10.4 Sydney ciFPC // Free Pascal ); @@ -52,7 +55,8 @@ interface /// compilers.
    cBDSCompilers = [ ciD2005w32, ciD2006w32, ciD2007, ciD2009w32, ciD2010, ciDXE, ciDXE2, - ciDXE3, ciDXE4, ciDXE5, ciDXE6, ciDXE7, ciDXE8, ciD10S, ciD101B + ciDXE3, ciDXE4, ciDXE5, ciDXE6, ciDXE7, ciDXE8, ciD10S, ciD101B, ciD102T, + ciD103R, ciD104S ]; const diff --git a/Src/DBIO.UIniDataReader.pas b/Src/DBIO.UIniDataReader.pas index 739c86ec4..271bedd2b 100644 --- a/Src/DBIO.UIniDataReader.pas +++ b/Src/DBIO.UIniDataReader.pas @@ -235,7 +235,7 @@ implementation 'Delphi2005Win32', 'Delphi2006Win32', 'Delphi2007', 'Delphi2009Win32', 'Delphi2010', 'DelphiXE', 'DelphiXE2', 'DelphiXE3', 'DelphiXE4', 'DelphiXE5', 'DelphiXE6', 'DelphiXE7', 'DelphiXE8', 'Delphi10S', - 'Delphi101B', 'FPC' + 'Delphi101B', 'Delphi102T', 'Delphi103R', 'Delphi104S', 'FPC' ); { TIniDataReader } diff --git a/Src/UXMLDocConsts.pas b/Src/UXMLDocConsts.pas index a8ef440e4..673241a8b 100644 --- a/Src/UXMLDocConsts.pas +++ b/Src/UXMLDocConsts.pas @@ -67,7 +67,8 @@ interface 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd2005', 'd2006', 'd2007', 'd2009', 'd2010', 'dXE', 'dXE2', 'dXE3', 'dDX4' {error, but in use}, - 'dXE5', 'dXE6', 'dXE7', 'dXE8', 'd10s', 'd101b', + 'dXE5', 'dXE6', 'dXE7', 'dXE8', + 'd10s', 'd101b', 'd102t', 'd103r', 'd104s', 'fpc' ); From 59c67292cc34bca59d5a6c8885721844a8370b7d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 16 Jul 2020 17:05:02 +0100 Subject: [PATCH 358/714] Update Code Generator prefs re Delphi 10.2, 10.3 & 10.4 support. These compilers were added to the Predefined Compiler version drop down list that associates compiler version numbers required in conditional code with a named compiler. --- Src/FrCodeGenPrefs.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Src/FrCodeGenPrefs.pas b/Src/FrCodeGenPrefs.pas index 387700edb..848f43780 100644 --- a/Src/FrCodeGenPrefs.pas +++ b/Src/FrCodeGenPrefs.pas @@ -679,6 +679,9 @@ procedure TCodeGenPrefsFrame.PopulatePreDefCompilerMenu; AddMenuItem('Delphi XE8', 29.0); AddMenuItem('Delphi 10 Seattle', 30.0); AddMenuItem('Delphi 10.1 Berlin', 31.0); + AddMenuItem('Delphi 10.2 Tokyo', 32.0); + AddMenuItem('Delphi 10.3 Rio', 33.0); + AddMenuItem('Delphi 10.4 Sydney', 34.0); end; procedure TCodeGenPrefsFrame.PreDefCompilerMenuClick(Sender: TObject); From d4216ed3c2c67357cd1506bc3fe41325481927e6 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 16 Jul 2020 17:16:11 +0100 Subject: [PATCH 359/714] Update help file to refer to Delphi 10.4 as latest supported compiler --- Src/Help/HTML/about_compiler_checks.htm | 2 +- Src/Help/HTML/dlg_configcompilers.htm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Help/HTML/about_compiler_checks.htm b/Src/Help/HTML/about_compiler_checks.htm index 52139a1b3..b26c94395 100644 --- a/Src/Help/HTML/about_compiler_checks.htm +++ b/Src/Help/HTML/about_compiler_checks.htm @@ -34,7 +34,7 @@

    The supported compilers are the Win32 Delphi compilers from Delphi 2 to - Delphi 10.1 Berlin and Free Pascal. + Delphi 10.4 Sydney and Free Pascal.

    Configuring CodeSnip diff --git a/Src/Help/HTML/dlg_configcompilers.htm b/Src/Help/HTML/dlg_configcompilers.htm index c928fd56c..e65180a2f 100644 --- a/Src/Help/HTML/dlg_configcompilers.htm +++ b/Src/Help/HTML/dlg_configcompilers.htm @@ -281,7 +281,7 @@

    CodeSnip can automatically detect the presence of Win 32 Delphi - compilers from Delphi 2 to Delphi 10.1 Berlin. Click the Detect Delphi + compilers from Delphi 2 to Delphi 10.4 Sydney. Click the Detect Delphi Compilers button to do this. Any supported installed version of Delphi will be recorded. This can save considerable time and avoid errors. From deb11c4bab2479556e58f7543461093684235381 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 16 Jul 2020 17:28:08 +0100 Subject: [PATCH 360/714] Update read-me to refer to Delphi 10.4 as latest supported compiler --- Docs/ReadMe.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Docs/ReadMe.txt b/Docs/ReadMe.txt index e45a0dddc..3a4abd81f 100644 --- a/Docs/ReadMe.txt +++ b/Docs/ReadMe.txt @@ -14,7 +14,7 @@ online DelphiDabbler Code Snippets database as well as maintain a database of user-defined snippets. It displays details of each snippet in the database and can test-compile them -with each installed Win32 version of Delphi from Delphi 2 to Delphi 10.1 Berlin +with each installed Win32 version of Delphi from Delphi 2 to Delphi 10.4 Sydney and Free Pascal. Compilable Pascal units can be created that contain selected snippets. @@ -201,7 +201,7 @@ Configuring CodeSnip to Work With Your Compilers ================================================================================ A feature of CodeSnip is its ability to test compile snippets with any installed -Windows 32 version of Delphi (from Delphi 2 to Delphi 10.1 Berlin) and +Windows 32 version of Delphi (from Delphi 2 to Delphi 10.4 Sydney) and FreePascal, providing some simple rules are followed. When CodeSnip is first installed it knows nothing about the available compilers @@ -218,7 +218,7 @@ dialogue" in the help file index). Each user can configure compilers differently. -Delphi XE2 to XE8 and Delphi 10.1 Berlin may need to be configured to search for +Delphi XE2 to XE8 and Delphi 10.4 Sydney may need to be configured to search for required units in the correct namespaces. This is explained in the Add/Edit Snippet Dialogue Box help topic and in the FAQ at https://github.com/delphidabbler/codesnip-faq/blob/master/UsingCodeSnip.md#faq-1 From 48a9a995e302672ea48a74e8fe453857d6e7fd81 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 16 Jul 2020 17:29:43 +0100 Subject: [PATCH 361/714] Update file format docs re supported for Delphi 10.2 to 10.4 File formats for (1) user config file (2) export files (3) main database (Code Snippets Database) (4) user database all added support for the newer Delphis. --- Docs/Design/FileFormats/config.html | 27 +++++++++++++++++++++++++++ Docs/Design/FileFormats/export.html | 9 +++++++++ Docs/Design/FileFormats/main-db.html | 9 +++++++++ Docs/Design/FileFormats/user-db.html | 9 +++++++++ 4 files changed, 54 insertions(+) diff --git a/Docs/Design/FileFormats/config.html b/Docs/Design/FileFormats/config.html index a61ee4659..a508a2b24 100644 --- a/Docs/Design/FileFormats/config.html +++ b/Docs/Design/FileFormats/config.html @@ -247,6 +247,15 @@

  • D101B – Delphi 10.1 Berlin
  • +
  • + D102T – Delphi 10.2 Tokyo +
  • +
  • + D103R – Delphi 10.3 Rio +
  • +
  • + D104S – Delphi 10.4 Sydney +
  • FPC – Free Pascal
  • @@ -536,6 +545,24 @@

    Indicates whether Delphi 10.1 Berlin was included in the search.
    +
    + D102T (Boolean) +
    +
    + Indicates whether Delphi 10.2 Tokyo was included in the search. +
    +
    + D103R (Boolean) +
    +
    + Indicates whether Delphi 10.3 Rio was included in the search. +
    +
    + D104S (Boolean) +
    +
    + Indicates whether Delphi 10.4 Sydney was included in the search. +
    FPC (Boolean)
    diff --git a/Docs/Design/FileFormats/export.html b/Docs/Design/FileFormats/export.html index 08e0d5778..4313509d3 100644 --- a/Docs/Design/FileFormats/export.html +++ b/Docs/Design/FileFormats/export.html @@ -551,6 +551,15 @@

  • d101b – Delphi 10.1 Berlin compiler
  • +
  • + d102t – Delphi 10.2 Tokyo compiler +
  • +
  • + d103r – Delphi 10.3 Rio compiler +
  • +
  • + d104s – Delphi 10.4 Sydney compiler +
  • fpc – Free Pascal compiler
  • diff --git a/Docs/Design/FileFormats/main-db.html b/Docs/Design/FileFormats/main-db.html index 57bd53643..09f053235 100644 --- a/Docs/Design/FileFormats/main-db.html +++ b/Docs/Design/FileFormats/main-db.html @@ -403,6 +403,15 @@

  • Delphi101B – Delphi 10.1 Berlin compiler
  • +
  • + Delphi102T – Delphi 10.2 Tokyo compiler +
  • +
  • + Delphi103R – Delphi 10.3 Rio compiler +
  • +
  • + Delphi104S – Delphi 10.4 Sydney compiler +
  • FPC – Free Pascal compiler
  • diff --git a/Docs/Design/FileFormats/user-db.html b/Docs/Design/FileFormats/user-db.html index ed654c5a9..766ee527c 100644 --- a/Docs/Design/FileFormats/user-db.html +++ b/Docs/Design/FileFormats/user-db.html @@ -569,6 +569,15 @@

  • d101b – Delphi 10.1 Berlin compiler
  • +
  • + d102t – Delphi 10.2 Tokyo compiler +
  • +
  • + d103r – Delphi 10.3 Rio compiler +
  • +
  • + d104s – Delphi 10.4 Sydney compiler +
  • fpc – Free Pascal compiler
  • From 9c44678ae7f098e7b22e99c6256d4fb039399413 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 16 Jul 2020 17:32:36 +0100 Subject: [PATCH 362/714] Add missing keys referencing Delphi 10.2, 10.3 & 10.4. --- Docs/Design/FileFormats/main-db.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Docs/Design/FileFormats/main-db.html b/Docs/Design/FileFormats/main-db.html index 09f053235..66714b0d3 100644 --- a/Docs/Design/FileFormats/main-db.html +++ b/Docs/Design/FileFormats/main-db.html @@ -196,6 +196,9 @@

    DelphiXE8=<Y|N|Q|W> Delphi10S=<Y|N|Q|W> Delphi101B=<Y|N|Q|W> +Delphi102T=<Y|N|Q|W> +Delphi103R=<Y|N|Q|W> +Delphi104S=<Y|N|Q|W> FPC=<Y|N|Q|W> Extra=<extra-info-REML> StandardFormat=<0|1> From 5deb0bd1cdaf5d1cf8dffc76e7ae666abd16eb52 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 30 Jul 2020 21:44:49 +0100 Subject: [PATCH 363/714] Note Delphi Tokyo, Rio and Sydney are not supported by online CSDB --- Docs/Design/FileFormats/main-db.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Docs/Design/FileFormats/main-db.html b/Docs/Design/FileFormats/main-db.html index 66714b0d3..8e6f6dd77 100644 --- a/Docs/Design/FileFormats/main-db.html +++ b/Docs/Design/FileFormats/main-db.html @@ -407,13 +407,13 @@

    Delphi101B – Delphi 10.1 Berlin compiler
  • - Delphi102T – Delphi 10.2 Tokyo compiler + Delphi102T – Delphi 10.2 Tokyo compiler *
  • - Delphi103R – Delphi 10.3 Rio compiler + Delphi103R – Delphi 10.3 Rio compiler *
  • - Delphi104S – Delphi 10.4 Sydney compiler + Delphi104S – Delphi 10.4 Sydney compiler *
  • FPC – Free Pascal compiler @@ -442,6 +442,9 @@

    Any compiler not recognised by a given version of CodeSnip is ignored.

    +

    + * These compilers are not yet supported by the online DelphiDabbler Code Snippets Database. +

    From 2cc7182ad1737ab0f7b87d6f7c07a288f36a4a3b Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Thu, 30 Jul 2020 23:29:29 +0100 Subject: [PATCH 364/714] Update version numbers to 4.17.0 build 258 --- Src/VCodeSnip.vi | 4 ++-- Src/VCodeSnipPortable.vi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/VCodeSnip.vi b/Src/VCodeSnip.vi index c8bfe4aaf..64a5aa2dd 100644 --- a/Src/VCodeSnip.vi +++ b/Src/VCodeSnip.vi @@ -8,8 +8,8 @@ [Fixed File Info] -File Version #=4, 16, 0, 257 -Product Version #=4, 16, 0, 0 +File Version #=4, 17, 0, 258 +Product Version #=4, 17, 0, 0 File OS=4 File Type=1 File Sub-Type=0 diff --git a/Src/VCodeSnipPortable.vi b/Src/VCodeSnipPortable.vi index a9ca41177..9866dc77d 100644 --- a/Src/VCodeSnipPortable.vi +++ b/Src/VCodeSnipPortable.vi @@ -8,8 +8,8 @@ [Fixed File Info] -File Version #=4, 16, 0, 257 -Product Version #=4, 16, 0, 0 +File Version #=4, 17, 0, 258 +Product Version #=4, 17, 0, 0 File OS=4 File Type=1 File Sub-Type=0 From 26692c8659a2e59a8cb767cc30236c4da9c45195 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 31 Jul 2020 00:45:58 +0100 Subject: [PATCH 365/714] Update change log with details of changes in v4.16.0 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1335d1cda..acb677949 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,13 @@ This change log begins with the first ever pre-release version of _CodeSnip_. Re From v4.1.0 the version numbering has attempted to adhere to the principles of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Release v4.17.0 of 31 July 2020 + ++ Added support for test compilation with, and detection of, Delphi 10.2 Tokyo, Delphi 10.3 Rio and Delphi 10.4 Sydney compilers. ++ Updated documentation re changes. ++ Updated help file re changes. + + ## Release v4.16.0 of 31 May 2020 This is a significant update. It's purpose is to remove CodeSnip's dependencies on the delphidabbler.com website and associated web services. This was done because of the expected June 2020 closure or reduced functionality of delphidabbler.com. Some affected features were removed and others replaced with alternatives. From d6e5ce27e2577115f6c663ffd3f9498787ad738d Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 31 Jul 2020 12:42:31 +0100 Subject: [PATCH 366/714] Change intro para to What's New dialogue for post 4.16 releases. This change should have been made with the release of CodeSnip 4.17.0 but was overlooked. --- Src/Res/HTML/dlg-whatsnew.html | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Src/Res/HTML/dlg-whatsnew.html b/Src/Res/HTML/dlg-whatsnew.html index ed590adf3..e41ec5600 100644 --- a/Src/Res/HTML/dlg-whatsnew.html +++ b/Src/Res/HTML/dlg-whatsnew.html @@ -21,18 +21,9 @@ - - -

    - Important information about CodeSnip v4.16.0 -

    There are several important differences from your old version of CodeSnip that you need to know about.

    From 86f24577f33f8561f6c2954dfc42dcb765ed6d6e Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 31 Jul 2020 12:45:45 +0100 Subject: [PATCH 367/714] Remove unused HTML resource file This file was used to display news from RSS news feed. The associated dialogue was removed in v4.16.0 --- Src/HTML.hrc | 3 --- Src/Res/HTML/dlg-rssnews.html | 29 ----------------------------- 2 files changed, 32 deletions(-) delete mode 100644 Src/Res/HTML/dlg-rssnews.html diff --git a/Src/HTML.hrc b/Src/HTML.hrc index 30fd18809..f4049c658 100644 --- a/Src/HTML.hrc +++ b/Src/HTML.hrc @@ -28,9 +28,6 @@ Res\HTML\dlg-comperror-tplt.html # active text preview dialogue Res\HTML\dlg-activetext-preview-tplt.html -# news dialogue -Res\HTML\dlg-rssnews.html - # SWAG import dialogue Res\HTML\dlg-swag-import-intro-tplt.html Res\HTML\dlg-swag-import-outro-tplt.html diff --git a/Src/Res/HTML/dlg-rssnews.html b/Src/Res/HTML/dlg-rssnews.html deleted file mode 100644 index c7f1a3a4c..000000000 --- a/Src/Res/HTML/dlg-rssnews.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - dlg-rssnews - - - - - - - - - From b7040e93289c6a1bb1937e15a964045dc90989d8 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 31 Jul 2020 12:46:53 +0100 Subject: [PATCH 368/714] Update version numbers to 4.17.1 build 259 --- Src/VCodeSnip.vi | 4 ++-- Src/VCodeSnipPortable.vi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/VCodeSnip.vi b/Src/VCodeSnip.vi index 64a5aa2dd..c68eb4b05 100644 --- a/Src/VCodeSnip.vi +++ b/Src/VCodeSnip.vi @@ -8,8 +8,8 @@ [Fixed File Info] -File Version #=4, 17, 0, 258 -Product Version #=4, 17, 0, 0 +File Version #=4, 17, 1, 259 +Product Version #=4, 17, 1, 0 File OS=4 File Type=1 File Sub-Type=0 diff --git a/Src/VCodeSnipPortable.vi b/Src/VCodeSnipPortable.vi index 9866dc77d..a58a82445 100644 --- a/Src/VCodeSnipPortable.vi +++ b/Src/VCodeSnipPortable.vi @@ -8,8 +8,8 @@ [Fixed File Info] -File Version #=4, 17, 0, 258 -Product Version #=4, 17, 0, 0 +File Version #=4, 17, 1, 259 +Product Version #=4, 17, 1, 0 File OS=4 File Type=1 File Sub-Type=0 From 36f62fe8c87b7e4668944d85613f2c93e7428182 Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Fri, 31 Jul 2020 12:53:17 +0100 Subject: [PATCH 369/714] Update change log with details of changes in v4.17.1 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index acb677949..7158a3087 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,14 @@ This change log begins with the first ever pre-release version of _CodeSnip_. Re From v4.1.0 the version numbering has attempted to adhere to the principles of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Release v4.17.1 of 31 July 2020 + +Hotfix release. + +* Corrected "What's New" dialogue box content that is displayed _only_ when updating from v4.15.1 and earlier. The correction is to ensure the text makes sense when release 4.16.0 has been skipped. This change should have been made in v4.17.0. +* Removed a redundant resource. + + ## Release v4.17.0 of 31 July 2020 + Added support for test compilation with, and detection of, Delphi 10.2 Tokyo, Delphi 10.3 Rio and Delphi 10.4 Sydney compilers. From 8cad5e46818182e10d0fc752062f193edc9732ff Mon Sep 17 00:00:00 2001 From: delphidabbler Date: Sat, 12 Sep 2020 08:59:56 +0100 Subject: [PATCH 370/714] Replace jquery v1.8.0 with v1.12.4 This fixes vulnerability in v1.8.0 --- Src/HTML.hrc | 2 +- Src/Res/HTML/dlg-easter-egg.html | 2 +- Src/Res/Scripts/3rdParty/jquery-1.12.4.min.js | 5 +++++ Src/Res/Scripts/3rdParty/jquery-1.8.0.min.js | 2 -- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 Src/Res/Scripts/3rdParty/jquery-1.12.4.min.js delete mode 100644 Src/Res/Scripts/3rdParty/jquery-1.8.0.min.js diff --git a/Src/HTML.hrc b/Src/HTML.hrc index f4049c658..76717a9f4 100644 --- a/Src/HTML.hrc +++ b/Src/HTML.hrc @@ -19,7 +19,7 @@ Res\HTML\dlg-about-database-tplt.html Res\HTML\dlg-easter-egg.html Res\CSS\easteregg.css Res\Scripts\easteregg.js -Res\Scripts\3rdParty\jquery-1.8.0.min.js +Res\Scripts\3rdParty\jquery-1.12.4.min.js Res\Scripts\3rdParty\jquery.cycle.lite.js # compiler error log diff --git a/Src/Res/HTML/dlg-easter-egg.html b/Src/Res/HTML/dlg-easter-egg.html index d3779c062..51d11a0c8 100644 --- a/Src/Res/HTML/dlg-easter-egg.html +++ b/Src/Res/HTML/dlg-easter-egg.html @@ -24,7 +24,7 @@ - + diff --git a/Src/Res/Scripts/3rdParty/jquery-1.12.4.min.js b/Src/Res/Scripts/3rdParty/jquery-1.12.4.min.js new file mode 100644 index 000000000..b0ecaddee --- /dev/null +++ b/Src/Res/Scripts/3rdParty/jquery-1.12.4.min.js @@ -0,0 +1,5 @@ +/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0; +}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML="
    a",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:l.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?""!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("