mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-15 03:33:52 +00:00
Renamed Assets Catalog, modernized code
This commit is contained in:
@@ -74,6 +74,7 @@ NSString *const MPPasteBoardControllerDidClearClipboard = @"com.hicknhack.macpas
|
||||
for (NSPasteboardItem *item in NSPasteboard.generalPasteboard.pasteboardItems) {
|
||||
NSPasteboardItem *newItem = [[NSPasteboardItem alloc] init];
|
||||
for (NSString *type in item.types) {
|
||||
/* mutable copy to ensure actual deep copy */
|
||||
NSData *data = [[item dataForType:type] mutableCopy];
|
||||
if (data) {
|
||||
[newItem setData:data forType:type];
|
||||
@@ -118,26 +119,26 @@ NSString *const MPPasteBoardControllerDidClearClipboard = @"com.hicknhack.macpas
|
||||
NSString *infoText = nil;
|
||||
switch(overlayInfoType) {
|
||||
case MPPasteboardOverlayInfoPassword:
|
||||
infoImage = [[NSBundle mainBundle] imageForResource:@"00_PasswordTemplate"];
|
||||
infoImage = [NSBundle.mainBundle imageForResource:@"00_PasswordTemplate"];
|
||||
infoText = NSLocalizedString(@"COPIED_PASSWORD", @"Password was copied to the pasteboard");
|
||||
break;
|
||||
|
||||
case MPPasteboardOverlayInfoURL:
|
||||
infoImage = [[NSBundle mainBundle] imageForResource:@"01_PackageNetworkTemplate"];
|
||||
infoImage = [NSBundle.mainBundle imageForResource:@"01_PackageNetworkTemplate"];
|
||||
infoText = NSLocalizedString(@"COPIED_URL", @"URL was copied to the pasteboard");
|
||||
break;
|
||||
|
||||
case MPPasteboardOverlayInfoUsername:
|
||||
infoImage = [[NSBundle mainBundle] imageForResource:@"09_IdentityTemplate"];
|
||||
infoImage = [NSBundle.mainBundle imageForResource:@"09_IdentityTemplate"];
|
||||
infoText = NSLocalizedString(@"COPIED_USERNAME", @"Username was copied to the pasteboard");
|
||||
break;
|
||||
|
||||
case MPPasteboardOverlayInfoCustom:
|
||||
infoImage = [[NSBundle mainBundle] imageForResource:@"00_PasswordTemplate"];
|
||||
infoImage = [NSBundle.mainBundle imageForResource:@"00_PasswordTemplate"];
|
||||
infoText = [NSString stringWithFormat:NSLocalizedString(@"COPIED_FIELD_%@", "Field name that was copied to the pasteboard"), name];
|
||||
break;
|
||||
}
|
||||
[[MPOverlayWindowController sharedController] displayOverlayImage:infoImage label:infoText atView:view];
|
||||
[MPOverlayWindowController.sharedController displayOverlayImage:infoImage label:infoText atView:view];
|
||||
}
|
||||
|
||||
- (void)_clearPasteboardContents {
|
||||
|
||||
Reference in New Issue
Block a user