From b2f8a1f1a9408b674a06e34c140f58a9ae109360 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sat, 3 Oct 2009 18:48:42 +0200 Subject: Remember custom plugin from Quick Connect dialog and pre-fill it in Connection Properties dialog when saving unsaved connection --- vfs/UVFSCore.pas | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'vfs/UVFSCore.pas') 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; (********************************************************************************************************************************) (********************************************************************************************************************************) -- cgit v1.2.3