mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 08:52:20 +00:00
moder Objective-C
This commit is contained in:
@@ -604,7 +604,7 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
|
||||
name = [_customFieldsController.arrangedObjects[index] key];
|
||||
}
|
||||
}
|
||||
[[MPPasteBoardController defaultController] copyObjects:@[value] overlayInfo:info name:name atView:self.view];
|
||||
[MPPasteBoardController.defaultController copyObjects:@[value] overlayInfo:info name:name atView:self.view];
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
|
||||
@@ -624,7 +624,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
KPKEntry *selectedEntry = nodes.count == 1 ? [nodes.firstObject asEntry] : nil;
|
||||
NSString *value = [selectedEntry.password kpk_finalValueForEntry:selectedEntry];
|
||||
if(value) {
|
||||
[[MPPasteBoardController defaultController] copyObjects:@[value] overlayInfo:MPPasteboardOverlayInfoPassword name:nil atView:self.view];
|
||||
[MPPasteBoardController.defaultController copyObjects:@[value] overlayInfo:MPPasteboardOverlayInfoPassword name:nil atView:self.view];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -633,7 +633,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
KPKEntry *selectedEntry = nodes.count == 1 ? [nodes.firstObject asEntry] : nil;
|
||||
NSString *value = [selectedEntry.username kpk_finalValueForEntry:selectedEntry];
|
||||
if(value) {
|
||||
[[MPPasteBoardController defaultController] copyObjects:@[value] overlayInfo:MPPasteboardOverlayInfoUsername name:nil atView:self.view];
|
||||
[MPPasteBoardController.defaultController copyObjects:@[value] overlayInfo:MPPasteboardOverlayInfoUsername name:nil atView:self.view];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
KPKAttribute *attribute = selectedEntry.customAttributes[index];
|
||||
NSString *value = attribute.evaluatedValue;
|
||||
if(value) {
|
||||
[[MPPasteBoardController defaultController] copyObjects:@[value] overlayInfo:MPPasteboardOverlayInfoCustom name:attribute.key atView:self.view];
|
||||
[MPPasteBoardController.defaultController copyObjects:@[value] overlayInfo:MPPasteboardOverlayInfoCustom name:attribute.key atView:self.view];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -656,7 +656,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
KPKEntry *selectedEntry = nodes.count == 1 ? [nodes.firstObject asEntry] : nil;
|
||||
NSString *value = [selectedEntry.url kpk_finalValueForEntry:selectedEntry];
|
||||
if(value) {
|
||||
[[MPPasteBoardController defaultController] copyObjects:@[value] overlayInfo:MPPasteboardOverlayInfoURL name:nil atView:self.view];
|
||||
[MPPasteBoardController.defaultController copyObjects:@[value] overlayInfo:MPPasteboardOverlayInfoURL name:nil atView:self.view];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
@interface MPLockDaemon : NSObject
|
||||
|
||||
+ (instancetype)defaultDaemon;
|
||||
@property (class, strong, readonly) MPLockDaemon *defaultDaemon;
|
||||
+ (instancetype)init NS_UNAVAILABLE;
|
||||
|
||||
@end
|
||||
|
||||
@@ -50,8 +50,7 @@ FOUNDATION_EXPORT NSString *const MPPasteBoardControllerDidClearClipboard;
|
||||
* If set to YES, MacPass will clear the pastboard when it quits.
|
||||
*/
|
||||
@property (assign, nonatomic) BOOL clearPasteboardOnShutdown;
|
||||
|
||||
+ (MPPasteBoardController *)defaultController;
|
||||
@property (class, strong, readonly) MPPasteBoardController *defaultController;
|
||||
|
||||
- (void)stashObjects;
|
||||
- (void)restoreObjects;
|
||||
|
||||
Reference in New Issue
Block a user