Cleaned up logging

Added bagde icon to show timeout for clipboard clearing
Badge display not optimal if clipboard clearing is disabled
Autotype incovation on locked documents now activates MacPass to unlock.
If multipel entries match, the seleciton dialog will pop up as well
This commit is contained in:
michael starke
2014-03-27 22:03:04 +01:00
parent ee0a1009b5
commit 0160b9055a
12 changed files with 171 additions and 32 deletions

View File

@@ -11,7 +11,7 @@
/* Notifications */
NSString *const MPPasteBoardControllerDidCopyObjects = @"com.hicknhack.macpass.MPPasteBoardControllerDidCopyObjects";
NSString *const MPPasteBoardControllerDidClearClipboard = @"com.hicknhack.macpass.MPPasteBoardControllerDidCopyObjects";
NSString *const MPPasteBoardControllerDidClearClipboard = @"com.hicknhack.macpass.MPPasteBoardControllerDidClearClipboard";
@interface MPPasteBoardController ()
@@ -73,7 +73,6 @@ NSString *const MPPasteBoardControllerDidClearClipboard = @"com.hicknhack.macpas
}
- (void)copyObjects:(NSArray *)objects {
NSLog(@"ShoudlCopy %@", objects);
/* Should we save the old content ?*/
[[NSPasteboard generalPasteboard] clearContents];
[[NSPasteboard generalPasteboard] writeObjects:objects];
@@ -96,9 +95,9 @@ NSString *const MPPasteBoardControllerDidClearClipboard = @"com.hicknhack.macpas
- (void)_setupBindings {
NSUserDefaultsController *userDefaultsController = [NSUserDefaultsController sharedUserDefaultsController];
NSString *clearOnShutdownKeyPath = [NSString stringWithFormat:@"values.%@", kMPSettingsKeyClearPasteboardOnQuit];
[self bind:NSStringFromSelector(@selector(clearPasteboardOnShutdown)) toObject:userDefaultsController withKeyPath:clearOnShutdownKeyPath options:nil];
NSString *clearTimoutKeyPath = [NSString stringWithFormat:@"values.%@", kMPSettingsKeyPasteboardClearTimeout];
[self bind:@"clearPasteboardOnShutdown" toObject:userDefaultsController withKeyPath:clearOnShutdownKeyPath options:nil];
[self bind:@"clearTimeout" toObject:userDefaultsController withKeyPath:clearTimoutKeyPath options:nil];
[self bind:NSStringFromSelector(@selector(clearTimeout)) toObject:userDefaultsController withKeyPath:clearTimoutKeyPath options:nil];
}
@end