ADD/StashFS: step-24: add actOpenStash/cm_OpenStash/"Open Stash" Menu Item,

This commit is contained in:
rich2014 2026-06-08 17:30:44 +08:00
commit 89ce532f2c
4 changed files with 32 additions and 1 deletions

View file

@ -1216,6 +1216,9 @@ object frmMain: TfrmMain
object mnuOpenVFSList: TMenuItem
Action = actOpenVirtualFileSystemList
end
object mnuOpenStash: TMenuItem
Action = actOpenStash
end
object mnuCmdSwapSourceTarget: TMenuItem
Action = actExchange
end
@ -2884,6 +2887,12 @@ object frmMain: TfrmMain
Caption = 'Add to Stash'
OnExecute = actExecute
end
object actOpenStash: TAction
Tag = 4
Category = 'File Operations'
Caption = 'Open Stash'
OnExecute = actExecute
end
end
object pmHotList: TPopupMenu
Images = imgLstDirectoryHotlist

View file

@ -266,6 +266,7 @@
{"hash":23458974,"name":"tfrmmain.actmainfontzoomin.caption","sourcebytes":[90,111,111,109,32,73,110],"value":"Zoom In"},
{"hash":10715029,"name":"tfrmmain.actsetsortmode.caption","sourcebytes":[83,101,116,32,83,111,114,116,32,77,111,100,101],"value":"Set Sort Mode"},
{"hash":86036264,"name":"tfrmmain.actaddtostash.caption","sourcebytes":[65,100,100,32,116,111,32,83,116,97,115,104],"value":"Add to Stash"},
{"hash":6278744,"name":"tfrmmain.actopenstash.caption","sourcebytes":[79,112,101,110,32,83,116,97,115,104],"value":"Open Stash"},
{"hash":310020,"name":"tfrmmain.tbedit.caption","sourcebytes":[69,100,105,116],"value":"Edit"},
{"hash":78392485,"name":"tfrmmain.tbdelete.caption","sourcebytes":[68,101,108,101,116,101],"value":"Delete"},
{"hash":1140,"name":"tfrmmain.tbchangedir.caption","sourcebytes":[67,68],"value":"CD"},

View file

@ -75,6 +75,7 @@ type
TfrmMain = class(TAloneForm, IFormCommands)
actAddPlugin: TAction;
actAddToStash: TAction;
actOpenStash: TAction;
actMainFontZoomOut: TAction;
actMainFontZoomIn: TAction;
actMapNetworkDrive: TAction;
@ -252,6 +253,7 @@ type
lblRightDriveInfo: TLabel;
lblLeftDriveInfo: TLabel;
lblCommandPath: TLabel;
mnuOpenStash: TMenuItem;
mnuDoAnyCmCommand: TMenuItem;
miConfigArchivers: TMenuItem;
mnuConfigSavePos: TMenuItem;

View file

@ -71,6 +71,7 @@ type
// parameters would have to be converted to and from strings).
//
procedure DoOpenVirtualFileSystemList(Panel: TFileView);
procedure DoOpenStash(Panel: TFileView);
procedure DoPanelsSplitterPerPos(SplitPos: Integer);
procedure DoUpdateFileView(AFileView: TFileView; {%H-}UserData: Pointer);
procedure DoCloseTab(Notebook: TFileViewNotebook; PageIndex: Integer);
@ -186,6 +187,7 @@ type
procedure cm_Open(const {%H-}Params: array of string);
procedure cm_ShellExecute(const Params: array of string);
procedure cm_OpenVirtualFileSystemList(const {%H-}Params: array of string);
procedure cm_OpenStash(const {%H-}Params: array of string);
procedure cm_TargetEqualSource(const {%H-}Params: array of string);
procedure cm_LeftEqualRight(const {%H-}Params: array of string);
procedure cm_RightEqualLeft(const {%H-}Params: array of string);
@ -412,7 +414,7 @@ uses fOptionsPluginsBase, fOptionsPluginsDSX, fOptionsPluginsWCX,
fMainCommandsDlg, uConnectionManager, fOptionsFavoriteTabs, fTreeViewMenu,
uArchiveFileSource, fOptionsHotKeys, fBenchmark, uAdministrator, uWcxArchiveFileSource,
uColumnsFileView, uTypes,
uStashFilesBackend
uStashFileSource, uStashFilesBackend
;
resourcestring
@ -737,6 +739,18 @@ begin
end;
end;
procedure TMainCommands.DoOpenStash(Panel: TFileView);
var
FileSource: IFileSource;
begin
FileSource:= TStashFileSource.GetFileSource;
if Assigned(FileSource) then
begin
Panel.AddFileSource(FileSource, FileSource.GetRootDir);
frmMain.ActiveFrame.SetFocus;
end;
end;
procedure TMainCommands.DoPanelsSplitterPerPos(SplitPos: Integer);
begin
with frmMain do
@ -1457,6 +1471,11 @@ begin
DoOpenVirtualFileSystemList(frmMain.ActiveFrame);
end;
procedure TMainCommands.cm_OpenStash(const Params: array of string);
begin
DoOpenStash(frmMain.ActiveFrame);
end;
//------------------------------------------------------
(* Pack files in archive by creating a new archive *)
procedure TMainCommands.cm_PackFiles(const Params: array of string);