mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD/StashFS: step-8: register Stash to VFS
This commit is contained in:
parent
3764ee267c
commit
2347cc3f30
2 changed files with 10 additions and 2 deletions
BIN
pixmaps/stuff/stash.png
Normal file
BIN
pixmaps/stuff/stash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
|
|
@ -8,8 +8,8 @@ uses
|
|||
Classes, SysUtils,
|
||||
uFile, uFileProperty, uFileSourceManager,
|
||||
uFileSourceProperty, uFileSourceOperation, uFileSourceOperationTypes,
|
||||
uFileSource, uVirtualFileSource, uFileSystemFileSource,
|
||||
uFileSourceUtil;
|
||||
uFileSource, uVirtualFileSource, uFileSystemFileSource, uVfsModule,
|
||||
uFileSourceUtil, uDCUtils;
|
||||
|
||||
type
|
||||
|
||||
|
|
@ -34,6 +34,7 @@ type
|
|||
constructor Create; override; overload;
|
||||
destructor Destroy; override;
|
||||
function GetLocalName(var aFile: TFile): Boolean; override;
|
||||
class function GetMainIcon(out Path: String): Boolean; override;
|
||||
function needReload(const PathToReload: String; const PathToCheck: String): Boolean; override;
|
||||
|
||||
function GetProcessor: TFileSourceProcessor; override;
|
||||
|
|
@ -165,6 +166,12 @@ begin
|
|||
Result:= True;
|
||||
end;
|
||||
|
||||
class function TStashFileSource.GetMainIcon(out Path: String): Boolean;
|
||||
begin
|
||||
Path:= mbExpandFileName( '$COMMANDER_PATH/pixmaps/stuff/stash.png' );
|
||||
Result:= True;
|
||||
end;
|
||||
|
||||
function TStashFileSource.needReload(
|
||||
const PathToReload: String;
|
||||
const PathToCheck: String): Boolean;
|
||||
|
|
@ -251,6 +258,7 @@ end;
|
|||
|
||||
initialization
|
||||
stashFileSourceProcessor:= TStashFileSourceProcessor.Create;
|
||||
RegisterVirtualFileSource( 'Stash', TStashFileSource, True );
|
||||
|
||||
finalization
|
||||
FreeAndNil( stashFileSourceProcessor );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue