"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "unit_report.pas" between
peazip-7.9.0.src.zip and peazip-8.0.0.src.zip

About: PeaZip is an OS-portable graphical file archiver, acting as frontend for various open source archiving utilities (incl. its native Pea archive format).

unit_report.pas  (peazip-7.9.0.src):unit_report.pas  (peazip-8.0.0.src)
skipping to change at line 44 skipping to change at line 44
0.17 20080314 G.Tani Transparency made available for Win64 0.17 20080314 G.Tani Transparency made available for Win64
0.18 20080707 G.Tani Updated to work with utf8 LCL 0.18 20080707 G.Tani Updated to work with utf8 LCL
0.19 20080826 G.Tani Ask path for saving reports, default is desktop (or current path if desktop is not found) 0.19 20080826 G.Tani Ask path for saving reports, default is desktop (or current path if desktop is not found)
0.20 20081026 G.Tani Autosized/customisable GUI's items height; vario us graphic updates 0.20 20081026 G.Tani Autosized/customisable GUI's items height; vario us graphic updates
Form_report that can now close the application i f it is the only form needing to be shown Form_report that can now close the application i f it is the only form needing to be shown
0.21 20081118 G.Tani appdata fixed for Windows users with names conta ining extended characters 0.21 20081118 G.Tani appdata fixed for Windows users with names conta ining extended characters
filemode set to 0 before all reset file operatio ns to avoid possible lock situations (i.e. concurrent instances) filemode set to 0 before all reset file operatio ns to avoid possible lock situations (i.e. concurrent instances)
0.22 20091103 G.Tani New icons 0.22 20091103 G.Tani New icons
0.23 20101105 G.Tani Updated look and feel 0.23 20101105 G.Tani Updated look and feel
0.24 20200414 G.Tani New function to save crc/hash value(s) to file 0.24 20200414 G.Tani New function to save crc/hash value(s) to file
0.25 20210502 G.Tani Batch and hidden *_report modes now save report to output path without requiring user interaction
(C) Copyright 2006 Giorgio Tani giorgio.tani.software@gmail.com (C) Copyright 2006 Giorgio Tani giorgio.tani.software@gmail.com
The program is released under GNU LGPL http://www.gnu.org/licenses/lgpl.txt The program is released under GNU LGPL http://www.gnu.org/licenses/lgpl.txt
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version. version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
skipping to change at line 133 skipping to change at line 134
procedure StringGrid1MouseDown(Sender: TObject; Button: TMouseButton; procedure StringGrid1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer); Shift: TShiftState; X, Y: Integer);
procedure StringGrid2HeaderClick(Sender: TObject; IsColumn: Boolean; procedure StringGrid2HeaderClick(Sender: TObject; IsColumn: Boolean;
Index: Integer); Index: Integer);
private private
{ private declarations } { private declarations }
public public
{ public declarations } { public declarations }
end; end;
procedure save_report(s,reptype:ansistring); procedure save_report(s,reptype,modparam,out_path:ansistring);
var var
Form_report: TForm_report; Form_report: TForm_report;
t:text; t:text;
//theming //theming
conf:text; conf:text;
opacity,grid1index,grid2index:integer; opacity,grid1index,grid2index:integer;
confpath:ansistring; confpath:ansistring;
grid1switch,grid2switch:boolean; grid1switch,grid2switch:boolean;
executable_path,dummy,color1,color2,color3,color4,color5:string; executable_path,dummy,color1,color2,color3,color4,color5:string;
skipping to change at line 274 skipping to change at line 275
dp:=(Buf); dp:=(Buf);
CoTaskMemFree(pidl); CoTaskMemFree(pidl);
wingetdesk:=0; wingetdesk:=0;
end end
else CoTaskMemFree(pidl); else CoTaskMemFree(pidl);
except except
end; end;
{$ENDIF} {$ENDIF}
end; end;
procedure save_report(s,reptype:ansistring); procedure save_report(s,reptype,modparam,out_path:ansistring);
var var
x,y:dword; x,y:dword;
field_delim:string; field_delim:string;
p:ansistring; p:ansistring;
begin begin
if reptype='txt' then field_delim:=chr($09) if reptype='txt' then field_delim:=chr($09)
else field_delim:=';'; else field_delim:=';';
{$IFDEF MSWINDOWS}wingetdesk(p);{$ELSE}get_desktop_path(p);{$ENDIF}
if p[length(p)]<>directoryseparator then p:=p+directoryseparator; if upcase(modparam)='INTERACTIVE_REPORT' then //interactive
s:=formatdatetime('yyyymmdd_hh.nn.ss_',now)+s+'.'+reptype; begin
Form_report.SaveDialog1.FileName:=p+s; {$IFDEF MSWINDOWS}wingetdesk(p);{$ELSE}get_desktop_path(p);{$ENDIF}
if directoryexists(p) then Form_report.SaveDialog1.InitialDir:=p; if p[length(p)]<>directoryseparator then p:=p+directoryseparator;
if Form_report.SaveDialog1.Execute then s:=formatdatetime('yyyymmdd_hh.nn.ss_',now)+s+'.'+reptype;
Form_report.SaveDialog1.FileName:=p+s;
if directoryexists(p) then Form_report.SaveDialog1.InitialDir:=p;
if Form_report.SaveDialog1.Execute then s:=Form_report.SaveDialog1.FileName
else s:='';
end
else //batch or hidden, non interactive
begin
p:=out_path;
if p[length(p)]<>directoryseparator then p:=p+directoryseparator;
s:=formatdatetime('yyyymmdd_hh.nn.ss_',now)+s+'.'+reptype;
end;
if s<>'' then
begin begin
s:=Form_report.SaveDialog1.FileName;
assignfile(t,s); assignfile(t,s);
rewrite(t); rewrite(t);
write_header(t); write_header(t);
if Form_report.Caption<>'Hex preview' then if Form_report.Caption<>'Hex preview' then
begin begin
for x:=0 to Form_report.StringGrid1.RowCount-1 do for x:=0 to Form_report.StringGrid1.RowCount-1 do
begin begin
for y:=0 to Form_report.StringGrid1.ColCount-1 do for y:=0 to Form_report.StringGrid1.ColCount-1 do
if Form_report.StringGrid1.ColWidths[y]>0 then if Form_report.StringGrid1.ColWidths[y]>0 then
if ((Form_report.StringGrid1.Cells[y,0]<>'File header') and (Form_report.S tringGrid1.Cells[y,0]<>'End of file')) then if ((Form_report.StringGrid1.Cells[y,0]<>'File header') and (Form_report.S tringGrid1.Cells[y,0]<>'End of file')) then
skipping to change at line 356 skipping to change at line 369
grid1index:=0; grid1index:=0;
grid2index:=0; grid2index:=0;
grid1switch:=true; grid1switch:=true;
grid2switch:=true; grid2switch:=true;
clicklabel_rep(LabelTitleREP1,ShapeTitleREPb1); clicklabel_rep(LabelTitleREP1,ShapeTitleREPb1);
end; end;
procedure TForm_report.LabelCaseClick(Sender: TObject); procedure TForm_report.LabelCaseClick(Sender: TObject);
var var
irow,icol:integer; irow,icol:integer;
orig_activelabel_rep:TLabel;
begin begin
orig_activelabel_rep:=activelabel_rep;
if LabelCase.Caption='[CASE]' then if LabelCase.Caption='[CASE]' then
begin begin
LabelCase.Caption:='[case]'; LabelCase.Caption:='[case]';
if Form_report.StringGrid1.RowCount<2 then exit; if Form_report.StringGrid1.RowCount<2 then exit;
if Form_report.StringGrid1.ColCount<24 then exit; if Form_report.StringGrid1.ColCount<24 then exit;
for irow:=1 to Form_report.StringGrid1.RowCount-1 do for irow:=1 to Form_report.StringGrid1.RowCount-1 do
for icol:=7 to 24 do Form_report.StringGrid1.Cells[icol,irow]:=lowercase(F orm_report.StringGrid1.Cells[icol,irow]); for icol:=7 to 24 do Form_report.StringGrid1.Cells[icol,irow]:=lowercase(F orm_report.StringGrid1.Cells[icol,irow]);
save_report_clip;
end end
else else
begin begin
LabelCase.Caption:='[CASE]'; LabelCase.Caption:='[CASE]';
if Form_report.StringGrid1.RowCount<2 then exit; if Form_report.StringGrid1.RowCount<2 then exit;
if Form_report.StringGrid1.ColCount<24 then exit; if Form_report.StringGrid1.ColCount<24 then exit;
for irow:=1 to Form_report.StringGrid1.RowCount-1 do for irow:=1 to Form_report.StringGrid1.RowCount-1 do
for icol:=7 to 24 do Form_report.StringGrid1.Cells[icol,irow]:=upcase(Form _report.StringGrid1.Cells[icol,irow]); for icol:=7 to 24 do Form_report.StringGrid1.Cells[icol,irow]:=upcase(Form _report.StringGrid1.Cells[icol,irow]);
save_report_clip;
end; end;
clicklabel_rep(LabelTitleREP2,ShapeTitleREPb2);
if orig_activelabel_rep=LabelTitleREP1 then clicklabel_rep(LabelTitleREP1,ShapeT
itleREPb1);
end; end;
procedure TForm_report.LabelSaveTxt1Click(Sender: TObject); procedure TForm_report.LabelSaveTxt1Click(Sender: TObject);
begin begin
save_report(Form_report.Caption,'csv'); save_report(Form_report.Caption,'csv','INTERACTIVE_REPORT','');
end; end;
procedure TForm_report.LabelSaveTxtClick(Sender: TObject); procedure TForm_report.LabelSaveTxtClick(Sender: TObject);
begin begin
save_report(Form_report.Caption,'txt'); save_report(Form_report.Caption,'txt','INTERACTIVE_REPORT','');
end; end;
procedure TForm_report.LabelTitleREP1Click(Sender: TObject); procedure TForm_report.LabelTitleREP1Click(Sender: TObject);
begin begin
clicklabel_rep(LabelTitleREP1,ShapeTitleREPb1); clicklabel_rep(LabelTitleREP1,ShapeTitleREPb1);
end; end;
procedure TForm_report.LabelTitleREP1MouseEnter(Sender: TObject); procedure TForm_report.LabelTitleREP1MouseEnter(Sender: TObject);
begin begin
enterlabel_rep(LabelTitleREP1,ShapeTitleREPb1); enterlabel_rep(LabelTitleREP1,ShapeTitleREPb1);
 End of changes. 12 change blocks. 
13 lines changed or deleted 29 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)