mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 18:49:19 +02:00
ide: restoring carbon specific code as cocoa specific code to bring About menu under the Mac application menu
git-svn-id: trunk@61400 -
This commit is contained in:
parent
04d6641daf
commit
bc2d633fdc
@ -620,10 +620,10 @@ begin
|
|||||||
AddMenuItem(MainIDEBar.itmJumpToInitialization);
|
AddMenuItem(MainIDEBar.itmJumpToInitialization);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//{$IFDEF LCLCarbon}
|
{$IFDEF LCLCocoa}
|
||||||
//var
|
var
|
||||||
// mnuApple: TIDEMenuSection = nil;
|
mnuApple: TIDEMenuSection = nil;
|
||||||
//{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
function FormMatchesCmd(aForm: TCustomForm; aCmd: TIDEMenuCommand): Boolean;
|
function FormMatchesCmd(aForm: TCustomForm; aCmd: TIDEMenuCommand): Boolean;
|
||||||
begin
|
begin
|
||||||
@ -997,12 +997,12 @@ begin
|
|||||||
MainIDEBar.mnuMainMenu.Images := IDEImages.Images_16;
|
MainIDEBar.mnuMainMenu.Images := IDEImages.Images_16;
|
||||||
with MainIDEBar do begin
|
with MainIDEBar do begin
|
||||||
mnuMain:=RegisterIDEMenuRoot('IDEMainMenu',nil);
|
mnuMain:=RegisterIDEMenuRoot('IDEMainMenu',nil);
|
||||||
{$ifdef LCLCarbon}
|
{$ifdef LCLCocoa}
|
||||||
// Under Apple there is a special policy: every application should create
|
// Under Apple there is a special policy: every application should create
|
||||||
// a special Apple menu and put Quit, About there.
|
// a special Apple menu and put Quit, About there.
|
||||||
// See issue: http://bugs.freepascal.org/view.php?id=12294
|
// See issue: http://bugs.freepascal.org/view.php?id=12294
|
||||||
// See http://lists.apple.com/archives/carbon-development/2002/Apr/msg01183.html, for details
|
// See http://lists.apple.com/archives/carbon-development/2002/Apr/msg01183.html, for details
|
||||||
//CreateMainMenuItem(mnuApple,'AppleApplication','');
|
CreateMainMenuItem(mnuApple,'AppleApplication',#$EF#$A3#$BF);
|
||||||
{$endif}
|
{$endif}
|
||||||
CreateMainMenuItem(mnuFile,'File',lisMenuFile);
|
CreateMainMenuItem(mnuFile,'File',lisMenuFile);
|
||||||
CreateMainMenuItem(mnuEdit,'Edit',lisMenuEdit);
|
CreateMainMenuItem(mnuEdit,'Edit',lisMenuEdit);
|
||||||
@ -1489,22 +1489,15 @@ begin
|
|||||||
CreateMenuItem(ParentMI,itmHelpReportingBug,'itmHelpReportingBug',
|
CreateMenuItem(ParentMI,itmHelpReportingBug,'itmHelpReportingBug',
|
||||||
lisMenuReportingBug, 'menu_reportingbug');
|
lisMenuReportingBug, 'menu_reportingbug');
|
||||||
|
|
||||||
|
CreateMenuSeparatorSection(mnuHelp,itmInfoHelps,'itmInfoHelps');
|
||||||
// old behavior restored, until Tiger issue is fixed.
|
// old behavior restored, until Tiger issue is fixed.
|
||||||
// http://bugs.freepascal.org/view.php?id=14411
|
// http://bugs.freepascal.org/view.php?id=14411
|
||||||
(*
|
|
||||||
{$ifdef LCLCarbon}
|
|
||||||
// under Carbon: add About item to the Apple menu
|
// under Cocoa: add About item to the Apple menu
|
||||||
CreateMenuItem(mnuApple, itmHelpAboutLazarus,'itmHelpAboutLazarus',
|
|
||||||
lisAboutLazarus, 'menu_information');
|
|
||||||
|
|
||||||
CreateMenuSeparatorSection(mnuHelp,itmInfoHelps,'itmInfoHelps');
|
|
||||||
{$else}*)
|
|
||||||
// otherwise: add About item to the Help menu
|
|
||||||
CreateMenuSeparatorSection(mnuHelp,itmInfoHelps,'itmInfoHelps');
|
|
||||||
ParentMI:=itmInfoHelps;
|
ParentMI:=itmInfoHelps;
|
||||||
CreateMenuItem(ParentMI,itmHelpAboutLazarus,'itmHelpAboutLazarus',
|
CreateMenuItem({$ifndef LCLCocoa}ParentMI{$else}mnuApple{$endif}, itmHelpAboutLazarus,'itmHelpAboutLazarus',
|
||||||
lisAboutLazarus, 'menu_information');
|
lisAboutLazarus, 'menu_information');
|
||||||
//{$endif}
|
|
||||||
|
|
||||||
CreateMenuSeparatorSection(mnuHelp,itmHelpTools,'itmHelpTools');
|
CreateMenuSeparatorSection(mnuHelp,itmHelpTools,'itmHelpTools');
|
||||||
ParentMI:=itmHelpTools;
|
ParentMI:=itmHelpTools;
|
||||||
|
Loading…
Reference in New Issue
Block a user