1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00
Files
winscp/source/forms/RemoteTransfer.h
Martin Prikryl b3698f0078 When moving or duplicating a folder by drag&drop to a path that already contains a subfolder with the same name, the existing folder is overwritten
For drag&drop operations, this undoes Bug 2120 and Bug 2233.

Source commit: 2700156d41d70311f6b4d4ee53072677d8dd8fc6
2023-11-08 01:13:17 +01:00

64 lines
2.1 KiB
C++

//---------------------------------------------------------------------------
#ifndef RemoteTransferH
#define RemoteTransferH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "HistoryComboBox.hpp"
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.Imaging.pngimage.hpp>
//---------------------------------------------------------------------------
class TRemoteTransferDialog : public TForm
{
__published:
TGroupBox *Group;
TLabel *SessionLabel;
TLabel *Label3;
TComboBox *SessionCombo;
THistoryComboBox *DirectoryEdit;
TButton *OkButton;
TButton *CancelButton;
TButton *HelpButton;
TCheckBox *NotDirectCopyCheck;
TImage *Image;
void __fastcall ControlChange(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall HelpButtonClick(TObject *Sender);
void __fastcall SessionComboChange(TObject *Sender);
void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
void __fastcall NotDirectCopyCheckClick(TObject *Sender);
public:
__fastcall TRemoteTransferDialog(TComponent * Owner);
void __fastcall Init(
bool Multi, TStrings * Sessions, TStrings * Directories, TDirectRemoteCopy AllowDirectCopy,
void * CurrentSession, TDirectoryExistsEvent OnDirectoryExists, bool TargetConfirmed);
bool __fastcall Execute(void *& Session, UnicodeString & Target,
UnicodeString & FileMask, bool & DirectCopy);
protected:
void __fastcall UpdateControls();
UnicodeString GetTarget();
UnicodeString GetFileMask();
bool __fastcall IsCurrentSessionSelected();
void * GetSelectedSession();
void __fastcall UpdateNotDirectCopyCheck();
private:
TStrings * FDirectories;
void * FCurrentSession;
bool FDirectCopy;
bool FMulti;
TDirectRemoteCopy FAllowDirectCopy;
TDirectoryExistsEvent FOnDirectoryExists;
bool FTargetConfirmed;
UnicodeString FOriginalTarget;
INTERFACE_HOOK;
};
//---------------------------------------------------------------------------
#endif