mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 14:35:58 +02:00
cocoa: support for Services menu
git-svn-id: trunk@59088 -
This commit is contained in:
parent
863b90b3fb
commit
b78d982809
@ -329,15 +329,16 @@ begin
|
||||
if attachedAppleMenuItems then Exit;
|
||||
if not hasSubmenu() then Exit;
|
||||
|
||||
// Services
|
||||
{ // todo: the sytem would not auto-populate "Services" items.
|
||||
// atleast assing "System Preferences..." would make sense
|
||||
// Separator
|
||||
submenu.insertItem_atIndex(NSMenuItem.separatorItem, submenu.itemArray.count);
|
||||
|
||||
item := LCLMenuItemInit( TCocoaMenuItem_Services.alloc, 'Services');
|
||||
// Services
|
||||
item := LCLMenuItemInit( TCocoaMenuItem.alloc, 'Services');
|
||||
item.setTarget(nil);
|
||||
item.setAction(nil);
|
||||
submenu.insertItem_atIndex(item, submenu.itemArray.count);
|
||||
item.setSubmenu(NSMenu.alloc.initWithTitle( NSSTR('Services')));
|
||||
}
|
||||
NSApplication(NSApp).setServicesMenu(item.submenu);
|
||||
|
||||
// Separator
|
||||
submenu.insertItem_atIndex(NSMenuItem.separatorItem, submenu.itemArray.count);
|
||||
|
Loading…
Reference in New Issue
Block a user