[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 32/35] ui/cocoa: Add Services menu
From: |
Gerd Hoffmann |
Subject: |
[PULL 32/35] ui/cocoa: Add Services menu |
Date: |
Fri, 4 Mar 2022 15:21:20 +0100 |
From: Akihiko Odaki <akihiko.odaki@gmail.com>
Services menu functionality of Cocoa is described at:
https://developer.apple.com/design/human-interface-guidelines/macos/extensions/services/
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214091320.51750-1-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/cocoa.m | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index b6e70e9134db..8ab9ab5e84da 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1611,11 +1611,15 @@ static void create_initial_menus(void)
NSMenuItem *menuItem;
[NSApp setMainMenu:[[NSMenu alloc] init]];
+ [NSApp setServicesMenu:[[NSMenu alloc] initWithTitle:@"Services"]];
// Application menu
menu = [[NSMenu alloc] initWithTitle:@""];
[menu addItemWithTitle:@"About QEMU" action:@selector(do_about_menu_item:)
keyEquivalent:@""]; // About QEMU
[menu addItem:[NSMenuItem separatorItem]]; //Separator
+ menuItem = [menu addItemWithTitle:@"Services" action:nil
keyEquivalent:@""];
+ [menuItem setSubmenu:[NSApp servicesMenu]];
+ [menu addItem:[NSMenuItem separatorItem]];
[menu addItemWithTitle:@"Hide QEMU" action:@selector(hide:)
keyEquivalent:@"h"]; //Hide QEMU
menuItem = (NSMenuItem *)[menu addItemWithTitle:@"Hide Others"
action:@selector(hideOtherApplications:) keyEquivalent:@"h"]; // Hide Others
[menuItem
setKeyEquivalentModifierMask:(NSEventModifierFlagOption|NSEventModifierFlagCommand)];
--
2.35.1
- [PULL 25/35] hw/i386: Improve bounds checking in OVMF table parsing, (continued)
- [PULL 25/35] hw/i386: Improve bounds checking in OVMF table parsing, Gerd Hoffmann, 2022/03/04
- [PULL 20/35] ossaudio: reduce effective playback buffer size, Gerd Hoffmann, 2022/03/04
- [PULL 22/35] sdlaudio: fix samples vs. frames mix-up, Gerd Hoffmann, 2022/03/04
- [PULL 23/35] hw/usb/redirect.c: Stop using qemu_oom_check(), Gerd Hoffmann, 2022/03/04
- [PULL 24/35] coreaudio: Notify error in coreaudio_init_out, Gerd Hoffmann, 2022/03/04
- [PULL 29/35] ui/console: fix texture leak when calling surface_gl_create_texture(), Gerd Hoffmann, 2022/03/04
- [PULL 27/35] docs: Add spec of OVMF GUIDed table for SEV guests, Gerd Hoffmann, 2022/03/04
- [PULL 28/35] ui/console: fix crash when using gl context with non-gl listeners, Gerd Hoffmann, 2022/03/04
- [PULL 30/35] ui: do not create a surface when resizing a GL scanout, Gerd Hoffmann, 2022/03/04
- [PULL 31/35] ui/clipboard: fix use-after-free regression, Gerd Hoffmann, 2022/03/04
- [PULL 32/35] ui/cocoa: Add Services menu,
Gerd Hoffmann <=
- [PULL 26/35] hw/i386: Replace magic number with field length calculation, Gerd Hoffmann, 2022/03/04
- [PULL 33/35] softmmu/qdev-monitor: Add virtio-gpu-gl aliases, Gerd Hoffmann, 2022/03/04
- [PULL 35/35] hw/display/vmware_vga: replace fprintf calls with trace events, Gerd Hoffmann, 2022/03/04
- [PULL 34/35] edid: Fix clock of Detailed Timing Descriptor, Gerd Hoffmann, 2022/03/04
- Re: [PULL 00/35] Kraxel 20220304 patches, Peter Maydell, 2022/03/05