Check-in [7c151999a5]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:The About window now opens the plugin's site by default.
Timelines: family | ancestors | descendants | both | win64
Files: files | file ages | folders
SHA1: 7c151999a554da87efd46883777769545ae6d135
User & Date: tinus 2017-02-19 14:23:37
Context
2017-02-19
15:12
Prepared for distribution of v1.0.0 Closed-Leaf check-in: 681f60db8c user: tinus tags: release, v1.0.0, win64
14:23
The About window now opens the plugin's site by default. check-in: 7c151999a5 user: tinus tags: win64
13:52
Added fossil settings file. check-in: 906812b373 user: tinus tags: win64
Changes

Changes to src/U_Npp_HTMLTag.pas.

20
21
22
23
24
25
26


27
28
29
30
31
32
33
..
41
42
43
44
45
46
47

48
49
50
51
52
53
54
...
146
147
148
149
150
151
152
















153
154
155
156
157
158
159
...
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241

242
243
244
245
246
247
248

249
250
251
252
253
254
255
    procedure commandEncodeEntities;
    procedure commandDecodeEntities;
    procedure commandEncodeJS;
    procedure commandDecodeJS;
    procedure commandAbout;
    procedure DoNppnToolbarModification; override;



    property App: TApplication  read FApp;
  end;

procedure _commandFindMatchingTag(); cdecl;
procedure _commandSelectTagContents(); cdecl;
procedure _commandSelectTagContentsOnly(); cdecl;
procedure _commandEncodeEntities(); cdecl;
................................................................................
  Npp: TNppPluginHTMLTag;

////////////////////////////////////////////////////////////////////////////////////////////////////
implementation

uses
  DateUtils,

  L_VersionInfoW, L_SpecialFolders,
  U_HTMLTagFinder, U_Entities, U_JSEncode;

{ ------------------------------------------------------------------------------------------------ }
procedure _commandFindMatchingTag(); cdecl;
begin
  npp.commandFindMatchingTag;
................................................................................

{ ------------------------------------------------------------------------------------------------ }
procedure TNppPluginHTMLTag.DoNppnToolbarModification;
begin
  inherited;
  FApp := GetApplication(@Self.NppData);
end;

















{ ------------------------------------------------------------------------------------------------ }
procedure TNppPluginHTMLTag.commandFindMatchingTag;
begin
  try
    U_HTMLTagFinder.FindMatchingTag(False, False);
  except
................................................................................
  Version: TFileVersionInfo;
  Text, DLLName: string;
begin
  try
    DLLName := TSpecialFolders.DLLFullName;
    Version := TFileVersionInfo.Create(DLLName);
    try
      Text := Format('%s v%s'#13#10#13#10
                      + 'Plug-in location:'#9'%s'#13#10
                      + 'Config location:'#9'%s'#13#10
                      + 'Download:'#9'%s'#13#10#13#10
                      + '® 2011-%d %s - %s'#13#10
                      + '  a.k.a. %s - %s'#13#10#13#10
                      + 'Licensed under the %s - %s',
                     [ExtractFileName(DLLName), Version.FileVersion,

                      ExtractFilePath(DLLName),
                      App.ConfigFolder,
                      'http://fossil.2of4.net/npp_htmltag',
                      YearOf(Now), Version.LegalCopyright, 'http://martijn.coppoolse.com/software',
                      'vor0nwe', 'http://sourceforge.net/users/vor0nwe',
                      'MPL 1.1', 'http://www.mozilla.org/MPL/MPL-1.1.txt']);
      MessageBox(App.WindowHandle, PChar(Text), PChar(Version.FileDescription), MB_ICONINFORMATION);

    finally
      FreeAndNil(Version);
    end;
  except
    HandleException(ExceptObject, ExceptAddr);
  end;
end {TNppPluginHTMLTag.commandAbout};







>
>







 







>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
|
|
|
|
|


>



|


|
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
..
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
...
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
...
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
    procedure commandEncodeEntities;
    procedure commandDecodeEntities;
    procedure commandEncodeJS;
    procedure commandDecodeJS;
    procedure commandAbout;
    procedure DoNppnToolbarModification; override;

    procedure ShellExecute(const FullName: string; const Verb: string = 'open'; const WorkingDir: string = ''; const ShowWindow: Integer = SW_SHOWDEFAULT);

    property App: TApplication  read FApp;
  end;

procedure _commandFindMatchingTag(); cdecl;
procedure _commandSelectTagContents(); cdecl;
procedure _commandSelectTagContentsOnly(); cdecl;
procedure _commandEncodeEntities(); cdecl;
................................................................................
  Npp: TNppPluginHTMLTag;

////////////////////////////////////////////////////////////////////////////////////////////////////
implementation

uses
  DateUtils,
  ShellAPI,
  L_VersionInfoW, L_SpecialFolders,
  U_HTMLTagFinder, U_Entities, U_JSEncode;

{ ------------------------------------------------------------------------------------------------ }
procedure _commandFindMatchingTag(); cdecl;
begin
  npp.commandFindMatchingTag;
................................................................................

{ ------------------------------------------------------------------------------------------------ }
procedure TNppPluginHTMLTag.DoNppnToolbarModification;
begin
  inherited;
  FApp := GetApplication(@Self.NppData);
end;

{ ------------------------------------------------------------------------------------------------ }
procedure TNppPluginHTMLTag.ShellExecute(const FullName, Verb, WorkingDir: string; const ShowWindow: Integer);
var
  SEI: TShellExecuteInfo;
begin
  SEI := Default(TShellExecuteInfo);
  SEI.cbSize := SizeOf(SEI);
  SEI.Wnd := App.WindowHandle;
  SEI.lpVerb := PChar(Verb);
  SEI.lpFile := PChar(FullName);
  SEI.lpParameters := nil;
  SEI.lpDirectory := PChar(WorkingDir);
  SEI.nShow := ShowWindow;
  ShellExecuteEx(@SEI);
end;

{ ------------------------------------------------------------------------------------------------ }
procedure TNppPluginHTMLTag.commandFindMatchingTag;
begin
  try
    U_HTMLTagFinder.FindMatchingTag(False, False);
  except
................................................................................
  Version: TFileVersionInfo;
  Text, DLLName: string;
begin
  try
    DLLName := TSpecialFolders.DLLFullName;
    Version := TFileVersionInfo.Create(DLLName);
    try
      Text := Format('%s v%s %s'#10#10
                      + 'Plug-in location:'#9'%s'#10
                      + 'Config location:'#9'%s'#10
                      + 'Download:'#9'%s'#10#10
                      + '® 2011-%d %s - %s'#10
                      + '  a.k.a. %s - %s'#10#10
                      + 'Licensed under the %s - %s',
                     [ExtractFileName(DLLName), Version.FileVersion,
                      {$IFDEF WIN64}'(64-bits)'{$ELSE}'(32-bits)'{$ENDIF},
                      ExtractFilePath(DLLName),
                      App.ConfigFolder,
                      'http://fossil.2of4.net/npp_htmltag',
                      YearOf(Now), Version.LegalCopyright, Version.Comments, // 'http://martijn.coppoolse.com/software',
                      'vor0nwe', 'http://sourceforge.net/users/vor0nwe',
                      'MPL 1.1', 'http://www.mozilla.org/MPL/MPL-1.1.txt']);
      if MessageBox(App.WindowHandle, PChar(Text), PChar(Version.FileDescription), MB_OKCANCEL or MB_ICONINFORMATION) = ID_OK then
        ShellExecute(Version.Comments, 'open');
    finally
      FreeAndNil(Version);
    end;
  except
    HandleException(ExceptObject, ExceptAddr);
  end;
end {TNppPluginHTMLTag.commandAbout};

Changes to src/prj/HTMLTag.dproj.

35
36
37
38
39
40
41
42
43
44
45
46
47
48


49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
..
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    </PropertyGroup>
    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
        <Cfg_2_Win32>true</Cfg_2_Win32>
        <CfgParent>Cfg_2</CfgParent>
        <Cfg_2>true</Cfg_2>
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
        <Cfg_2_Win64>true</Cfg_2_Win64>
        <CfgParent>Cfg_2</CfgParent>
        <Cfg_2>true</Cfg_2>
        <Base>true</Base>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Base)'!=''">


        <SanitizedProjectName>HTMLTag</SanitizedProjectName>
        <Icon_MainIcon>HTMLTag.ico</Icon_MainIcon>
        <VerInfo_MajorVer>0</VerInfo_MajorVer>
        <VerInfo_MinorVer>5</VerInfo_MinorVer>
        <PostBuildEventCancelOnError>false</PostBuildEventCancelOnError>
        <PostBuildEvent>
            <![CDATA["C:\MC\Run\Util\Compression\UPX\upx.exe" --best -q "$(OUTPUTPATH)"
$(PostBuildEvent)]]>
        </PostBuildEvent>
        <VerInfo_DLL>true</VerInfo_DLL>
        <DCC_ImageBase>00400000</DCC_ImageBase>
        <VerInfo_Keys>CompanyName=Voronwë;FileDescription=HTMLTag plugin for Notepad++;FileVersion=0.5.0.0;InternalName=HTMLTag;LegalCopyright=Martijn Coppoolse;LegalTrademarks=;OriginalFilename=HTMLTag.dll;ProductName=Notepad++;ProductVersion=6.0.0.0;Comments=http://fossil.2of4.net/npp_htmltag</VerInfo_Keys>
        <DCC_UsePackage>vcl;rtl;dbrtl;adortl;vcldb;vclx;bdertl;vcldbx;ibxpress;dsnap;cds;bdecds;qrpt;teeui;teedb;tee;dss;teeqr;visualclx;visualdbclx;dsnapcrba;dsnapcon;VclSmp;vclshlctrls;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;inetdb;nmfast;webdsnap;websnap;soaprtl;dbexpress;dbxcds;indy;dclOffice2k;dOCI6;CoolTrayIcon_D6plus;curlpkg;ThemeManagerD6;VirtualTreesD6;Jcl;JclVcl;JvCoreD6R;JvSystemD6R;JvStdCtrlsD6R;JvAppFrmD6R;JvBandsD6R;JvDBD6R;JvDlgsD6R;JvBDED6R;JvCmpD6R;JvCryptD6R;JvCtrlsD6R;JvCustomD6R;JvDockingD6R;JvDotNetCtrlsD6R;JvEDID6R;JvGlobusD6R;JvHMID6R;JvInterpreterD6R;JvJansD6R;JvManagedThreadsD6R;JvMMD6R;JvNetD6R;JvPageCompsD6R;JvPluginD6R;JvPrintPreviewD6R;JvRuntimeDesignD6R;JvTimeFrameworkD6R;JvUIBD6R;JvValidatorsD6R;JvWizardD6R;JvXPCtrlsD6R;$(DCC_UsePackage)</DCC_UsePackage>
        <DCC_ExeOutput>..\..\out\$(PLATFORM)\$(CONFIG)</DCC_ExeOutput>
        <DCC_Define>NPPUNICODE;$(DCC_Define)</DCC_Define>
        <DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Winapi;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
        <DCC_UnitSearchPath>..\;$(DELPHI)\Lib\Debug;C:\PROGRA~1\Jedi\jcl\lib\d6\debug;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
................................................................................
        <DCC_E>false</DCC_E>
        <DCC_DcuOutput>..\..\out\dcu\$(PLATFORM)\$(CONFIG)</DCC_DcuOutput>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Base_Win32)'!=''">
        <DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Base_Win64)'!=''">
        <VerInfo_Keys>CompanyName=Voronwë;FileDescription=HTMLTag plugin for Notepad++;FileVersion=0.5.0.0;InternalName=HTMLTag;LegalCopyright=© Martijn Coppoolse;LegalTrademarks=;OriginalFilename=HTMLTag.dll;ProductName=Notepad++;ProductVersion=7.0.0.0;Comments=http://fossil.2of4.net/npp_htmltag</VerInfo_Keys>
        <Debugger_HostApplication>C:\MC\Run\Office\Np++\x64\notepad++.exe</Debugger_HostApplication>
        <DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Cfg_1)'!=''">
        <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
        <DCC_DebugInformation>0</DCC_DebugInformation>
        <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
................................................................................
        <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
        <PostBuildEvent>
            <![CDATA[]]>
        </PostBuildEvent>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
        <VerInfo_Keys>CompanyName=Voronwë;FileDescription=HTMLTag plugin for Notepad++;FileVersion=0.5.0.0;InternalName=HTMLTag;LegalCopyright=© Martijn Coppoolse;LegalTrademarks=;OriginalFilename=HTMLTag.dll;ProductName=Notepad++;ProductVersion=7.0.0.0;Comments=http://fossil.2of4.net/npp_htmltag</VerInfo_Keys>
    </PropertyGroup>
    <ItemGroup>
        <DelphiCompile Include="$(MainSource)">
            <MainSource>MainSource</MainSource>
        </DelphiCompile>
        <DCCReference Include="..\U_Npp_HTMLTag.pas"/>
        <DCCReference Include="..\common\L_VersionInfoW.pas"/>
        <DCCReference Include="..\common\L_SpecialFolders.pas"/>







<
<
<
<
<
<

>
>


<
<







|







 







<







 







<
<
<







35
36
37
38
39
40
41






42
43
44
45
46


47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
..
69
70
71
72
73
74
75

76
77
78
79
80
81
82
..
89
90
91
92
93
94
95



96
97
98
99
100
101
102
    </PropertyGroup>
    <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
        <Cfg_2_Win32>true</Cfg_2_Win32>
        <CfgParent>Cfg_2</CfgParent>
        <Cfg_2>true</Cfg_2>
        <Base>true</Base>
    </PropertyGroup>






    <PropertyGroup Condition="'$(Base)'!=''">
        <DCC_UNIT_PLATFORM>false</DCC_UNIT_PLATFORM>
        <DCC_SYMBOL_PLATFORM>false</DCC_SYMBOL_PLATFORM>
        <SanitizedProjectName>HTMLTag</SanitizedProjectName>
        <Icon_MainIcon>HTMLTag.ico</Icon_MainIcon>


        <PostBuildEventCancelOnError>false</PostBuildEventCancelOnError>
        <PostBuildEvent>
            <![CDATA["C:\MC\Run\Util\Compression\UPX\upx.exe" --best -q "$(OUTPUTPATH)"
$(PostBuildEvent)]]>
        </PostBuildEvent>
        <VerInfo_DLL>true</VerInfo_DLL>
        <DCC_ImageBase>00400000</DCC_ImageBase>
        <VerInfo_Keys>CompanyName=Voronwë;FileDescription=HTMLTag plugin for Notepad++;FileVersion=1.0.0.0;InternalName=HTMLTag;LegalCopyright=Martijn Coppoolse;LegalTrademarks=;OriginalFilename=HTMLTag.dll;ProductName=Notepad++;ProductVersion=7.0.0.0;Comments=http://fossil.2of4.net/npp_htmltag</VerInfo_Keys>
        <DCC_UsePackage>vcl;rtl;dbrtl;adortl;vcldb;vclx;bdertl;vcldbx;ibxpress;dsnap;cds;bdecds;qrpt;teeui;teedb;tee;dss;teeqr;visualclx;visualdbclx;dsnapcrba;dsnapcon;VclSmp;vclshlctrls;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;inetdb;nmfast;webdsnap;websnap;soaprtl;dbexpress;dbxcds;indy;dclOffice2k;dOCI6;CoolTrayIcon_D6plus;curlpkg;ThemeManagerD6;VirtualTreesD6;Jcl;JclVcl;JvCoreD6R;JvSystemD6R;JvStdCtrlsD6R;JvAppFrmD6R;JvBandsD6R;JvDBD6R;JvDlgsD6R;JvBDED6R;JvCmpD6R;JvCryptD6R;JvCtrlsD6R;JvCustomD6R;JvDockingD6R;JvDotNetCtrlsD6R;JvEDID6R;JvGlobusD6R;JvHMID6R;JvInterpreterD6R;JvJansD6R;JvManagedThreadsD6R;JvMMD6R;JvNetD6R;JvPageCompsD6R;JvPluginD6R;JvPrintPreviewD6R;JvRuntimeDesignD6R;JvTimeFrameworkD6R;JvUIBD6R;JvValidatorsD6R;JvWizardD6R;JvXPCtrlsD6R;$(DCC_UsePackage)</DCC_UsePackage>
        <DCC_ExeOutput>..\..\out\$(PLATFORM)\$(CONFIG)</DCC_ExeOutput>
        <DCC_Define>NPPUNICODE;$(DCC_Define)</DCC_Define>
        <DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Winapi;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
        <DCC_UnitSearchPath>..\;$(DELPHI)\Lib\Debug;C:\PROGRA~1\Jedi\jcl\lib\d6\debug;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
        <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
................................................................................
        <DCC_E>false</DCC_E>
        <DCC_DcuOutput>..\..\out\dcu\$(PLATFORM)\$(CONFIG)</DCC_DcuOutput>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Base_Win32)'!=''">
        <DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Base_Win64)'!=''">

        <Debugger_HostApplication>C:\MC\Run\Office\Np++\x64\notepad++.exe</Debugger_HostApplication>
        <DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Cfg_1)'!=''">
        <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
        <DCC_DebugInformation>0</DCC_DebugInformation>
        <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
................................................................................
        <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
    </PropertyGroup>
    <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
        <PostBuildEvent>
            <![CDATA[]]>
        </PostBuildEvent>
    </PropertyGroup>



    <ItemGroup>
        <DelphiCompile Include="$(MainSource)">
            <MainSource>MainSource</MainSource>
        </DelphiCompile>
        <DCCReference Include="..\U_Npp_HTMLTag.pas"/>
        <DCCReference Include="..\common\L_VersionInfoW.pas"/>
        <DCCReference Include="..\common\L_SpecialFolders.pas"/>