View Issue Details

IDProjectCategoryView StatusLast Update
0012294LazarusIDEpublic2019-06-16 03:21
ReporterJonas MaebeAssigned ToDmitry Boyarintsev 
PrioritynormalSeveritytweakReproducibilityalways
Status assignedResolutionreopened 
Product Version0.9.27 (SVN)Product Build 
Target VersionFixed in Version 
Summary0012294: "About Lazarus" menu item should be in the Application menu under Mac OS X
DescriptionLazarus revision 16874, FPC 2.2.2, Mac OS X 10.5.4

Summary
The "About Lazarus" menu item is in the Help menu. On Mac OS X, it is standard to put this under the Application menu (i.e., the menu completely on the left, with the same name as the Application).
TagsNo tags attached.
Fixed in Revisionr21104
LazTarget-
WidgetsetCarbon
Attached Files

Relationships

related to 0014411 closedFelipe Monteiro de Carvalho IDE "Lazarus" menu is broken 
related to 0027596 resolvedDmitry Boyarintsev Command keys in lazarus-cocoa 

Activities

Tom Gregorovic

2008-10-05 13:54

developer   ~0022617

use EnableMenuCommand with kHICommandAbout from http://developer.apple.com/documentation/Carbon/Reference/Menu_Manager/Reference/reference.html#//apple_ref/c/func/GetIndMenuItemWithCommandID

Dmitry Boyarintsev

2009-08-04 12:59

developer   ~0029518

another suggestion is here: http://lists.apple.com/archives/Carbon-development/2003/May/msg00796.html

Index: mainbase.pas
===================================================================
--- mainbase.pas (revision 21082)
+++ mainbase.pas (working copy)
@@ -193,6 +193,8 @@
 uses
   IDEImagesIntf;
 
+var mnuApple: TIDEMenuSection = nil;
+
 { TMainIDEBase }
 
 procedure TMainIDEBase.mnuWindowItemClick(Sender: TObject);
@@ -334,6 +336,10 @@
   MainIDEBar.mnuMainMenu.Images := IDEImages.Images_16;
   with MainIDEBar do begin
     mnuMain:=RegisterIDEMenuRoot('IDEMainMenu',nil);
+ {$ifdef LCLCarbon}
+ //see: http://lists.apple.com/archives/Carbon-development/2003/May/msg00796.html
+ CreateMainMenuItem(mnuApple,'AppleApplication','п£њ');
+ {$endif}
     CreateMainMenuItem(mnuFile,'File',lisMenuFile);
     CreateMainMenuItem(mnuEdit,'Edit',lisMenuEdit);
     CreateMainMenuItem(mnuSearch,'Search',lisMenuSearch);
@@ -779,11 +785,15 @@
     CreateMenuItem(ParentMI,itmHelpReportingBug,'itmHelpReportingBug',
                    lisMenuReportingBug, 'menu_reportingbug');
 
+ {$ifndef LCLCarbon}
     CreateMenuSeparatorSection(mnuHelp,itmInfoHelps,'itmInfoHelps');
     ParentMI:=itmInfoHelps;
-
     CreateMenuItem(ParentMI,itmHelpAboutLazarus,'itmHelpAboutLazarus',
- lisAboutLazarus, 'menu_information');
+ lisAboutLazarus, 'menu_information');
+ {$else}
+ CreateMenuItem(mnuApple, itmHelpAboutLazarus,'itmHelpAboutLazarus',
+ lisAboutLazarus, 'menu_information');
+ {$endif}
 
     CreateMenuSeparatorSection(mnuHelp,itmHelpTools,'itmHelpTools');
     ParentMI:=itmHelpTools;

Dmitry Boyarintsev

2009-08-04 13:03

developer   ~0029519

Apple sign can by typed by pressing Alt-Shift-K in OSX
Unicode is: U+F8FF (according to this table: http://www.alanwood.net/demos/macroman.html)

2009-08-04 13:04

 

mainbase.pas.diff.zip (797 bytes)

Jonas Maebe

2009-08-04 13:18

reporter   ~0029520

Note that the mailing list messages says that this menu replaces the existing application menu, so you may have to add the standard items with their shortcuts to this new menu (Services, Hide Lazarus, Hide Others, Show All, Quit Lazarus -- and the "Quit" item from the File menu should also be removed).

2009-08-04 13:24

 

Dmitry Boyarintsev

2009-08-04 13:32

developer   ~0029521

Jonas, could you give a link on the mailling list, there it is said.

So far, the menu doesn't replace anything, it's added to the Application's Menu. All existing items: Services, Hide, Hide Others, Show All and Quit, are still at their places and shortcuts properly configured.

Dmitry Boyarintsev

2009-08-05 10:23

developer   ~0029543

Found it! :) It's safe to use "apple" title.

http://lists.apple.com/archives/carbon-development/2002/Apr/msg01183.html

"The Menu Manager will automatically detect Apple-titled menus and use your menu as the content for the Application menu, appending the standard system items after your items."

Eric had to answer this question a thousand times :)
http://lists.apple.com/archives/carbon-dev/2007/Dec//msg00337.html
http://lists.apple.com/archives/carbon-development/2003/Sep/msg00538.htm
Apple should really add a description of this feature to Menu Manager docs

The "apple" titled menu should come first.
Also, the only one "apple" titled menu should be in the application. It's possible to have multiple, but it would produce odd effects: (see screen shots Picture 1, 2 and 3)
- the last "apple" menu, becomes Application named
- the first "apple" menu, is added to the actual applicaiton menu

2009-08-05 10:24

 

Picture 1.png (31,706 bytes)
Picture 1.png (31,706 bytes)

2009-08-05 10:25

 

Picture 2.png (42,993 bytes)
Picture 2.png (42,993 bytes)

2009-08-05 10:25

 

Picture 3.png (30,854 bytes)
Picture 3.png (30,854 bytes)

Dmitry Boyarintsev

2009-08-05 13:51

developer   ~0029545

please test and close if ok

Dmitry Boyarintsev

2009-09-04 21:06

developer   ~0030418

The solution should work for 10.4 as well.

2009-10-27 18:06

 

yann.m

2009-10-27 18:10

reporter   ~0031736

Fine !

This Works perfectly on MacOs10.5 - Lazarus 0.9.26.2

 = Alt + &

See the picture "AppMenu_AddMenuItems_Mac.jpg"

:)

Dmitry Boyarintsev

2009-10-27 18:32

developer   ~0031737

There's an issue with OSX Tiger 10.4. The problem appears if menu is added in run-time, rather than design-time.
With small fixing Carbon widgetset, the solution can be applied.

Karl-Michael Schindler

2010-11-18 13:20

reporter   ~0043181

The preferences should also have Command-, as shortcut, maybe achieved by

  AppPrefCmd.Shortcut := ShortCut(VK_OEM_COMMA, [ssMeta]);

(as stolen from the mac page of Phil Hess (http://web.me.com/macpgmr/ObjP/MacXPlatform_Part8.html)

Felipe Monteiro de Carvalho

2011-10-02 19:38

developer   ~0052380

Note for people investigating: The proposed patch was already applied (not exactly as shown here, but similar), but it cause a heavy side effect in newer Mac OS X versions: bug 14411 so it was then commented out.

Zeljan Rikalo

2011-12-18 20:11

developer   ~0055120

hm...indeed this bug exists with Carbon widgetset, BUT NOT WITH QT UNDER MAC ,
same LCL code, and About is at right place with qt. So it seem that Qt fixes it automagically somehow. Probably because of "About" key word or similar.

Dmitry Boyarintsev

2012-02-05 20:08

developer   ~0056543

Zeljan, try to switch your system default language or Lazarus IDE language and see where "about" menu is in Qt.

Alexey Tor.

2017-04-23 10:47

reporter   ~0099796

>The "About Lazarus" menu item is in the Help menu. On Mac OS X, it is standard to put this under the Application menu

Maybe close. "no change needed". Reason: hard to put item to System menu;
and ppl used to item in HELP menu (Win/Lin).

Karl-Michael Schindler

2017-04-23 11:10

reporter   ~0099799

Without being fixed, expect your application to be rejected from the macOS app store.

Juha Manninen

2017-04-23 13:06

developer   ~0099810

I added a ToDo item in r54695.
If somebody knows how to add items under the Application menu, please provide a patch.

Issue History

Date Modified Username Field Change
2008-10-05 11:12 Jonas Maebe New Issue
2008-10-05 11:12 Jonas Maebe Widgetset => Carbon
2008-10-05 13:54 Tom Gregorovic Note Added: 0022617
2008-10-05 13:54 Tom Gregorovic Status new => assigned
2008-10-05 13:54 Tom Gregorovic Assigned To => Tom Gregorovic
2009-08-04 12:59 Dmitry Boyarintsev Note Added: 0029518
2009-08-04 13:03 Dmitry Boyarintsev Note Added: 0029519
2009-08-04 13:04 Dmitry Boyarintsev File Added: mainbase.pas.diff.zip
2009-08-04 13:18 Jonas Maebe Note Added: 0029520
2009-08-04 13:24 Dmitry Boyarintsev File Added: Снимок экрана 4.png
2009-08-04 13:32 Dmitry Boyarintsev Note Added: 0029521
2009-08-05 10:23 Dmitry Boyarintsev Note Added: 0029543
2009-08-05 10:24 Dmitry Boyarintsev File Added: Picture 1.png
2009-08-05 10:25 Dmitry Boyarintsev File Added: Picture 2.png
2009-08-05 10:25 Dmitry Boyarintsev File Added: Picture 3.png
2009-08-05 13:51 Dmitry Boyarintsev Fixed in Revision => r21104
2009-08-05 13:51 Dmitry Boyarintsev LazTarget => -
2009-08-05 13:51 Dmitry Boyarintsev Status assigned => resolved
2009-08-05 13:51 Dmitry Boyarintsev Resolution open => fixed
2009-08-05 13:51 Dmitry Boyarintsev Note Added: 0029545
2009-08-05 13:51 Dmitry Boyarintsev Target Version => 0.9.28
2009-09-04 21:06 Dmitry Boyarintsev LazTarget - => 0.9.30
2009-09-04 21:06 Dmitry Boyarintsev Assigned To Tom Gregorovic => Dmitry Boyarintsev
2009-09-04 21:06 Dmitry Boyarintsev Status resolved => assigned
2009-09-04 21:06 Dmitry Boyarintsev Resolution fixed => reopened
2009-09-04 21:06 Dmitry Boyarintsev Note Added: 0030418
2009-09-27 11:15 Vincent Snijders Target Version 0.9.28 => 0.9.30
2009-10-27 18:06 yann.m File Added: AppMenu_AddMenuItems_Mac.jpg
2009-10-27 18:10 yann.m Note Added: 0031736
2009-10-27 18:32 Dmitry Boyarintsev Note Added: 0031737
2010-11-18 13:20 Karl-Michael Schindler Note Added: 0043181
2010-12-01 13:06 Vincent Snijders LazTarget 0.9.30 => 0.99.0
2010-12-01 13:06 Vincent Snijders Target Version 0.9.30 => 0.99.0
2011-10-02 19:32 Felipe Monteiro de Carvalho Relationship added related to 0014411
2011-10-02 19:38 Felipe Monteiro de Carvalho Note Added: 0052380
2011-10-02 19:38 Felipe Monteiro de Carvalho LazTarget 0.99.0 => 1.0
2011-10-07 18:34 Vincent Snijders LazTarget 1.0 => 1.2
2011-12-18 20:11 Zeljan Rikalo Note Added: 0055120
2012-02-05 20:08 Dmitry Boyarintsev Note Added: 0056543
2012-03-06 07:09 Paul Ishenin Target Version 0.99.0 => 1.2.0
2014-01-14 15:10 Martin Friebe LazTarget 1.2 => 1.4
2014-01-14 15:12 Martin Friebe Target Version 1.2.0 => 1.4
2015-04-27 21:59 Juha Manninen LazTarget 1.4 => -
2015-04-27 22:02 Juha Manninen Target Version 1.4 =>
2017-04-23 10:47 Alexey Tor. Note Added: 0099796
2017-04-23 11:10 Karl-Michael Schindler Note Added: 0099799
2017-04-23 13:06 Juha Manninen Note Added: 0099810
2019-06-16 03:21 Dmitry Boyarintsev Relationship added related to 0027596