mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
ADD: "Open Stash" Item in Modern Toolbar on macOS
This commit is contained in:
parent
e1e2db6e93
commit
04f8285fe7
1 changed files with 22 additions and 0 deletions
|
|
@ -459,6 +459,11 @@ begin
|
|||
frmMain.Commands.DoOpenVirtualFileSystemList( frmMain.ActiveFrame );
|
||||
end;
|
||||
|
||||
procedure stashAction( const Sender: id );
|
||||
begin
|
||||
frmMain.Commands.cm_OpenStash([]);
|
||||
end;
|
||||
|
||||
procedure terminalAction( const Sender: id );
|
||||
begin
|
||||
frmMain.Commands.cm_RunTerm([]);
|
||||
|
|
@ -560,6 +565,17 @@ const
|
|||
onAction: @networkAction;
|
||||
);
|
||||
|
||||
stashItemConfig: TCocoaConfigToolBarItem = (
|
||||
identifier: 'MainForm.Stash';
|
||||
priority: NSToolbarItemVisibilityPriorityStandard;
|
||||
navigational: False;
|
||||
iconName: 'square.stack';
|
||||
title: rsStashName;
|
||||
tips: rsStashName;
|
||||
bordered: True;
|
||||
onAction: @stashAction;
|
||||
);
|
||||
|
||||
|
||||
showBriefItemConfig: TCocoaConfigToolBarItem = (
|
||||
identifier: 'MainForm.ShowMode.Brief';
|
||||
|
|
@ -817,6 +833,7 @@ const
|
|||
|
||||
'MainForm.iCloud',
|
||||
'MainForm.network',
|
||||
'MainForm.Stash',
|
||||
'NSToolbarFlexibleSpaceItem',
|
||||
|
||||
'MainForm.ShowMode',
|
||||
|
|
@ -845,6 +862,7 @@ const
|
|||
'MainForm.GoBackward',
|
||||
'MainForm.GoForward',
|
||||
|
||||
'MainForm.Stash',
|
||||
'MainForm.iCloud',
|
||||
'MainForm.network',
|
||||
'MainForm.ShowMode',
|
||||
|
|
@ -874,6 +892,8 @@ procedure addMainFormShortCutTips;
|
|||
begin
|
||||
addShortCutTipsToItemConfig( 'Main', 'cm_ViewHistoryPrev', goBackwardItemConfig );
|
||||
addShortCutTipsToItemConfig( 'Main', 'cm_ViewHistoryNext', goForwardItemConfig );
|
||||
addShortCutTipsToItemConfig( 'Main', 'cm_OpenVirtualFileSystemList', networkItemConfig );
|
||||
addShortCutTipsToItemConfig( 'Main', 'cm_OpenStash', stashItemConfig );
|
||||
end;
|
||||
|
||||
procedure joinPrivilegeTips;
|
||||
|
|
@ -902,6 +922,7 @@ procedure doInitMainFormConfig;
|
|||
begin
|
||||
loadVectorImageWithName( 'airdrop.svg', 'doublecmd.airdrop' );
|
||||
loadVectorImageWithName( 'finder.svg', 'doublecmd.finder' );
|
||||
|
||||
addMainFormShortCutTips;
|
||||
joinPrivilegeTips;
|
||||
|
||||
|
|
@ -936,6 +957,7 @@ begin
|
|||
TCocoaToolBarUtils.toClass(syncItemConfig),
|
||||
TCocoaToolBarUtils.toClass(editItemConfig),
|
||||
|
||||
TCocoaToolBarUtils.toClass(stashItemConfig),
|
||||
TCocoaToolBarUtils.toClass(iCloudItemConfig),
|
||||
TCocoaToolBarUtils.toClass(networkItemConfig)
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue