From fc0fe67716eb0024bfcea8d5da09dff41d5de95b Mon Sep 17 00:00:00 2001 From: rich2014 Date: Thu, 31 Oct 2024 21:24:40 +0800 Subject: [PATCH] IDE/Cocoa: adapt to the new API of Modern Form Style Tool Bar --- ide/cocoaideformconfig.inc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ide/cocoaideformconfig.inc b/ide/cocoaideformconfig.inc index fcf0719b5d..0cdb36886d 100644 --- a/ide/cocoaideformconfig.inc +++ b/ide/cocoaideformconfig.inc @@ -70,10 +70,7 @@ begin SourceEditorManager.JumpForwardClicked( nil ); end; -function onGetCommandMenu: TMenuItem; -var - menu: TMenuItem; - +procedure onGetCommandMenu( const menu: TMenu ); function createSearchMenuItem: TMenuItem; begin Result:= TMenuItem.Create( menu ); @@ -83,9 +80,7 @@ var end; begin - menu:= TMenuItem.Create( nil ); - menu.Add( createSearchMenuItem ); - Result:= menu; + menu.Items.Add( createSearchMenuItem ); end;