mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
This commit is contained in:
parent
1419f3aaac
commit
3f9e3d35a4
3 changed files with 11 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -16,6 +16,7 @@
|
|||
*.w?x
|
||||
units/
|
||||
/doublecmd
|
||||
tools/extractdwrflnfo
|
||||
|
||||
# Lazarus autogenerated files (duplicated info)
|
||||
*.rst
|
||||
|
|
|
|||
|
|
@ -21,17 +21,17 @@ type
|
|||
{ public declarations }
|
||||
end;
|
||||
|
||||
function ShowDeleteDialog(const Message: String; FileSource: IFileSource; out QueueId: TOperationsManagerQueueIdentifier): Boolean;
|
||||
function ShowDeleteDialog(TheOwner: TComponent; const Message: String; FileSource: IFileSource; out QueueId: TOperationsManagerQueueIdentifier): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
LCLType;
|
||||
|
||||
function ShowDeleteDialog(const Message: String; FileSource: IFileSource;
|
||||
function ShowDeleteDialog(TheOwner: TComponent; const Message: String; FileSource: IFileSource;
|
||||
out QueueId: TOperationsManagerQueueIdentifier): Boolean;
|
||||
begin
|
||||
with TfrmDeleteDlg.Create(Application, FileSource) do
|
||||
with TfrmDeleteDlg.Create(TheOwner, FileSource) do
|
||||
begin
|
||||
Caption:= Application.Title;
|
||||
lblMessage.Caption:= Message;
|
||||
|
|
|
|||
|
|
@ -1411,7 +1411,7 @@ begin
|
|||
bConfirmation := focTestArchive in gFileOperationsConfirmations;
|
||||
end;
|
||||
|
||||
if (bConfirmation = False) or (ShowDeleteDialog(rsMsgTestArchive, ActiveFrame.FileSource, QueueId)) then
|
||||
if (bConfirmation = False) or (ShowDeleteDialog(frmMain, rsMsgTestArchive, ActiveFrame.FileSource, QueueId)) then
|
||||
begin
|
||||
SelectedFiles := ActiveFrame.CloneSelectedOrActiveFiles;
|
||||
try
|
||||
|
|
@ -1709,7 +1709,7 @@ begin
|
|||
Exit;
|
||||
|
||||
Message:= frmMain.GetFileDlgStr(rsMsgWipeSel, rsMsgWipeFlDr, theFilesToWipe);
|
||||
if not ShowDeleteDialog(Message, FileSource, QueueId) then
|
||||
if not ShowDeleteDialog(frmMain, Message, FileSource, QueueId) then
|
||||
Exit;
|
||||
|
||||
Operation := FileSource.CreateWipeOperation(theFilesToWipe);
|
||||
|
|
@ -2683,8 +2683,11 @@ begin
|
|||
end;
|
||||
if theFilesToDelete.Count > 5 then Message+= LineEnding + '...';
|
||||
end;
|
||||
if (bConfirmation = False) or (ShowDeleteDialog(Message, FileSource, QueueId)) then
|
||||
if (bConfirmation = False) or (ShowDeleteDialog(frmMain, Message, FileSource, QueueId)) then
|
||||
begin
|
||||
// Restore focus to main window after confirmation dialog closes
|
||||
if frmMain.ActiveFrame.CanFocus then
|
||||
frmMain.ActiveFrame.SetFocus;
|
||||
if FileSource.IsClass(TFileSystemFileSource) then
|
||||
begin
|
||||
if frmMain.NotActiveFrame.FileSource.IsClass(TFileSystemFileSource) then
|
||||
|
|
@ -2882,7 +2885,7 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
if (bConfirmation = False) or (ShowDeleteDialog(rsMsgVerifyChecksum, ActiveFrame.FileSource, QueueId)) then
|
||||
if (bConfirmation = False) or (ShowDeleteDialog(frmMain, rsMsgVerifyChecksum, ActiveFrame.FileSource, QueueId)) then
|
||||
begin
|
||||
Operation := ActiveFrame.FileSource.CreateCalcChecksumOperation(
|
||||
SelectedFiles, Hash, '') as TFileSourceCalcChecksumOperation;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue