mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: new version Lazarus compatibility
(cherry picked from commit cf8a766615)
This commit is contained in:
parent
a281ea608a
commit
061b8fbe1b
4 changed files with 9 additions and 9 deletions
|
|
@ -82,7 +82,7 @@ begin
|
|||
lclArray:= self.serviceMenuGetFilenames();
|
||||
if lclArray=nil then exit;
|
||||
|
||||
cocoaArray:= StringArrayFromLCLToNS( lclArray );
|
||||
cocoaArray:= TCocoaCollectionUtil.stringArrayToNSArray( lclArray );
|
||||
pboard.declareTypes_owner( NSArray.arrayWithObject(NSFileNamesPboardType), nil );
|
||||
pboard.setPropertyList_forType( cocoaArray, NSFileNamesPboardType );
|
||||
Result:= true;
|
||||
|
|
|
|||
|
|
@ -672,7 +672,7 @@ begin
|
|||
sender,
|
||||
edge );
|
||||
|
||||
NSControlMoveCaretToTheEnd( _tagsTokenField );
|
||||
TCocoaControlUtil.moveCaretToTheEnd( _tagsTokenField );
|
||||
self.tokenField_onUpdate;
|
||||
end;
|
||||
|
||||
|
|
@ -879,7 +879,7 @@ class procedure TDarwinFinderUtil.popoverFileTagsEditor(
|
|||
var
|
||||
panel: TFinderTagsEditorPanel;
|
||||
begin
|
||||
panel:= TFinderTagsEditorPanel.editorWithPath( UrlArrayFromLCLToNS(paths) );
|
||||
panel:= TFinderTagsEditorPanel.editorWithPath( TCocoaCollectionUtil.urlArrayToNSArray(paths) );
|
||||
panel._onClose:= onClose;
|
||||
panel.showPopover( positioningView, edge );
|
||||
end;
|
||||
|
|
@ -913,7 +913,7 @@ begin
|
|||
200,
|
||||
FINDER_FAVORITE_TAGS_MENU_ITEM_SIZE + FINDER_FAVORITE_TAGS_MENU_ITEM_SPACING*2 ) );
|
||||
menuView.setLclMenu( lclMenu, lclMenu.Items[menuIndex+1] );
|
||||
menuView.setUrls( UrlArrayFromLCLToNS(paths) );
|
||||
menuView.setUrls( TCocoaCollectionUtil.urlArrayToNSArray(paths) );
|
||||
menuView.setFavoriteTags( favoriteTags );
|
||||
|
||||
cocoaItem:= NSMenuItem( lclMenu.Items[menuIndex].Handle );
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ begin
|
|||
if lclArray = nil then
|
||||
Exit;
|
||||
|
||||
mate:= TQLPreviewPanelMate.alloc.initWithItems( UrlArrayFromLCLToNS(lclArray) );
|
||||
mate:= TQLPreviewPanelMate.alloc.initWithItems( TCocoaCollectionUtil.urlArrayToNSArray(lclArray) );
|
||||
panel:= QLPreviewPanel.sharedPreviewPanel;
|
||||
panel.setDataSource( mate );
|
||||
panel.makeKeyAndOrderFront( nil );
|
||||
|
|
@ -98,7 +98,7 @@ type
|
|||
|
||||
constructor TFinderTagsEditorPanelHandler.Create( const paths: TStringArray );
|
||||
begin
|
||||
_urls:= UrlArrayFromLCLToNS( paths );
|
||||
_urls:= TCocoaCollectionUtil.urlArrayToNSArray( paths );
|
||||
_urls.retain;
|
||||
_oldTagNames:= TDarwinFinderModelUtil.getTagNamesOfFiles( _urls );
|
||||
_oldTagNames.retain;
|
||||
|
|
@ -186,7 +186,7 @@ begin
|
|||
if lclArray = nil then
|
||||
Exit;
|
||||
|
||||
cocoaArray:= UrlArrayFromLCLToNS( lclArray );
|
||||
cocoaArray:= TCocoaCollectionUtil.urlArrayToNSArray( lclArray );
|
||||
|
||||
control:= Screen.ActiveControl;
|
||||
point:= control.ScreenToClient( Mouse.CursorPos );
|
||||
|
|
@ -209,7 +209,7 @@ begin
|
|||
if lclArray = nil then
|
||||
Exit;
|
||||
|
||||
cocoaArray:= UrlArrayFromLCLToNS( lclArray );
|
||||
cocoaArray:= TCocoaCollectionUtil.urlArrayToNSArray( lclArray );
|
||||
service:= NSSharingService.sharingServiceNamed( NSSharingServiceNameSendViaAirDrop );
|
||||
service.performWithItems( cocoaArray );
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ var
|
|||
if image = nil then
|
||||
Exit;
|
||||
|
||||
destRect:= RectToNSRect( params.iconRect );
|
||||
destRect:= TCocoaTypeUtil.toRect( params.iconRect );
|
||||
destRect.origin.y:= destRect.origin.y + params.iconRect.Height/16;
|
||||
destRect:= NSInsetRect( destRect, params.iconRect.Width/4, params.iconRect.Height/4 );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue