mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 23:58:06 +02:00
FPDocUpdater: fixed updating topics, multiple elements with same name
- shows update summary git-svn-id: trunk@12838 -
This commit is contained in:
parent
4f0800e8ee
commit
146fe15441
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -1130,6 +1130,9 @@ doceditor/fpdocupdater/mainunit.pas svneol=native#text/pascal
|
||||
doceditor/fpdocupdater/unitmove.lfm svneol=native#text/plain
|
||||
doceditor/fpdocupdater/unitmove.lrs svneol=native#text/pascal
|
||||
doceditor/fpdocupdater/unitmove.pas svneol=native#text/pascal
|
||||
doceditor/fpdocupdater/unitsummary.lfm svneol=native#text/plain
|
||||
doceditor/fpdocupdater/unitsummary.lrs svneol=native#text/pascal
|
||||
doceditor/fpdocupdater/unitsummary.pas svneol=native#text/pascal
|
||||
doceditor/frmabout.lfm svneol=native#text/plain
|
||||
doceditor/frmabout.lrs svneol=native#text/pascal
|
||||
doceditor/frmabout.pp svneol=native#text/pascal
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,12 +2,12 @@
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="5"/>
|
||||
<Version Value="6"/>
|
||||
<General>
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
<ActiveEditorIndexAtStart Value="2"/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
@ -26,39 +26,42 @@
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
<PackageName Value="CodeTools"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="5">
|
||||
<Units Count="19">
|
||||
<Unit0>
|
||||
<Filename Value="fpdocupdater.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="FPDocUpdater"/>
|
||||
<CursorPos X="47" Y="16"/>
|
||||
<CursorPos X="47" Y="15"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="32"/>
|
||||
<UsageCount Value="48"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<ComponentName Value="FormMain"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="mainunit.lrs"/>
|
||||
<UnitName Value="MainUnit"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="14" Y="36"/>
|
||||
<TopLine Value="36"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="32"/>
|
||||
<UsageCount Value="48"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="fpdocfiles.pas"/>
|
||||
<UnitName Value="FPDocFiles"/>
|
||||
<CursorPos X="30" Y="301"/>
|
||||
<TopLine Value="297"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="14"/>
|
||||
<CursorPos X="106" Y="491"/>
|
||||
<TopLine Value="477"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="21"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
@ -72,18 +75,218 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="unitmove.lrs"/>
|
||||
<UnitName Value="UnitMove"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="20"/>
|
||||
<CursorPos X="50" Y="81"/>
|
||||
<TopLine Value="60"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="36"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\dom.pp"/>
|
||||
<UnitName Value="DOM"/>
|
||||
<CursorPos X="4" Y="1030"/>
|
||||
<TopLine Value="1022"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\rtl\objpas\classes\classesh.inc"/>
|
||||
<CursorPos X="20" Y="580"/>
|
||||
<TopLine Value="572"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\rtl\objpas\classes\stringl.inc"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="292"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<Filename Value="..\..\lcl\masks.pas"/>
|
||||
<UnitName Value="Masks"/>
|
||||
<CursorPos X="1" Y="402"/>
|
||||
<TopLine Value="380"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<UnitName Value="XMLCfg"/>
|
||||
<CursorPos X="15" Y="69"/>
|
||||
<TopLine Value="56"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\rtl\objpas\classes\lists.inc"/>
|
||||
<CursorPos X="3" Y="180"/>
|
||||
<TopLine Value="178"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\rtl\inc\wstringh.inc"/>
|
||||
<CursorPos X="11" Y="29"/>
|
||||
<TopLine Value="16"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\rtl\inc\wstrings.inc"/>
|
||||
<CursorPos X="3" Y="1290"/>
|
||||
<TopLine Value="1285"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlread.pp"/>
|
||||
<UnitName Value="XMLRead"/>
|
||||
<CursorPos X="46" Y="2766"/>
|
||||
<TopLine Value="2750"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="..\..\lcl\stdctrls.pp"/>
|
||||
<UnitName Value="StdCtrls"/>
|
||||
<CursorPos X="3" Y="913"/>
|
||||
<TopLine Value="924"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="..\..\lcl\lcltype.pp"/>
|
||||
<UnitName Value="LCLType"/>
|
||||
<CursorPos X="3" Y="878"/>
|
||||
<TopLine Value="865"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="unitsummary.pas"/>
|
||||
<ComponentName Value="FormSummary"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="unitsummary.lrs"/>
|
||||
<UnitName Value="UnitSummary"/>
|
||||
<CursorPos X="33" Y="72"/>
|
||||
<TopLine Value="49"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="23"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="..\..\ide\helpoptions.pas"/>
|
||||
<ComponentName Value="HelpOptionsDialog"/>
|
||||
<HasResources Value="True"/>
|
||||
<UnitName Value="HelpOptions"/>
|
||||
<CursorPos X="24" Y="337"/>
|
||||
<TopLine Value="324"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="..\..\components\codetools\laz_xmlcfg.pas"/>
|
||||
<UnitName Value="Laz_XMLCfg"/>
|
||||
<CursorPos X="3" Y="48"/>
|
||||
<TopLine Value="35"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit18>
|
||||
</Units>
|
||||
<JumpHistory Count="1" HistoryIndex="0">
|
||||
<JumpHistory Count="25" HistoryIndex="24">
|
||||
<Position1>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<Caret Line="213" Column="43" TopLine="198"/>
|
||||
<Caret Line="288" Column="44" TopLine="273"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<Caret Line="231" Column="1" TopLine="223"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<Caret Line="232" Column="39" TopLine="219"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="135" Column="1" TopLine="128"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<Caret Line="232" Column="1" TopLine="219"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="135" Column="1" TopLine="122"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="136" Column="1" TopLine="123"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="137" Column="1" TopLine="124"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="138" Column="1" TopLine="125"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="141" Column="1" TopLine="137"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="142" Column="1" TopLine="129"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="144" Column="1" TopLine="131"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="146" Column="1" TopLine="133"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="147" Column="1" TopLine="134"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="148" Column="1" TopLine="135"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="149" Column="1" TopLine="136"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Caret Line="150" Column="1" TopLine="137"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="..\..\ide\helpoptions.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="..\..\ide\helpoptions.pas"/>
|
||||
<Caret Line="337" Column="30" TopLine="324"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<Caret Line="242" Column="43" TopLine="225"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<Caret Line="32" Column="58" TopLine="26"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<Caret Line="251" Column="15" TopLine="235"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<Caret Line="32" Column="52" TopLine="19"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="..\..\ide\helpoptions.pas"/>
|
||||
<Caret Line="337" Column="24" TopLine="324"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="mainunit.pas"/>
|
||||
<Caret Line="296" Column="90" TopLine="413"/>
|
||||
</Position25>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
@ -95,18 +298,17 @@
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<BreakPoints Count="1">
|
||||
<Item1>
|
||||
<Source Value="..\..\fpc\2.2.1\source\packages\fcl-xml\src\xmlcfg.pp"/>
|
||||
<Line Value="135"/>
|
||||
</Item1>
|
||||
</BreakPoints>
|
||||
<Exceptions Count="2">
|
||||
<Item1>
|
||||
<Name Value="ECodetoolError"/>
|
||||
|
@ -8,12 +8,13 @@ uses
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms
|
||||
{ add your units here }, MainUnit, UnitMove;
|
||||
{ add your units here }, MainUnit, UnitMove, UnitSummary;
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.CreateForm(TFormMain, FormMain);
|
||||
Application.CreateForm(TFormMove, FormMove);
|
||||
Application.CreateForm(TFormSummary, FormSummary);
|
||||
Application.Run;
|
||||
end.
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
object Form1: TForm1
|
||||
object FormMain: TFormMain
|
||||
Left = 253
|
||||
Height = 484
|
||||
Height = 527
|
||||
Top = 156
|
||||
Width = 531
|
||||
HorzScrollBar.Page = 530
|
||||
VertScrollBar.Page = 483
|
||||
Width = 504
|
||||
HorzScrollBar.Page = 503
|
||||
VertScrollBar.Page = 526
|
||||
ActiveControl = EditDocs
|
||||
Caption = 'FPDoc Updater'
|
||||
ClientHeight = 484
|
||||
ClientWidth = 531
|
||||
Constraints.MinHeight = 464
|
||||
ClientHeight = 527
|
||||
ClientWidth = 504
|
||||
Constraints.MinHeight = 525
|
||||
Constraints.MinWidth = 300
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
@ -31,16 +31,16 @@ object Form1: TForm1
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelBackup: TLabel
|
||||
Left = 395
|
||||
Left = 380
|
||||
Height = 14
|
||||
Top = 246
|
||||
Top = 252
|
||||
Width = 89
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Backup extension:'
|
||||
ParentColor = False
|
||||
end
|
||||
object LabelPackage: TLabel
|
||||
Left = 395
|
||||
Left = 368
|
||||
Height = 14
|
||||
Top = 161
|
||||
Width = 45
|
||||
@ -68,34 +68,32 @@ object Form1: TForm1
|
||||
Left = 126
|
||||
Height = 23
|
||||
Top = 12
|
||||
Width = 347
|
||||
Width = 320
|
||||
Directory = 'D:\Projects\Lazarus\Docs\xml\lcl\'
|
||||
OnAcceptDirectory = EditDocsAcceptDirectory
|
||||
ButtonWidth = 45
|
||||
NumGlyphs = 1
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
ParentColor = False
|
||||
TabOrder = 0
|
||||
OnEditingDone = EditDocsEditingDone
|
||||
OnChange = EditDocsChange
|
||||
end
|
||||
object EditUnits: TDirectoryEdit
|
||||
Left = 126
|
||||
Height = 23
|
||||
Top = 48
|
||||
Width = 347
|
||||
Width = 320
|
||||
Directory = 'D:\Projects\Lazarus\LCL\'
|
||||
OnAcceptDirectory = EditUnitsAcceptDirectory
|
||||
ButtonWidth = 45
|
||||
NumGlyphs = 1
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
ParentColor = False
|
||||
TabOrder = 1
|
||||
OnEditingDone = EditDocsEditingDone
|
||||
OnChange = EditUnitsChange
|
||||
end
|
||||
object ButtonUpdate: TButton
|
||||
Left = 395
|
||||
Left = 362
|
||||
Height = 25
|
||||
Top = 354
|
||||
Top = 396
|
||||
Width = 122
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.InnerBorder = 4
|
||||
@ -104,9 +102,9 @@ object Form1: TForm1
|
||||
TabOrder = 2
|
||||
end
|
||||
object ButtonUpdateAll: TButton
|
||||
Left = 395
|
||||
Left = 362
|
||||
Height = 25
|
||||
Top = 426
|
||||
Top = 468
|
||||
Width = 122
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.InnerBorder = 4
|
||||
@ -115,9 +113,9 @@ object Form1: TForm1
|
||||
TabOrder = 3
|
||||
end
|
||||
object ButtonUpdateNew: TButton
|
||||
Left = 395
|
||||
Left = 362
|
||||
Height = 25
|
||||
Top = 390
|
||||
Top = 432
|
||||
Width = 122
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.InnerBorder = 4
|
||||
@ -127,9 +125,9 @@ object Form1: TForm1
|
||||
TabOrder = 4
|
||||
end
|
||||
object ButtonRefresh: TButton
|
||||
Left = 395
|
||||
Left = 362
|
||||
Height = 25
|
||||
Top = 312
|
||||
Top = 354
|
||||
Width = 122
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.InnerBorder = 4
|
||||
@ -138,10 +136,10 @@ object Form1: TForm1
|
||||
TabOrder = 5
|
||||
end
|
||||
object ListBox: TListBox
|
||||
Left = 12
|
||||
Height = 295
|
||||
Left = 11
|
||||
Height = 338
|
||||
Top = 156
|
||||
Width = 371
|
||||
Width = 344
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
MultiSelect = True
|
||||
OnDrawItem = ListBoxDrawItem
|
||||
@ -149,10 +147,10 @@ object Form1: TForm1
|
||||
TabOrder = 6
|
||||
end
|
||||
object CheckBoxBackup: TCheckBox
|
||||
Left = 395
|
||||
Height = 13
|
||||
Left = 362
|
||||
Height = 19
|
||||
Top = 222
|
||||
Width = 114
|
||||
Width = 120
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Backup FPDoc files'
|
||||
Checked = True
|
||||
@ -160,16 +158,16 @@ object Form1: TForm1
|
||||
TabOrder = 7
|
||||
end
|
||||
object EditBackup: TEdit
|
||||
Left = 407
|
||||
Left = 380
|
||||
Height = 23
|
||||
Top = 270
|
||||
Top = 276
|
||||
Width = 80
|
||||
Anchors = [akTop, akRight]
|
||||
TabOrder = 8
|
||||
Text = 'bak'
|
||||
end
|
||||
object EditPackage: TEdit
|
||||
Left = 407
|
||||
Left = 380
|
||||
Height = 23
|
||||
Top = 186
|
||||
Width = 80
|
||||
@ -181,7 +179,7 @@ object Form1: TForm1
|
||||
Left = 125
|
||||
Height = 23
|
||||
Top = 120
|
||||
Width = 347
|
||||
Width = 320
|
||||
FileName = 'D:\Projects\fpcbeta\bin\i386-win32\makeskel'
|
||||
ButtonWidth = 45
|
||||
NumGlyphs = 1
|
||||
@ -193,22 +191,31 @@ object Form1: TForm1
|
||||
Left = 125
|
||||
Height = 23
|
||||
Top = 84
|
||||
Width = 348
|
||||
Width = 321
|
||||
Directory = 'D:\Projects\Lazarus\LCL\Include'
|
||||
OnAcceptDirectory = EditIncludeAcceptDirectory
|
||||
ButtonWidth = 45
|
||||
NumGlyphs = 1
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
ParentColor = False
|
||||
TabOrder = 11
|
||||
OnEditingDone = EditDocsEditingDone
|
||||
end
|
||||
object StatusBar: TStatusBar
|
||||
Height = 20
|
||||
Top = 464
|
||||
Width = 531
|
||||
Top = 507
|
||||
Width = 504
|
||||
Panels = <>
|
||||
end
|
||||
object CheckBoxShowSummary: TCheckBox
|
||||
Left = 362
|
||||
Height = 19
|
||||
Top = 312
|
||||
Width = 97
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Show summary'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 12
|
||||
end
|
||||
object OpenDialog: TOpenDialog
|
||||
Title = 'Open FPDoc file'
|
||||
DefaultExt = '.xml'
|
||||
|
@ -1,68 +1,67 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TForm1','FORMDATA',[
|
||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#253#0#6'Height'#3#228#1#3'Top'#3#156#0#5
|
||||
+'Width'#3#19#2#18'HorzScrollBar.Page'#3#18#2#18'VertScrollBar.Page'#3#227#1
|
||||
+#13'ActiveControl'#7#8'EditDocs'#7'Caption'#6#13'FPDoc Updater'#12'ClientHei'
|
||||
+'ght'#3#228#1#11'ClientWidth'#3#19#2#21'Constraints.MinHeight'#3#208#1#20'Co'
|
||||
+'nstraints.MinWidth'#3','#1#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'F'
|
||||
+'ormDestroy'#6'OnShow'#7#8'FormShow'#0#6'TLabel'#9'LabelDocs'#4'Left'#2#12#6
|
||||
LazarusResources.Add('TFormMain','FORMDATA',[
|
||||
'TPF0'#9'TFormMain'#8'FormMain'#4'Left'#3#253#0#6'Height'#3#15#2#3'Top'#3#156
|
||||
+#0#5'Width'#3#248#1#18'HorzScrollBar.Page'#3#247#1#18'VertScrollBar.Page'#3
|
||||
+#14#2#13'ActiveControl'#7#8'EditDocs'#7'Caption'#6#13'FPDoc Updater'#12'Clie'
|
||||
+'ntHeight'#3#15#2#11'ClientWidth'#3#248#1#21'Constraints.MinHeight'#3#13#2#20
|
||||
+'Constraints.MinWidth'#3','#1#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11
|
||||
+'FormDestroy'#6'OnShow'#7#8'FormShow'#0#6'TLabel'#9'LabelDocs'#4'Left'#2#12#6
|
||||
+'Height'#2#14#3'Top'#2#18#5'Width'#2'R'#7'Caption'#6#17'FPDoc files path:'#11
|
||||
+'ParentColor'#8#0#0#6'TLabel'#10'LabelUnits'#4'Left'#2#12#6'Height'#2#14#3'T'
|
||||
+'op'#2'3'#5'Width'#2'6'#7'Caption'#6#11'Units path:'#11'ParentColor'#8#0#0#6
|
||||
+'TLabel'#11'LabelBackup'#4'Left'#3#139#1#6'Height'#2#14#3'Top'#3#246#0#5'Wid'
|
||||
+'th'#2'Y'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#17'Backup extensi'
|
||||
+'on:'#11'ParentColor'#8#0#0#6'TLabel'#12'LabelPackage'#4'Left'#3#139#1#6'Hei'
|
||||
+'ght'#2#14#3'Top'#3#161#0#5'Width'#2'-'#7'Anchors'#11#5'akTop'#7'akRight'#0#7
|
||||
+'TLabel'#11'LabelBackup'#4'Left'#3'|'#1#6'Height'#2#14#3'Top'#3#252#0#5'Widt'
|
||||
+'h'#2'Y'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#17'Backup extensio'
|
||||
+'n:'#11'ParentColor'#8#0#0#6'TLabel'#12'LabelPackage'#4'Left'#3'p'#1#6'Heigh'
|
||||
+'t'#2#14#3'Top'#3#161#0#5'Width'#2'-'#7'Anchors'#11#5'akTop'#7'akRight'#0#7
|
||||
+'Caption'#6#8'Package:'#11'ParentColor'#8#0#0#6'TLabel'#13'LabelMakeSkel'#4
|
||||
+'Left'#2#11#6'Height'#2#14#3'Top'#2'|'#5'Width'#2'_'#7'Caption'#6#19'MakeSke'
|
||||
+'l tool path:'#11'ParentColor'#8#0#0#6'TLabel'#12'LabelInclude'#4'Left'#2#11
|
||||
+#6'Height'#2#14#3'Top'#2'Z'#5'Width'#2'W'#7'Caption'#6#19'Include files path'
|
||||
+':'#11'ParentColor'#8#0#0#14'TDirectoryEdit'#8'EditDocs'#4'Left'#2'~'#6'Heig'
|
||||
+'ht'#2#23#3'Top'#2#12#5'Width'#3'['#1#9'Directory'#6'!D:\Projects\Lazarus\Do'
|
||||
+'cs\xml\lcl\'#17'OnAcceptDirectory'#7#23'EditDocsAcceptDirectory'#11'ButtonW'
|
||||
+'idth'#2'-'#9'NumGlyphs'#2#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#11
|
||||
+'ParentColor'#8#8'TabOrder'#2#0#13'OnEditingDone'#7#19'EditDocsEditingDone'#0
|
||||
+#0#14'TDirectoryEdit'#9'EditUnits'#4'Left'#2'~'#6'Height'#2#23#3'Top'#2'0'#5
|
||||
+'Width'#3'['#1#9'Directory'#6#24'D:\Projects\Lazarus\LCL\'#17'OnAcceptDirect'
|
||||
+'ory'#7#24'EditUnitsAcceptDirectory'#11'ButtonWidth'#2'-'#9'NumGlyphs'#2#1#7
|
||||
+'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#11'ParentColor'#8#8'TabOrder'#2
|
||||
+#1#13'OnEditingDone'#7#19'EditDocsEditingDone'#0#0#7'TButton'#12'ButtonUpdat'
|
||||
+'e'#4'Left'#3#139#1#6'Height'#2#25#3'Top'#3'b'#1#5'Width'#2'z'#7'Anchors'#11
|
||||
+#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#6'Upda'
|
||||
+'te'#7'OnClick'#7#17'ButtonUpdateClick'#8'TabOrder'#2#2#0#0#7'TButton'#15'Bu'
|
||||
+'ttonUpdateAll'#4'Left'#3#139#1#6'Height'#2#25#3'Top'#3#170#1#5'Width'#2'z'#7
|
||||
+'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4#7'Capti'
|
||||
+'on'#6#10'Update All'#7'OnClick'#7#20'ButtonUpdateAllClick'#8'TabOrder'#2#3#0
|
||||
+#0#7'TButton'#15'ButtonUpdateNew'#4'Left'#3#139#1#6'Height'#2#25#3'Top'#3#134
|
||||
+#1#5'Width'#2'z'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerB'
|
||||
+'order'#2#4#7'Caption'#6#10'Update New'#10'Font.Color'#7#5'clRed'#7'OnClick'
|
||||
+#7#20'ButtonUpdateNewClick'#8'TabOrder'#2#4#0#0#7'TButton'#13'ButtonRefresh'
|
||||
+#4'Left'#3#139#1#6'Height'#2#25#3'Top'#3'8'#1#5'Width'#2'z'#7'Anchors'#11#5
|
||||
+'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#7'Refres'
|
||||
+'h'#7'OnClick'#7#18'ButtonRefreshClick'#8'TabOrder'#2#5#0#0#8'TListBox'#7'Li'
|
||||
+'stBox'#4'Left'#2#12#6'Height'#3''''#1#3'Top'#3#156#0#5'Width'#3's'#1#7'Anch'
|
||||
+'ors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#11'MultiSelect'#9#10'On'
|
||||
+'DrawItem'#7#15'ListBoxDrawItem'#5'Style'#7#16'lbOwnerDrawFixed'#8'TabOrder'
|
||||
+#2#6#0#0#9'TCheckBox'#14'CheckBoxBackup'#4'Left'#3#139#1#6'Height'#2#13#3'To'
|
||||
+'p'#3#222#0#5'Width'#2'r'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#18
|
||||
+'Backup FPDoc files'#7'Checked'#9#5'State'#7#9'cbChecked'#8'TabOrder'#2#7#0#0
|
||||
+#5'TEdit'#10'EditBackup'#4'Left'#3#151#1#6'Height'#2#23#3'Top'#3#14#1#5'Widt'
|
||||
+'h'#2'P'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'TabOrder'#2#8#4'Text'#6#3'bak'
|
||||
+#0#0#5'TEdit'#11'EditPackage'#4'Left'#3#151#1#6'Height'#2#23#3'Top'#3#186#0#5
|
||||
+'Width'#2'P'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'TabOrder'#2#9#4'Text'#6#3
|
||||
+'LCL'#0#0#13'TFileNameEdit'#12'EditMakeSkel'#4'Left'#2'}'#6'Height'#2#23#3'T'
|
||||
+'op'#2'x'#5'Width'#3'['#1#8'FileName'#6'+D:\Projects\fpcbeta\bin\i386-win32\'
|
||||
+'makeskel'#11'ButtonWidth'#2'-'#9'NumGlyphs'#2#1#7'Anchors'#11#5'akTop'#6'ak'
|
||||
+'Left'#7'akRight'#0#11'ParentColor'#8#8'TabOrder'#2#10#0#0#14'TDirectoryEdit'
|
||||
+#11'EditInclude'#4'Left'#2'}'#6'Height'#2#23#3'Top'#2'T'#5'Width'#3'\'#1#9'D'
|
||||
+'irectory'#6#31'D:\Projects\Lazarus\LCL\Include'#17'OnAcceptDirectory'#7#26
|
||||
+'EditIncludeAcceptDirectory'#11'ButtonWidth'#2'-'#9'NumGlyphs'#2#1#7'Anchors'
|
||||
+#11#5'akTop'#6'akLeft'#7'akRight'#0#11'ParentColor'#8#8'TabOrder'#2#11#13'On'
|
||||
+'EditingDone'#7#19'EditDocsEditingDone'#0#0#10'TStatusBar'#9'StatusBar'#6'He'
|
||||
+'ight'#2#20#3'Top'#3#208#1#5'Width'#3#19#2#6'Panels'#14#0#0#0#11'TOpenDialog'
|
||||
+#10'OpenDialog'#5'Title'#6#15'Open FPDoc file'#10'DefaultExt'#6#4'.xml'#6'Fi'
|
||||
+'lter'#6'&FPDoc file (*.xml)|*.xml|All files|*.*'#7'Options'#11#15'ofFileMus'
|
||||
+'tExist'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#2#24#3'top'#3#168#0#0
|
||||
+#0#0
|
||||
+'ht'#2#23#3'Top'#2#12#5'Width'#3'@'#1#9'Directory'#6'!D:\Projects\Lazarus\Do'
|
||||
+'cs\xml\lcl\'#11'ButtonWidth'#2'-'#9'NumGlyphs'#2#1#7'Anchors'#11#5'akTop'#6
|
||||
+'akLeft'#7'akRight'#0#11'ParentColor'#8#8'TabOrder'#2#0#8'OnChange'#7#14'Edi'
|
||||
+'tDocsChange'#0#0#14'TDirectoryEdit'#9'EditUnits'#4'Left'#2'~'#6'Height'#2#23
|
||||
+#3'Top'#2'0'#5'Width'#3'@'#1#9'Directory'#6#24'D:\Projects\Lazarus\LCL\'#11
|
||||
+'ButtonWidth'#2'-'#9'NumGlyphs'#2#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRig'
|
||||
+'ht'#0#11'ParentColor'#8#8'TabOrder'#2#1#8'OnChange'#7#15'EditUnitsChange'#0
|
||||
+#0#7'TButton'#12'ButtonUpdate'#4'Left'#3'j'#1#6'Height'#2#25#3'Top'#3#140#1#5
|
||||
+'Width'#2'z'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorde'
|
||||
+'r'#2#4#7'Caption'#6#6'Update'#7'OnClick'#7#17'ButtonUpdateClick'#8'TabOrder'
|
||||
+#2#2#0#0#7'TButton'#15'ButtonUpdateAll'#4'Left'#3'j'#1#6'Height'#2#25#3'Top'
|
||||
+#3#212#1#5'Width'#2'z'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.'
|
||||
+'InnerBorder'#2#4#7'Caption'#6#10'Update All'#7'OnClick'#7#20'ButtonUpdateAl'
|
||||
+'lClick'#8'TabOrder'#2#3#0#0#7'TButton'#15'ButtonUpdateNew'#4'Left'#3'j'#1#6
|
||||
+'Height'#2#25#3'Top'#3#176#1#5'Width'#2'z'#7'Anchors'#11#5'akTop'#7'akRight'
|
||||
+#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#10'Update New'#10'Font.Col'
|
||||
+'or'#7#5'clRed'#7'OnClick'#7#20'ButtonUpdateNewClick'#8'TabOrder'#2#4#0#0#7
|
||||
+'TButton'#13'ButtonRefresh'#4'Left'#3'j'#1#6'Height'#2#25#3'Top'#3'b'#1#5'Wi'
|
||||
+'dth'#2'z'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'
|
||||
+#2#4#7'Caption'#6#7'Refresh'#7'OnClick'#7#18'ButtonRefreshClick'#8'TabOrder'
|
||||
+#2#5#0#0#8'TListBox'#7'ListBox'#4'Left'#2#11#6'Height'#3'R'#1#3'Top'#3#156#0
|
||||
+#5'Width'#3'X'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#11
|
||||
+'MultiSelect'#9#10'OnDrawItem'#7#15'ListBoxDrawItem'#5'Style'#7#16'lbOwnerDr'
|
||||
+'awFixed'#8'TabOrder'#2#6#0#0#9'TCheckBox'#14'CheckBoxBackup'#4'Left'#3'j'#1
|
||||
+#6'Height'#2#19#3'Top'#3#222#0#5'Width'#2'x'#7'Anchors'#11#5'akTop'#7'akRigh'
|
||||
+'t'#0#7'Caption'#6#18'Backup FPDoc files'#7'Checked'#9#5'State'#7#9'cbChecke'
|
||||
+'d'#8'TabOrder'#2#7#0#0#5'TEdit'#10'EditBackup'#4'Left'#3'|'#1#6'Height'#2#23
|
||||
+#3'Top'#3#20#1#5'Width'#2'P'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'TabOrder'
|
||||
+#2#8#4'Text'#6#3'bak'#0#0#5'TEdit'#11'EditPackage'#4'Left'#3'|'#1#6'Height'#2
|
||||
+#23#3'Top'#3#186#0#5'Width'#2'P'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'TabOr'
|
||||
+'der'#2#9#4'Text'#6#3'LCL'#0#0#13'TFileNameEdit'#12'EditMakeSkel'#4'Left'#2
|
||||
+'}'#6'Height'#2#23#3'Top'#2'x'#5'Width'#3'@'#1#8'FileName'#6'+D:\Projects\fp'
|
||||
+'cbeta\bin\i386-win32\makeskel'#11'ButtonWidth'#2'-'#9'NumGlyphs'#2#1#7'Anch'
|
||||
+'ors'#11#5'akTop'#6'akLeft'#7'akRight'#0#11'ParentColor'#8#8'TabOrder'#2#10#0
|
||||
+#0#14'TDirectoryEdit'#11'EditInclude'#4'Left'#2'}'#6'Height'#2#23#3'Top'#2'T'
|
||||
+#5'Width'#3'A'#1#9'Directory'#6#31'D:\Projects\Lazarus\LCL\Include'#11'Butto'
|
||||
+'nWidth'#2'-'#9'NumGlyphs'#2#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0
|
||||
+#11'ParentColor'#8#8'TabOrder'#2#11#0#0#10'TStatusBar'#9'StatusBar'#6'Height'
|
||||
+#2#20#3'Top'#3#251#1#5'Width'#3#248#1#6'Panels'#14#0#0#0#9'TCheckBox'#19'Che'
|
||||
+'ckBoxShowSummary'#4'Left'#3'j'#1#6'Height'#2#19#3'Top'#3'8'#1#5'Width'#2'a'
|
||||
+#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#12'Show summary'#7'Checked'
|
||||
+#9#5'State'#7#9'cbChecked'#8'TabOrder'#2#12#0#0#11'TOpenDialog'#10'OpenDialo'
|
||||
+'g'#5'Title'#6#15'Open FPDoc file'#10'DefaultExt'#6#4'.xml'#6'Filter'#6'&FPD'
|
||||
+'oc file (*.xml)|*.xml|All files|*.*'#7'Options'#11#15'ofFileMustExist'#14'o'
|
||||
+'fEnableSizing'#12'ofViewDetail'#0#4'left'#2#24#3'top'#3#168#0#0#0#0
|
||||
]);
|
||||
|
@ -29,17 +29,18 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
FPDocFiles, StdCtrls, ComCtrls, Masks, FileUtil, ExtCtrls,
|
||||
LCLIntf, LCLType, LCLProc, Process, EditBtn, XMLCfg;
|
||||
LCLIntf, LCLType, LCLProc, Process, EditBtn, Laz_XMLCfg;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
{ TFormMain }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
TFormMain = class(TForm)
|
||||
ButtonRefresh: TButton;
|
||||
ButtonUpdateNew: TButton;
|
||||
ButtonUpdate: TButton;
|
||||
ButtonUpdateAll: TButton;
|
||||
CheckBoxShowSummary: TCheckBox;
|
||||
CheckBoxBackup: TCheckBox;
|
||||
EditInclude: TDirectoryEdit;
|
||||
EditMakeSkel: TFileNameEdit;
|
||||
@ -61,10 +62,8 @@ type
|
||||
procedure ButtonUpdateAllClick(Sender: TObject);
|
||||
procedure ButtonUpdateClick(Sender: TObject);
|
||||
procedure ButtonUpdateNewClick(Sender: TObject);
|
||||
procedure EditDocsAcceptDirectory(Sender: TObject; var Value: String);
|
||||
procedure EditDocsEditingDone(Sender: TObject);
|
||||
procedure EditIncludeAcceptDirectory(Sender: TObject; var Value: String);
|
||||
procedure EditUnitsAcceptDirectory(Sender: TObject; var Value: String);
|
||||
procedure EditDocsChange(Sender: TObject);
|
||||
procedure EditUnitsChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
@ -82,18 +81,18 @@ type
|
||||
|
||||
procedure MoveElement(const SrcPackage: TFPDocPackage;
|
||||
const SrcModule: TFPDocModule; const Src: TFPDocElement;
|
||||
const DestList: TStrings; var Dest: String);
|
||||
const DestList: TStrings; var Dest: Integer);
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
FormMain: TFormMain;
|
||||
XMLConfig: TXMLConfig;
|
||||
BackupList: TStringList;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UnitMove;
|
||||
UnitMove, UnitSummary;
|
||||
|
||||
function FindFiles(const Path, Mask: String; WithPath: Boolean = True;
|
||||
WithExt: Boolean = True): TStringList;
|
||||
@ -124,14 +123,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TForm1 }
|
||||
{ TFormMain }
|
||||
|
||||
procedure TForm1.FormShow(Sender: TObject);
|
||||
procedure TFormMain.FormShow(Sender: TObject);
|
||||
begin
|
||||
UpdateList;
|
||||
end;
|
||||
|
||||
procedure TForm1.ListBoxDrawItem(Control: TWinControl; Index: Integer;
|
||||
procedure TFormMain.ListBoxDrawItem(Control: TWinControl; Index: Integer;
|
||||
ARect: TRect; State: TOwnerDrawState);
|
||||
begin
|
||||
if (Index < 0) or (Index >= ListBox.Items.Count) then Exit;
|
||||
@ -150,18 +149,18 @@ begin
|
||||
end;
|
||||
|
||||
FillRect(ARect);
|
||||
TextRect(ARect, ARect.Left + 8, ARect.Top, ExtractFileNameOnly(ListBox.Items[Index]));
|
||||
TextRect(ARect, ARect.Left + 8, ARect.Top + 2, ExtractFileNameOnly(ListBox.Items[Index]));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.BeginUpdate;
|
||||
procedure TFormMain.BeginUpdate;
|
||||
begin
|
||||
BackupList := TStringList.Create;
|
||||
BackupList.Sorted := True;
|
||||
WriteStatus('Updating started.');
|
||||
end;
|
||||
|
||||
procedure TForm1.EndUpdate;
|
||||
procedure TFormMain.EndUpdate;
|
||||
begin
|
||||
BackupList.Free;
|
||||
UpdateList;
|
||||
@ -170,12 +169,12 @@ begin
|
||||
WriteStatus('');
|
||||
end;
|
||||
|
||||
procedure TForm1.ButtonRefreshClick(Sender: TObject);
|
||||
procedure TFormMain.ButtonRefreshClick(Sender: TObject);
|
||||
begin
|
||||
UpdateList;
|
||||
end;
|
||||
|
||||
procedure TForm1.ButtonUpdateAllClick(Sender: TObject);
|
||||
procedure TFormMain.ButtonUpdateAllClick(Sender: TObject);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
@ -188,7 +187,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.ButtonUpdateClick(Sender: TObject);
|
||||
procedure TFormMain.ButtonUpdateClick(Sender: TObject);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
@ -201,7 +200,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.ButtonUpdateNewClick(Sender: TObject);
|
||||
procedure TFormMain.ButtonUpdateNewClick(Sender: TObject);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
@ -214,50 +213,33 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.EditDocsAcceptDirectory(Sender: TObject; var Value: String);
|
||||
procedure TFormMain.EditDocsChange(Sender: TObject);
|
||||
begin
|
||||
EditDocs.Directory := AppendPathDelim(Value);
|
||||
EditDocs.SetFocus;
|
||||
UpdateList;
|
||||
Value := '';
|
||||
if DirectoryExists(EditDocs.Text) then UpdateList;
|
||||
end;
|
||||
|
||||
procedure TForm1.EditDocsEditingDone(Sender: TObject);
|
||||
procedure TFormMain.EditUnitsChange(Sender: TObject);
|
||||
begin
|
||||
UpdateList;
|
||||
if DirectoryExists(EditUnits.Text) then UpdateList;
|
||||
end;
|
||||
|
||||
procedure TForm1.EditIncludeAcceptDirectory(Sender: TObject; var Value: String);
|
||||
procedure TFormMain.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Value := AppendPathDelim(Value);
|
||||
end;
|
||||
XMLConfig := TXMLConfig.Create('FPDocUpdater.xml');
|
||||
|
||||
procedure TForm1.EditUnitsAcceptDirectory(Sender: TObject; var Value: String);
|
||||
begin
|
||||
EditUnits.Directory := AppendPathDelim(Value);
|
||||
EditUnits.SetFocus;
|
||||
UpdateList;
|
||||
Value := '';
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
XMLConfig := TXMLConfig.Create(nil);
|
||||
XMLConfig.RootName := 'Config';
|
||||
XMLConfig.Filename := 'FPDocUpdater.xml';
|
||||
|
||||
EditDocs.Directory := XMLConfig.GetValue('FPDocsPath/Value', 'D:\Projects\lazarus\docs\xml\lcl\');
|
||||
EditUnits.Directory := XMLConfig.GetValue('UnitsPath/Value', 'D:\Projects\lazarus\lcl\');
|
||||
EditInclude.Directory := XMLConfig.GetValue('IncludePath/Value', 'D:\Projects\lazarus\lcl\include\');
|
||||
EditMakeSkel.FileName := XMLConfig.GetValue('MakeSkelPath/Value', 'D:\Projects\fpcbeta\bin\i386-win32\makeskel.exe');
|
||||
EditDocs.Directory := XMLConfig.GetValue('FPDocsPath/Value', 'E:\lazarus\docs\xml\lcl\');
|
||||
EditUnits.Directory := XMLConfig.GetValue('UnitsPath/Value', 'E:\lazarus\lcl\');
|
||||
EditInclude.Directory := XMLConfig.GetValue('IncludePath/Value', 'E:\lazarus\lcl\include\');
|
||||
EditMakeSkel.FileName := XMLConfig.GetValue('MakeSkelPath/Value', 'E:\lazarus\fpc\2.2.1\bin\i386-win32\makeskel.exe');
|
||||
CheckBoxBackup.Checked := XMLConfig.GetValue('BackupFPDocs/Value', True);
|
||||
EditBackup.Text := XMLConfig.GetValue('BackupExt/Value', 'bak');
|
||||
EditPackage.Text := XMLConfig.GetValue('Package/Value', 'LCL');
|
||||
end;
|
||||
|
||||
procedure TForm1.FormDestroy(Sender: TObject);
|
||||
procedure TFormMain.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
XMLConfig.Clear;
|
||||
|
||||
XMLConfig.SetValue('FPDocsPath/Value', EditDocs.Directory);
|
||||
XMLConfig.SetValue('UnitsPath/Value', EditUnits.Directory);
|
||||
XMLConfig.SetValue('IncludePath/Value', EditInclude.Directory);
|
||||
@ -269,9 +251,10 @@ begin
|
||||
XMLConfig.Free;
|
||||
end;
|
||||
|
||||
procedure TForm1.UpdateList;
|
||||
procedure TFormMain.UpdateList;
|
||||
var
|
||||
Docs, Units: TStringList;
|
||||
DocsPath, UnitsPath: String;
|
||||
I: Integer;
|
||||
N: String;
|
||||
State: Integer;
|
||||
@ -279,9 +262,12 @@ begin
|
||||
ListBox.Items.BeginUpdate;
|
||||
try
|
||||
ListBox.Items.Clear;
|
||||
|
||||
Docs := FindFiles(EditDocs.Directory, '*.xml', False, False);
|
||||
Units := FindFiles(EditUnits.Directory, '*.pas;*.pp');
|
||||
|
||||
DocsPath := AppendPathDelim(EditDocs.Directory);
|
||||
UnitsPath := AppendPathDelim(EditUnits.Directory);
|
||||
|
||||
Docs := FindFiles(DocsPath, '*.xml', False, False);
|
||||
Units := FindFiles(UnitsPath, '*.pas;*.pp');
|
||||
try
|
||||
Units.Sorted := True;
|
||||
for I := 0 to Units.Count - 1 do
|
||||
@ -301,7 +287,6 @@ begin
|
||||
finally
|
||||
ListBox.Items.EndUpdate;
|
||||
end;
|
||||
ListBox.SetFocus;
|
||||
end;
|
||||
|
||||
procedure ShowError(const S: String);
|
||||
@ -310,7 +295,7 @@ begin
|
||||
raise Exception.Create(S);
|
||||
end;
|
||||
|
||||
procedure TForm1.UpdateFile(const AFileName: String);
|
||||
procedure TFormMain.UpdateFile(const AFileName: String);
|
||||
var
|
||||
DocFileName: String;
|
||||
MakeSkelPath: String;
|
||||
@ -334,7 +319,7 @@ begin
|
||||
if not FileIsExecutable(MakeSkelPath) then
|
||||
ShowError('Unable to find MakeSkel tool executable "' + EditMakeSkel.Text +'"!');
|
||||
|
||||
DocFileName := EditDocs.Directory + ExtractFileNameOnly(AFileName) + '.xml';
|
||||
DocFileName := AppendPathDelim(EditDocs.Directory) + ExtractFileNameOnly(AFileName) + '.xml';
|
||||
|
||||
if CheckBoxBackup.Checked then BackupFile(DocFileName);
|
||||
|
||||
@ -367,6 +352,11 @@ begin
|
||||
M.SetSize(BytesRead);
|
||||
|
||||
AStringList.LoadFromStream(M);
|
||||
|
||||
while (AStringList.Count > 0) and
|
||||
(AStringList.Strings[AStringList.Count - 1] = '') do
|
||||
AStringList.Delete(AStringList.Count - 1);
|
||||
|
||||
if AStringList.Strings[AStringList.Count - 1] <> 'Done.' then
|
||||
begin
|
||||
ShowError('Update ' + AFileName + ' failed! ' + AStringList.Strings[AStringList.Count - 1]);
|
||||
@ -383,15 +373,42 @@ begin
|
||||
NewDoc := TFPDocFile.Create(M);
|
||||
if FileExists(DocFileName) then OldDoc := TFPDocFile.Create(DocFileName)
|
||||
else OldDoc := nil;
|
||||
|
||||
try
|
||||
if OldDoc <> nil then OldDoc.AssignToSkeleton(NewDoc, @MoveElement);
|
||||
NewDoc.SaveToFile(DocFileName);
|
||||
if OldDoc <> nil then
|
||||
begin
|
||||
FormSummary.OldInfo := OldDoc.GetInfo;
|
||||
OldDoc.AssignToSkeleton(NewDoc, @MoveElement);
|
||||
FormSummary.NewInfo := NewDoc.GetInfo;
|
||||
end
|
||||
else
|
||||
begin
|
||||
FormSummary.OldInfo := EmptyFPDocInfo;
|
||||
FormSummary.NewInfo := NewDoc.GetInfo;
|
||||
end;
|
||||
|
||||
if CheckBoxShowSummary.Checked then
|
||||
begin
|
||||
FormSummary.LabelFileName.Caption := DocFileName;
|
||||
if FormSummary.ShowModal = mrOk then
|
||||
begin
|
||||
NewDoc.SaveToFile(DocFileName);
|
||||
WriteStatus('Update ' + AFileName + ' to ' + DocFileName + ' succeeds!');
|
||||
end
|
||||
else
|
||||
WriteStatus('Update ' + AFileName + ' to ' + DocFileName + ' cancelled!');
|
||||
end
|
||||
else
|
||||
begin
|
||||
NewDoc.SaveToFile(DocFileName);
|
||||
WriteStatus('Update ' + AFileName + ' to ' + DocFileName + ' succeeds!');
|
||||
end;
|
||||
|
||||
finally
|
||||
if OldDoc <> nil then OldDoc.Free;
|
||||
NewDoc.Free;
|
||||
end;
|
||||
|
||||
WriteStatus('Update ' + AFileName + ' in ' + DocFileName + ' succeeds!');
|
||||
|
||||
finally
|
||||
M.Free;
|
||||
AStringList.Free;
|
||||
@ -399,7 +416,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.BackupFile(const AFileName: String);
|
||||
procedure TFormMain.BackupFile(const AFileName: String);
|
||||
var
|
||||
BackupFileName: String;
|
||||
begin
|
||||
@ -419,52 +436,47 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.WriteStatus(const S: String);
|
||||
procedure TFormMain.WriteStatus(const S: String);
|
||||
begin
|
||||
DebugLn(S);
|
||||
StatusBar.SimpleText := S;
|
||||
end;
|
||||
|
||||
procedure TForm1.MoveElement(const SrcPackage: TFPDocPackage;
|
||||
procedure TFormMain.MoveElement(const SrcPackage: TFPDocPackage;
|
||||
const SrcModule: TFPDocModule; const Src: TFPDocElement;
|
||||
const DestList: TStrings; var Dest: String);
|
||||
const DestList: TStrings; var Dest: Integer);
|
||||
var
|
||||
F: TFPDocFile;
|
||||
JumpList: TStringList;
|
||||
I: Integer;
|
||||
Prefix: String;
|
||||
begin
|
||||
FormMove.LabelSrc.Caption := Format('Package: %sModule: %s',
|
||||
[SrcPackage.Name + LineEnding, SrcModule.Name]);
|
||||
FormMove.LabelSrcElement.Caption := 'Element: ' + Src.Name;
|
||||
|
||||
FormMove.ComboBoxDest.Items.Assign(DestList);
|
||||
FormMove.ComboBoxDest.Sorted := True;
|
||||
JumpList := TStringList.Create;
|
||||
try
|
||||
for I := 0 to DestList.Count - 1 do
|
||||
begin
|
||||
if Pos('.', DestList[I]) = 0 then Continue;
|
||||
Prefix := Copy(DestList[I], 1, LastDelimiter('.', DestList[I]) - 1);
|
||||
if JumpList.IndexOf(Prefix) = -1 then JumpList.Add(Prefix);
|
||||
end;
|
||||
|
||||
FormMove.ComboBoxJump.Items.Assign(JumpList);
|
||||
finally
|
||||
JumpList.Free;
|
||||
end;
|
||||
|
||||
FormMove.ListBoxDest.Items.Assign(DestList);
|
||||
|
||||
case FormMove.ShowModal of
|
||||
mrYes:
|
||||
Dest := FormMove.ComboBoxDest.Text;
|
||||
mrCancel:
|
||||
begin // Move to another file
|
||||
OpenDialog.InitialDir := ExtractFileDir(EditDocs.Directory);
|
||||
if OpenDialog.Execute then
|
||||
begin
|
||||
if CheckBoxBackup.Checked then BackupFile(OpenDialog.FileName);
|
||||
|
||||
F := TFPDocFile.Create(OpenDialog.FileName);
|
||||
try
|
||||
F.PackagesByName[EditPackage.Text].Modules[0].Add(Src);
|
||||
F.SaveToFile(OpenDialog.FileName);
|
||||
|
||||
WriteStatus('Move Element: ' + SrcPackage.Name + '\' + SrcModule.Name +
|
||||
'\' + Src.Name + ' Dest file: ' + OpenDialog.FileName);
|
||||
Exit;
|
||||
finally
|
||||
F.Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
mrYes: Dest := FormMove.ListBoxDest.ItemIndex;
|
||||
end;
|
||||
|
||||
WriteStatus('Move Element: ' + SrcPackage.Name + '\' + SrcModule.Name + '\' + Src.Name +
|
||||
' Dest: ' + Dest);
|
||||
|
||||
if Dest <> -1 then
|
||||
WriteStatus('Move Element: ' + SrcPackage.Name + '\' + SrcModule.Name + '\' + Src.Name +
|
||||
' Dest: ' + DestList[Dest]);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -1,23 +1,24 @@
|
||||
object FormMove: TFormMove
|
||||
Left = 299
|
||||
Height = 235
|
||||
Height = 471
|
||||
Top = 153
|
||||
Width = 400
|
||||
HorzScrollBar.Page = 399
|
||||
VertScrollBar.Page = 234
|
||||
Width = 559
|
||||
HorzScrollBar.Page = 558
|
||||
VertScrollBar.Page = 470
|
||||
ActiveControl = ButtonYes
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'Move Element'
|
||||
ChildSizing.LeftRightSpacing = 10
|
||||
ChildSizing.TopBottomSpacing = 10
|
||||
ClientHeight = 235
|
||||
ClientWidth = 400
|
||||
ClientHeight = 471
|
||||
ClientWidth = 559
|
||||
object LabelSrc: TLabel
|
||||
Left = 10
|
||||
Height = 42
|
||||
Top = 66
|
||||
Width = 379
|
||||
Width = 538
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = False
|
||||
ParentColor = False
|
||||
end
|
||||
@ -31,16 +32,16 @@ object FormMove: TFormMove
|
||||
end
|
||||
object LabelSrcElement: TLabel
|
||||
Left = 10
|
||||
Height = 18
|
||||
Height = 20
|
||||
Top = 120
|
||||
Width = 42
|
||||
Width = 44
|
||||
Font.Style = [fsBold]
|
||||
ParentColor = False
|
||||
end
|
||||
object ButtonYes: TButton
|
||||
Left = 66
|
||||
Left = 384
|
||||
Height = 25
|
||||
Top = 199
|
||||
Top = 438
|
||||
Width = 75
|
||||
Anchors = [akRight, akBottom]
|
||||
BorderSpacing.InnerBorder = 4
|
||||
@ -49,9 +50,9 @@ object FormMove: TFormMove
|
||||
TabOrder = 0
|
||||
end
|
||||
object ButtonNo: TButton
|
||||
Left = 150
|
||||
Left = 473
|
||||
Height = 25
|
||||
Top = 199
|
||||
Top = 438
|
||||
Width = 75
|
||||
Anchors = [akRight, akBottom]
|
||||
BorderSpacing.InnerBorder = 4
|
||||
@ -63,30 +64,32 @@ object FormMove: TFormMove
|
||||
Left = 10
|
||||
Height = 42
|
||||
Top = 10
|
||||
Width = 380
|
||||
Width = 539
|
||||
Align = alTop
|
||||
Caption = 'The following FPDoc element is not present in the skeleton. Move its contents into different one?'
|
||||
Color = clBtnFace
|
||||
Font.Style = [fsBold]
|
||||
end
|
||||
object ComboBoxDest: TComboBox
|
||||
Left = 132
|
||||
Height = 21
|
||||
Top = 150
|
||||
Width = 258
|
||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
||||
ItemHeight = 13
|
||||
Style = csDropDownList
|
||||
object ListBoxDest: TListBox
|
||||
Left = 10
|
||||
Height = 246
|
||||
Top = 180
|
||||
Width = 538
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
OnDrawItem = ListBoxDestDrawItem
|
||||
Style = lbOwnerDrawFixed
|
||||
TabOrder = 2
|
||||
end
|
||||
object ButtonMove: TButton
|
||||
Left = 234
|
||||
Height = 25
|
||||
Top = 199
|
||||
Width = 155
|
||||
BorderSpacing.InnerBorder = 4
|
||||
Caption = 'Move to another file...'
|
||||
OnClick = ButtonMoveClick
|
||||
object ComboBoxJump: TComboBox
|
||||
Left = 240
|
||||
Height = 21
|
||||
Top = 153
|
||||
Width = 309
|
||||
Anchors = [akTop, akRight]
|
||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
||||
ItemHeight = 13
|
||||
OnSelect = ComboBoxJumpSelect
|
||||
Style = csDropDownList
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
|
@ -1,31 +1,33 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TFormMove','FORMDATA',[
|
||||
'TPF0'#9'TFormMove'#8'FormMove'#4'Left'#3'+'#1#6'Height'#3#235#0#3'Top'#3#153
|
||||
+#0#5'Width'#3#144#1#18'HorzScrollBar.Page'#3#143#1#18'VertScrollBar.Page'#3
|
||||
+#234#0#13'ActiveControl'#7#9'ButtonYes'#11'BorderIcons'#11#12'biSystemMenu'
|
||||
+#10'biMinimize'#0#11'BorderStyle'#7#8'bsSingle'#7'Caption'#6#12'Move Element'
|
||||
+#28'ChildSizing.LeftRightSpacing'#2#10#28'ChildSizing.TopBottomSpacing'#2#10
|
||||
+#12'ClientHeight'#3#235#0#11'ClientWidth'#3#144#1#0#6'TLabel'#8'LabelSrc'#4
|
||||
+'Left'#2#10#6'Height'#2'*'#3'Top'#2'B'#5'Width'#3'{'#1#8'AutoSize'#8#11'Pare'
|
||||
+'ntColor'#8#0#0#6'TLabel'#9'LabelDest'#4'Left'#2#10#6'Height'#2#14#3'Top'#3
|
||||
+#156#0#5'Width'#2'd'#7'Caption'#6#20'Destination element:'#11'ParentColor'#8
|
||||
+#0#0#6'TLabel'#15'LabelSrcElement'#4'Left'#2#10#6'Height'#2#18#3'Top'#2'x'#5
|
||||
+'Width'#2'*'#10'Font.Style'#11#6'fsBold'#0#11'ParentColor'#8#0#0#7'TButton'#9
|
||||
+'ButtonYes'#4'Left'#2'B'#6'Height'#2#25#3'Top'#3#199#0#5'Width'#2'K'#7'Ancho'
|
||||
+'rs'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'
|
||||
+#6#3'Yes'#11'ModalResult'#2#6#8'TabOrder'#2#0#0#0#7'TButton'#8'ButtonNo'#4'L'
|
||||
+'eft'#3#150#0#6'Height'#2#25#3'Top'#3#199#0#5'Width'#2'K'#7'Anchors'#11#7'ak'
|
||||
+'Right'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#2'No'#11
|
||||
+'ModalResult'#2#7#8'TabOrder'#2#1#0#0#11'TStaticText'#10'StaticText'#4'Left'
|
||||
+#2#10#6'Height'#2'*'#3'Top'#2#10#5'Width'#3'|'#1#5'Align'#7#5'alTop'#7'Capti'
|
||||
+'on'#6'aThe following FPDoc element is not present in the skeleton. Move its'
|
||||
+' contents into different one?'#5'Color'#7#9'clBtnFace'#10'Font.Style'#11#6
|
||||
+'fsBold'#0#0#0#9'TComboBox'#12'ComboBoxDest'#4'Left'#3#132#0#6'Height'#2#21#3
|
||||
+'Top'#3#150#0#5'Width'#3#2#1#16'AutoCompleteText'#11#22'cbactEndOfLineComple'
|
||||
+'te'#20'cbactSearchAscending'#0#10'ItemHeight'#2#13#5'Style'#7#14'csDropDown'
|
||||
+'List'#8'TabOrder'#2#2#0#0#7'TButton'#10'ButtonMove'#4'Left'#3#234#0#6'Heigh'
|
||||
+'t'#2#25#3'Top'#3#199#0#5'Width'#3#155#0#25'BorderSpacing.InnerBorder'#2#4#7
|
||||
+'Caption'#6#23'Move to another file...'#7'OnClick'#7#15'ButtonMoveClick'#8'T'
|
||||
+'abOrder'#2#3#0#0#0
|
||||
'TPF0'#9'TFormMove'#8'FormMove'#4'Left'#3'+'#1#6'Height'#3#215#1#3'Top'#3#153
|
||||
+#0#5'Width'#3'/'#2#18'HorzScrollBar.Page'#3'.'#2#18'VertScrollBar.Page'#3#214
|
||||
+#1#13'ActiveControl'#7#9'ButtonYes'#11'BorderIcons'#11#12'biSystemMenu'#10'b'
|
||||
+'iMinimize'#0#11'BorderStyle'#7#8'bsSingle'#7'Caption'#6#12'Move Element'#28
|
||||
+'ChildSizing.LeftRightSpacing'#2#10#28'ChildSizing.TopBottomSpacing'#2#10#12
|
||||
+'ClientHeight'#3#215#1#11'ClientWidth'#3'/'#2#0#6'TLabel'#8'LabelSrc'#4'Left'
|
||||
+#2#10#6'Height'#2'*'#3'Top'#2'B'#5'Width'#3#26#2#7'Anchors'#11#5'akTop'#6'ak'
|
||||
+'Left'#7'akRight'#0#8'AutoSize'#8#11'ParentColor'#8#0#0#6'TLabel'#9'LabelDes'
|
||||
+'t'#4'Left'#2#10#6'Height'#2#14#3'Top'#3#156#0#5'Width'#2'd'#7'Caption'#6#20
|
||||
+'Destination element:'#11'ParentColor'#8#0#0#6'TLabel'#15'LabelSrcElement'#4
|
||||
+'Left'#2#10#6'Height'#2#20#3'Top'#2'x'#5'Width'#2','#10'Font.Style'#11#6'fsB'
|
||||
+'old'#0#11'ParentColor'#8#0#0#7'TButton'#9'ButtonYes'#4'Left'#3#128#1#6'Heig'
|
||||
+'ht'#2#25#3'Top'#3#182#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0
|
||||
+#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#3'Yes'#11'ModalResult'#2#6#8
|
||||
+'TabOrder'#2#0#0#0#7'TButton'#8'ButtonNo'#4'Left'#3#217#1#6'Height'#2#25#3'T'
|
||||
+'op'#3#182#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'BorderS'
|
||||
+'pacing.InnerBorder'#2#4#7'Caption'#6#2'No'#11'ModalResult'#2#7#8'TabOrder'#2
|
||||
+#1#0#0#11'TStaticText'#10'StaticText'#4'Left'#2#10#6'Height'#2'*'#3'Top'#2#10
|
||||
+#5'Width'#3#27#2#5'Align'#7#5'alTop'#7'Caption'#6'aThe following FPDoc eleme'
|
||||
+'nt is not present in the skeleton. Move its contents into different one?'#5
|
||||
+'Color'#7#9'clBtnFace'#10'Font.Style'#11#6'fsBold'#0#0#0#8'TListBox'#11'List'
|
||||
+'BoxDest'#4'Left'#2#10#6'Height'#3#246#0#3'Top'#3#180#0#5'Width'#3#26#2#7'An'
|
||||
+'chors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#10'OnDrawItem'#7#19'L'
|
||||
+'istBoxDestDrawItem'#5'Style'#7#16'lbOwnerDrawFixed'#8'TabOrder'#2#2#0#0#9'T'
|
||||
+'ComboBox'#12'ComboBoxJump'#4'Left'#3#240#0#6'Height'#2#21#3'Top'#3#153#0#5
|
||||
+'Width'#3'5'#1#7'Anchors'#11#5'akTop'#7'akRight'#0#16'AutoCompleteText'#11#22
|
||||
+'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#10'ItemHeight'#2#13#8'On'
|
||||
+'Select'#7#18'ComboBoxJumpSelect'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2
|
||||
+#3#0#0#0
|
||||
]);
|
||||
|
@ -28,22 +28,24 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
ExtCtrls;
|
||||
ExtCtrls, LCLType, LCLIntf;
|
||||
|
||||
type
|
||||
|
||||
{ TFormMove }
|
||||
|
||||
TFormMove = class(TForm)
|
||||
ButtonMove: TButton;
|
||||
ButtonYes: TButton;
|
||||
ButtonNo: TButton;
|
||||
ComboBoxDest: TComboBox;
|
||||
ComboBoxJump: TComboBox;
|
||||
LabelSrcElement: TLabel;
|
||||
LabelDest: TLabel;
|
||||
LabelSrc: TLabel;
|
||||
ListBoxDest: TListBox;
|
||||
StaticText: TStaticText;
|
||||
procedure ButtonMoveClick(Sender: TObject);
|
||||
procedure ComboBoxJumpSelect(Sender: TObject);
|
||||
procedure ListBoxDestDrawItem(Control: TWinControl; Index: Integer; ARect: TRect;
|
||||
State: TOwnerDrawState);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
@ -57,9 +59,32 @@ implementation
|
||||
|
||||
{ TFormMove }
|
||||
|
||||
procedure TFormMove.ButtonMoveClick(Sender: TObject);
|
||||
procedure TFormMove.ListBoxDestDrawItem(Control: TWinControl; Index: Integer; ARect: TRect;
|
||||
State: TOwnerDrawState);
|
||||
begin
|
||||
ModalResult := mrCancel;
|
||||
if (Index < 0) or (Index >= ListBoxDest.Items.Count) then Exit;
|
||||
|
||||
with ListBoxDest.Canvas do
|
||||
begin
|
||||
if odSelected in State then
|
||||
Brush.Color := clHighlight
|
||||
else
|
||||
begin
|
||||
Brush.Color := ListBoxDest.Color;
|
||||
case Integer(ListBoxDest.Items.Objects[Index]) of
|
||||
0: SetTextColor(ListBoxDest.Canvas.Handle, ListBoxDest.Canvas.Font.Color); // empty
|
||||
1: SetTextColor(ListBoxDest.Canvas.Handle, clRed); // nonempty
|
||||
end;
|
||||
end;
|
||||
|
||||
FillRect(ARect);
|
||||
TextRect(ARect, ARect.Left + 8, ARect.Top + 2, ListBoxDest.Items[Index]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFormMove.ComboBoxJumpSelect(Sender: TObject);
|
||||
begin
|
||||
ListBoxDest.ItemIndex := ListBoxDest.Items.IndexOf(ComboBoxJump.Text);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
49
doceditor/fpdocupdater/unitsummary.lfm
Normal file
49
doceditor/fpdocupdater/unitsummary.lfm
Normal file
@ -0,0 +1,49 @@
|
||||
object FormSummary: TFormSummary
|
||||
Left = 295
|
||||
Height = 273
|
||||
Top = 156
|
||||
Width = 303
|
||||
HorzScrollBar.Page = 302
|
||||
VertScrollBar.Page = 272
|
||||
ActiveControl = Button1
|
||||
Caption = 'Update Summary'
|
||||
ClientHeight = 273
|
||||
ClientWidth = 303
|
||||
object LabelFileName: TLabel
|
||||
Left = 10
|
||||
Height = 14
|
||||
Top = 11
|
||||
Width = 69
|
||||
Caption = 'LabelFileName'
|
||||
ParentColor = False
|
||||
end
|
||||
object PaintBox: TPaintBox
|
||||
Left = 12
|
||||
Height = 190
|
||||
Top = 42
|
||||
Width = 282
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
OnPaint = PaintBoxPaint
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 137
|
||||
Height = 25
|
||||
Top = 243
|
||||
Width = 75
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'OK'
|
||||
ModalResult = 1
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 221
|
||||
Height = 25
|
||||
Top = 243
|
||||
Width = 75
|
||||
Anchors = [akRight, akBottom]
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
15
doceditor/fpdocupdater/unitsummary.lrs
Normal file
15
doceditor/fpdocupdater/unitsummary.lrs
Normal file
@ -0,0 +1,15 @@
|
||||
LazarusResources.Add('TFormSummary','FORMDATA',[
|
||||
'TPF0'#12'TFormSummary'#11'FormSummary'#4'Left'#3''''#1#6'Height'#3#17#1#3'To'
|
||||
+'p'#3#156#0#5'Width'#3'/'#1#18'HorzScrollBar.Page'#3'.'#1#18'VertScrollBar.P'
|
||||
+'age'#3#16#1#13'ActiveControl'#7#7'Button1'#7'Caption'#6#14'Update Summary'
|
||||
+#12'ClientHeight'#3#17#1#11'ClientWidth'#3'/'#1#0#6'TLabel'#13'LabelFileName'
|
||||
+#4'Left'#2#10#6'Height'#2#14#3'Top'#2#11#5'Width'#2'E'#7'Caption'#6#13'Label'
|
||||
+'FileName'#11'ParentColor'#8#0#0#9'TPaintBox'#8'PaintBox'#4'Left'#2#12#6'Hei'
|
||||
+'ght'#3#190#0#3'Top'#2'*'#5'Width'#3#26#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||
+'akRight'#8'akBottom'#0#7'OnPaint'#7#13'PaintBoxPaint'#0#0#7'TButton'#7'Butt'
|
||||
+'on1'#4'Left'#3#137#0#6'Height'#2#25#3'Top'#3#243#0#5'Width'#2'K'#7'Anchors'
|
||||
+#11#7'akRight'#8'akBottom'#0#7'Caption'#6#2'OK'#11'ModalResult'#2#1#8'TabOrd'
|
||||
+'er'#2#0#0#0#7'TButton'#7'Button2'#4'Left'#3#221#0#6'Height'#2#25#3'Top'#3
|
||||
+#243#0#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#6'Cancel'#9#7'Ca'
|
||||
+'ption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#1#0#0#0
|
||||
]);
|
80
doceditor/fpdocupdater/unitsummary.pas
Normal file
80
doceditor/fpdocupdater/unitsummary.pas
Normal file
@ -0,0 +1,80 @@
|
||||
unit UnitSummary;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, FPDocFiles, StdCtrls, ExtCtrls,
|
||||
LCLIntf;
|
||||
|
||||
type
|
||||
|
||||
{ TFormSummary }
|
||||
|
||||
TFormSummary = class(TForm)
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
LabelFileName: TLabel;
|
||||
PaintBox: TPaintBox;
|
||||
procedure PaintBoxPaint(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
OldInfo, NewInfo: TFPDocInfo;
|
||||
end;
|
||||
|
||||
var
|
||||
FormSummary: TFormSummary;
|
||||
|
||||
implementation
|
||||
|
||||
{ TFormSummary }
|
||||
|
||||
procedure TFormSummary.PaintBoxPaint(Sender: TObject);
|
||||
var
|
||||
Y: Integer;
|
||||
|
||||
procedure AddItem(S: String; R: Integer);
|
||||
begin
|
||||
if R = 0 then Exit;
|
||||
if R > 0 then
|
||||
begin
|
||||
SetTextColor(PaintBox.Canvas.Handle, clGreen);
|
||||
PaintBox.Canvas.TextOut(4, Y, Format('Added ' + S + ': %d', [R]));
|
||||
end
|
||||
else
|
||||
begin
|
||||
SetTextColor(PaintBox.Canvas.Handle, clRed);
|
||||
PaintBox.Canvas.TextOut(4, Y, Format('Removed ' + S + ': %d', [-R]));
|
||||
end;
|
||||
|
||||
Inc(Y, PaintBox.Canvas.TextHeight('W') + 4);
|
||||
end;
|
||||
|
||||
begin
|
||||
Y := 4;
|
||||
|
||||
AddItem('packages', NewInfo.Packages - OldInfo.Packages);
|
||||
AddItem('modules', NewInfo.Modules - OldInfo.Modules);
|
||||
AddItem('topics', NewInfo.Topics - OldInfo.Topics);
|
||||
AddItem('elements', NewInfo.Elements - OldInfo.Elements);
|
||||
AddItem('non empty elements', NewInfo.ElementsNonEmpty - OldInfo.ElementsNonEmpty);
|
||||
AddItem('shorts', NewInfo.Shorts - OldInfo.Shorts);
|
||||
AddItem('descriptions', NewInfo.Descriptions - OldInfo.Descriptions);
|
||||
AddItem('errors', NewInfo.Errors - OldInfo.Errors);
|
||||
AddItem('see alsos', NewInfo.SeeAlsos - OldInfo.SeeAlsos);
|
||||
AddItem('examples', NewInfo.Examples - OldInfo.Examples);
|
||||
|
||||
if Y = 4 then
|
||||
begin
|
||||
SetTextColor(PaintBox.Canvas.Handle, clBlack);
|
||||
PaintBox.Canvas.TextOut(4, Y, 'No change was made!');
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I unitsummary.lrs}
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user