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