mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: the buttons in Modern ToolBar can be enabled or disabled based on FileSource.Properties on macOS
This commit is contained in:
parent
bebe20e6f9
commit
ed2cc821b2
2 changed files with 2 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ uses
|
|||
fMain, fEditor, fDiffer, fViewer,
|
||||
uHotkeyManager, uEarlyConfig, uGlobs, uLng, uDCUtils,
|
||||
uFileView, uBriefFileView, uColumnsFileView, uThumbFileView,
|
||||
uFileSourceProperty,
|
||||
uFileSystemFileSource,
|
||||
uDarwinApplication, uDarwinPanel, uDarwinFile, uDarwinUtil,
|
||||
uDarwinFinder, uDarwinFinderModel,
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ procedure onFileViewUpdated( const fileView: TFileView );
|
|||
enabled: Boolean;
|
||||
item: NSToolbarItem;
|
||||
begin
|
||||
enabled:= fileView.FileSource.IsClass( TFileSystemFileSource );
|
||||
enabled:= fspDirectAccess in fileView.FileSource.Properties;
|
||||
item:= TCocoaToolBarUtils.findItemByIdentifier( frmMain, 'MainForm.Share' );
|
||||
item.setEnabled( enabled );
|
||||
item:= TCocoaToolBarUtils.findItemByIdentifier( frmMain, 'MainForm.AirDrop' );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue