mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Show in the properties dialog which addon/plugin used to open archive
(cherry picked from commit cb21bfedb8)
This commit is contained in:
parent
419553ab31
commit
7b85aa6445
6 changed files with 24 additions and 6 deletions
|
|
@ -59,7 +59,7 @@ type
|
|||
function GetArcFileList: TThreadObjectList;
|
||||
|
||||
protected
|
||||
|
||||
function GetPacker: String; override;
|
||||
function GetSupportedFileProperties: TFilePropertiesTypes; override;
|
||||
function SetCurrentWorkingDirectory(NewDir: String): Boolean; override;
|
||||
|
||||
|
|
@ -506,6 +506,11 @@ begin
|
|||
FArcFileList.Add(ArchiveItem);
|
||||
end;
|
||||
|
||||
function TMultiArchiveFileSource.GetPacker: String;
|
||||
begin
|
||||
Result:= FMultiArcItem.FPacker;
|
||||
end;
|
||||
|
||||
function TMultiArchiveFileSource.GetPassword: String;
|
||||
begin
|
||||
Result:= FPassword;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ type
|
|||
['{13A8637C-FFDF-46B0-B5B4-E7C6851C157A}']
|
||||
|
||||
function Changed: Boolean;
|
||||
function GetPacker: String;
|
||||
|
||||
property Packer: String read GetPacker;
|
||||
|
||||
{en
|
||||
Full path to the archive on the ParentFileSource.
|
||||
|
|
@ -33,6 +36,7 @@ type
|
|||
FAttributeData: TFileAttributeData;
|
||||
|
||||
protected
|
||||
function GetPacker: String; virtual; abstract;
|
||||
function GetSupportedFileProperties: TFilePropertiesTypes; override;
|
||||
|
||||
public
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ type
|
|||
procedure ClearCurrentOperation(Operation: TFileSourceOperation);
|
||||
|
||||
protected
|
||||
function GetPacker: String; override;
|
||||
|
||||
procedure OperationFinished(Operation: TFileSourceOperation); override;
|
||||
|
||||
function GetSupportedFileProperties: TFilePropertiesTypes; override;
|
||||
|
|
@ -542,6 +544,11 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
function TWcxArchiveFileSource.GetPacker: String;
|
||||
begin
|
||||
Result:= FWcxModule.ModuleName;
|
||||
end;
|
||||
|
||||
procedure TWcxArchiveFileSource.SetCryptCallback;
|
||||
var
|
||||
AFlags: Integer;
|
||||
|
|
|
|||
|
|
@ -113,19 +113,16 @@ end;
|
|||
constructor TfrmPackInfoDlg.Create(TheOwner: TComponent;
|
||||
aFileSource: IArchiveFileSource; aFile: TFile);
|
||||
var
|
||||
sArcType: String;
|
||||
upperInfoControls: array[0..4] of TControl;
|
||||
i: Integer;
|
||||
foundDividingControl: Boolean = False;
|
||||
upperInfoControls: array[0..4] of TControl;
|
||||
begin
|
||||
inherited Create(TheOwner);
|
||||
|
||||
btnUnpackAndExec.Enabled:= (fsoCopyOut in aFileSource.GetOperationsTypes);
|
||||
btnUnpackAllAndExec.Enabled:= ([fsoList, fsoCopyOut] * aFileSource.GetOperationsTypes = [fsoList, fsoCopyOut]);
|
||||
edtPackedFile.Text:= aFile.FullPath;
|
||||
sArcType:= ExtractFileExt(aFileSource.ArchiveFileName);
|
||||
Delete(sArcType, 1, 1);
|
||||
lblPackedPacker.Caption:= sArcType;
|
||||
lblPackedPacker.Caption:= aFileSource.Packer;
|
||||
|
||||
lblPackedOrgSize.Visible := not aFile.IsDirectory;
|
||||
lblPackedPackedSize.Visible := not aFile.IsDirectory;
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ type
|
|||
procedure SetSignaturePosition(const AValue: AnsiString);
|
||||
procedure SetSignatureSeekRange(const AValue: AnsiString);
|
||||
public
|
||||
FPacker,
|
||||
FArchiver,
|
||||
FDescription,
|
||||
FStart,
|
||||
|
|
@ -290,6 +291,7 @@ begin
|
|||
MultiArcItem:= TMultiArcItem.Create;
|
||||
with MultiArcItem do
|
||||
begin
|
||||
FPacker:= Section;
|
||||
FArchiver:= FixExeExt(TrimQuotes(IniFile.ReadString(Section, 'Archiver', EmptyStr)));
|
||||
FDescription:= TrimQuotes(IniFile.ReadString(Section, 'Description', EmptyStr));
|
||||
FID:= TrimQuotes(IniFile.ReadString(Section, 'ID', EmptyStr));
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ Type
|
|||
|
||||
TWcxModule = class
|
||||
private
|
||||
FModuleName: String;
|
||||
FModuleHandle: TLibHandle; // Handle to .DLL or .so
|
||||
FBackgroundFlags: Integer;
|
||||
|
||||
|
|
@ -145,6 +146,7 @@ Type
|
|||
|
||||
function IsLoaded: Boolean;
|
||||
|
||||
property ModuleName: String read FModuleName;
|
||||
property BackgroundFlags: Integer read FBackgroundFlags write FBackgroundFlags;
|
||||
end;
|
||||
|
||||
|
|
@ -397,6 +399,7 @@ var
|
|||
PackDefaultParamStruct : TPackDefaultParamStruct;
|
||||
StartupInfo: TExtensionStartupInfo;
|
||||
begin
|
||||
FModuleName := ExtractFileName(sName);
|
||||
FModuleHandle := mbLoadLibrary(mbExpandFileName(sName));
|
||||
if FModuleHandle = 0 then Exit(False);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue