summaryrefslogtreecommitdiff
path: root/vfs
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-10-03 18:48:42 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-10-03 18:48:42 +0200
commitb2f8a1f1a9408b674a06e34c140f58a9ae109360 (patch)
tree9062152ca8b4b63646b1a8e170e9d73412b865c6 /vfs
parent0654e549d1f8252deb9c598b19299e0c599f5fec (diff)
downloadtuxcmd-b2f8a1f1a9408b674a06e34c140f58a9ae109360.tar.xz
Remember custom plugin from Quick Connect dialog and pre-fill it in Connection Properties dialog when saving unsaved connection
Diffstat (limited to 'vfs')
-rw-r--r--vfs/UVFSCore.pas11
1 files changed, 11 insertions, 0 deletions
diff --git a/vfs/UVFSCore.pas b/vfs/UVFSCore.pas
index aaa3b49..7c85b02 100644
--- a/vfs/UVFSCore.pas
+++ b/vfs/UVFSCore.pas
@@ -89,12 +89,14 @@ type
FSourcePlugin: TVFSPlugin;
FBlockSize: Cardinal;
BreakProcessingKind: integer;
+ function GetPluginID: string;
public
ArchiveMode: boolean;
Password: string;
PasswordUsed: boolean;
RemoveFileOnClose: string;
OpenedFromQuickConnect: boolean;
+ CustomPluginIDSave: string;
constructor Create(SourcePlugin: TVFSPlugin);
function VFSOpenURI(URI: string; AskQuestionCallback: PVFSAskQuestionCallback; AskPasswordCallback: PVFSAskPasswordCallback; ProgressCallback: PVFSProgressCallback; CallbackData: Pointer): boolean;
function VFSOpenEx(OpenFile: string; AskQuestionCallback: PVFSAskQuestionCallback; AskPasswordCallback: PVFSAskPasswordCallback; ProgressCallback: PVFSProgressCallback; CallbackData: Pointer): TVFSResult;
@@ -152,6 +154,7 @@ type
published
property Path: string read GetPath write SetPath;
property BlockSize: Cardinal read GetBlockSize write SetBlockSize;
+ property PluginID: string read GetPluginID;
end;
@@ -304,6 +307,7 @@ begin
PasswordUsed := False;
RemoveFileOnClose := '';
OpenedFromQuickConnect := False;
+ CustomPluginIDSave := '';
if @FSourcePlugin.FVFSNew <> nil then FGlobs := FSourcePlugin.FVFSNew(@VFSLogFunc);
end;
@@ -955,6 +959,13 @@ begin
FSourcePlugin.FVFSResetPassword(FGlobs);
end;
+(********************************************************************************************************************************)
+(********************************************************************************************************************************)
+function TVFSEngine.GetPluginID: string;
+begin
+ if FSourcePlugin <> nil then Result := FSourcePlugin.VFSName
+ else Result := '';
+end;
(********************************************************************************************************************************)
(********************************************************************************************************************************)