mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: implement IKASPathEditMate in TfrmCopyDlg, autocomplete is supported on various file sources
This commit is contained in:
parent
5267c3387f
commit
ef724fa7d2
1 changed files with 17 additions and 8 deletions
|
|
@ -26,7 +26,7 @@ unit fCopyMoveDlg;
|
|||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, Controls, Forms, StdCtrls, Buttons, ExtCtrls, Menus,
|
||||
SysUtils, Classes, Controls, Forms, StdCtrls, ShellCtrls, Buttons, ExtCtrls, Menus,
|
||||
ActnList, KASPathEdit, uFileSource, uFileViewNotebook, uFileSourceOperation,
|
||||
uFileSourceOperationOptionsUI, uOperationsManager, uFormCommands;
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ type
|
|||
|
||||
{ TfrmCopyDlg }
|
||||
|
||||
TfrmCopyDlg = class(TForm, IFormCommands)
|
||||
TfrmCopyDlg = class(TForm, IFormCommands, IKASPathEditMate)
|
||||
btnCancel: TBitBtn;
|
||||
btnOK: TBitBtn;
|
||||
btnAddToQueue: TBitBtn;
|
||||
|
|
@ -91,6 +91,11 @@ type
|
|||
procedure ShowOptions(bShow: Boolean);
|
||||
procedure UpdateSize;
|
||||
|
||||
function getFilesAtPath(
|
||||
const path: String;
|
||||
const types: TObjectTypes;
|
||||
const sort: TFileSortType ): TStringList;
|
||||
|
||||
property {%H-}Commands: TFormCommands read FCommands implements IFormCommands;
|
||||
|
||||
public
|
||||
|
|
@ -113,8 +118,7 @@ implementation
|
|||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
LazUTF8, fMain, LCLType, LCLVersion, uGlobs, uLng, uHotkeyManager,
|
||||
uOSUtils, DCStrUtils;
|
||||
LazUTF8, fMain, LCLType, LCLVersion, uGlobs, uLng, uHotkeyManager, DCStrUtils;
|
||||
|
||||
const
|
||||
HotkeysCategory = 'Copy/Move Dialog';
|
||||
|
|
@ -462,10 +466,7 @@ begin
|
|||
if Assigned(Hotkey) then
|
||||
btnAddToQueue.Caption := btnAddToQueue.Caption + ' (' + ShortcutsToText(Hotkey.Shortcuts) + ')';
|
||||
|
||||
if FDestFileSource.ClassName = 'TFileSystemFileSource' then
|
||||
edtDst.GetFilesFunc:= @GetFilesInDir
|
||||
else
|
||||
edtDst.GetFilesFunc:= nil;
|
||||
edtDst.Mate:= self;
|
||||
end;
|
||||
|
||||
procedure TfrmCopyDlg.FormDestroy(Sender: TObject);
|
||||
|
|
@ -488,6 +489,14 @@ begin
|
|||
Self.Height := pnlOptions.Top;
|
||||
end;
|
||||
|
||||
function TfrmCopyDlg.getFilesAtPath(
|
||||
const path: String;
|
||||
const types: TObjectTypes;
|
||||
const sort: TFileSortType ): TStringList;
|
||||
begin
|
||||
Result:= FDestFileSource.GetFilesForPathAndType( path, types, sort );
|
||||
end;
|
||||
|
||||
initialization
|
||||
TFormCommands.RegisterCommandsForm(TfrmCopyDlg, HotkeysCategory, @rsHotkeyCategoryCopyMoveDialog);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue