2
0

Copy device identifier from macOS menu item.

This commit is contained in:
Maarten Billemont
2020-09-03 14:10:08 -04:00
parent f665aeccc4
commit aee1030758
3 changed files with 27 additions and 2 deletions

View File

@@ -435,6 +435,12 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
[self updateMenuItems];
}
- (IBAction)copyIdentifier:(id)sender {
[[NSPasteboard generalPasteboard] declareTypes:@[ NSStringPboardType ] owner:nil];
if (![[NSPasteboard generalPasteboard] setString:[PearlKeyChain deviceIdentifier] forType:NSPasteboardTypeString])
wrn( @"Couldn't copy device identifier to pasteboard." );
}
- (IBAction)newUser:(NSMenuItem *)sender {
NSAlert *alert = [NSAlert new];