mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-14 13:12:45 +02:00

replaced TListbox in TShowDeletingFilesDialog by TCheckListBox changed file delete algorithm so that only checked files are deleted, default all files are checked (previous behaviour) implemented TButtonPanel git-svn-id: trunk@17007 -
52 lines
1.0 KiB
ObjectPascal
52 lines
1.0 KiB
ObjectPascal
unit ShowDeletingFilesDlg;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
|
StdCtrls, ButtonPanel, LazarusIDEStrConsts, CheckLst;
|
|
|
|
type
|
|
|
|
{ TShowDeletingFilesDialog }
|
|
|
|
TShowDeletingFilesDialog = class(TForm)
|
|
ButtonPanel: TButtonPanel;
|
|
UnCheckAll: TCheckBox;
|
|
FileList: TCheckListBox;
|
|
procedure FormCreate(Sender: TObject);
|
|
procedure UnCheckAllChange(Sender: TObject);
|
|
private
|
|
{ private declarations }
|
|
public
|
|
{ public declarations }
|
|
end;
|
|
|
|
implementation
|
|
|
|
{ TShowDeletingFilesDialog }
|
|
|
|
procedure TShowDeletingFilesDialog.FormCreate(Sender: TObject);
|
|
begin
|
|
Caption:=lisDeleteAllTheseFiles;
|
|
FileList.Clear;
|
|
UnCheckAll.Caption := 'Check/uncheck all';
|
|
end;
|
|
|
|
procedure TShowDeletingFilesDialog.UnCheckAllChange(Sender: TObject);
|
|
var
|
|
i: integer;
|
|
begin
|
|
//check / uncheck all
|
|
for i := 0 to FileList.Count - 1 do
|
|
FileList.Checked[i] := UnCheckAll.Checked;
|
|
end;
|
|
|
|
initialization
|
|
{$I showdeletingfilesdlg.lrs}
|
|
|
|
end.
|
|
|