Copy device identifier from macOS menu item.
This commit is contained in:
parent
f665aeccc4
commit
aee1030758
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16096" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="macosx"/>
|
<deployment identifier="macosx"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16096"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097.3"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||||
@ -199,6 +199,7 @@
|
|||||||
</attributedString>
|
</attributedString>
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
|
<menuItem isSeparatorItem="YES" id="lhE-aV-1P4"/>
|
||||||
<menuItem title="Diagnostics" id="GSN-f0-q7s">
|
<menuItem title="Diagnostics" id="GSN-f0-q7s">
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
<connections>
|
<connections>
|
||||||
@ -216,6 +217,23 @@
|
|||||||
</attributedString>
|
</attributedString>
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
|
<menuItem title="Copy Device Identifier" id="c2c-Vy-iqg">
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="copyIdentifier:" target="494" id="dDF-fR-z6h"/>
|
||||||
|
</connections>
|
||||||
|
</menuItem>
|
||||||
|
<menuItem title="Your anonymous device identifier allows support to find your diagnostic reports." enabled="NO" id="xMa-pq-Bqg">
|
||||||
|
<attributedString key="attributedTitle">
|
||||||
|
<fragment content="Your anonymous device identifier allows support to find your diagnostic reports.">
|
||||||
|
<attributes>
|
||||||
|
<font key="NSFont" size="11" name="Helvetica"/>
|
||||||
|
<paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" firstLineHeadIndent="8"/>
|
||||||
|
</attributes>
|
||||||
|
</fragment>
|
||||||
|
</attributedString>
|
||||||
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
|
</menuItem>
|
||||||
</items>
|
</items>
|
||||||
</menu>
|
</menu>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
- (IBAction)showPasswordWindow:(id)sender;
|
- (IBAction)showPasswordWindow:(id)sender;
|
||||||
- (void)setLoginItemEnabled:(BOOL)enabled;
|
- (void)setLoginItemEnabled:(BOOL)enabled;
|
||||||
- (IBAction)togglePreference:(id)sender;
|
- (IBAction)togglePreference:(id)sender;
|
||||||
|
- (IBAction)copyIdentifier:(id)sender;
|
||||||
- (IBAction)newUser:(NSMenuItem *)sender;
|
- (IBAction)newUser:(NSMenuItem *)sender;
|
||||||
- (IBAction)lock:(id)sender;
|
- (IBAction)lock:(id)sender;
|
||||||
- (IBAction)terminate:(id)sender;
|
- (IBAction)terminate:(id)sender;
|
||||||
|
@ -435,6 +435,12 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
|||||||
[self updateMenuItems];
|
[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 {
|
- (IBAction)newUser:(NSMenuItem *)sender {
|
||||||
|
|
||||||
NSAlert *alert = [NSAlert new];
|
NSAlert *alert = [NSAlert new];
|
||||||
|
Loading…
Reference in New Issue
Block a user