mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-01 08:48:01 +00:00
[pasteboard declareTypes] needs to be called before every time you set a string to the pasteboard.
This commit is contained in:
parent
8ae07fb9c9
commit
91b8d6f34f
@ -31,8 +31,6 @@
|
|||||||
|
|
||||||
@property (nonatomic) NodeStatus *status;
|
@property (nonatomic) NodeStatus *status;
|
||||||
|
|
||||||
@property (nonatomic) NSPasteboard *pasteboard;
|
|
||||||
|
|
||||||
- (void)buildMenu;
|
- (void)buildMenu;
|
||||||
|
|
||||||
- (void)onNetworkListUpdated:(NSNotification*)note;
|
- (void)onNetworkListUpdated:(NSNotification*)note;
|
||||||
|
@ -28,9 +28,6 @@
|
|||||||
self.monitor = [[NetworkMonitor alloc] init];
|
self.monitor = [[NetworkMonitor alloc] init];
|
||||||
self.networks = [NSMutableArray<Network*> array];
|
self.networks = [NSMutableArray<Network*> array];
|
||||||
self.status = nil;
|
self.status = nil;
|
||||||
self.pasteboard = [NSPasteboard generalPasteboard];
|
|
||||||
|
|
||||||
[self.pasteboard declareTypes:[NSArray arrayWithObject:NSPasteboardTypeString] owner:nil];
|
|
||||||
|
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
NSDictionary *defaultsDict = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:@"firstRun"];
|
NSDictionary *defaultsDict = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:@"firstRun"];
|
||||||
@ -266,7 +263,9 @@
|
|||||||
|
|
||||||
- (void)copyNodeID {
|
- (void)copyNodeID {
|
||||||
if(self.status != nil) {
|
if(self.status != nil) {
|
||||||
[self.pasteboard setString:self.status.address forType:NSPasteboardTypeString];
|
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
|
||||||
|
[pasteboard declareTypes:[NSArray arrayWithObject:NSPasteboardTypeString] owner:nil];
|
||||||
|
[pasteboard setString:self.status.address forType:NSPasteboardTypeString];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user