mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 16:22:21 +00:00
Codestyle
Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
@@ -158,7 +158,7 @@ static MPAutotypeDaemon *_sharedInstance;
|
|||||||
MPAutotypeContext *context = [self _autotypeContextForDocuments:documents forWindowTitle:self.targetWindowTitle preferredEntry:entryOrNil];
|
MPAutotypeContext *context = [self _autotypeContextForDocuments:documents forWindowTitle:self.targetWindowTitle preferredEntry:entryOrNil];
|
||||||
/* TODO: that's popping up if the mulit seleciton dialog goes up! */
|
/* TODO: that's popping up if the mulit seleciton dialog goes up! */
|
||||||
if(!entryOrNil) {
|
if(!entryOrNil) {
|
||||||
NSImage *appIcon = [[NSApplication sharedApplication] applicationIconImage];
|
NSImage *appIcon = [NSApplication sharedApplication].applicationIconImage;
|
||||||
NSString *label = context ? NSLocalizedString(@"AUTOTYPE_OVERLAY_SINGLE_MATCH", "") : NSLocalizedString(@"AUTOTYPE_OVERLAY_NO_MATCH", "");
|
NSString *label = context ? NSLocalizedString(@"AUTOTYPE_OVERLAY_SINGLE_MATCH", "") : NSLocalizedString(@"AUTOTYPE_OVERLAY_NO_MATCH", "");
|
||||||
[[MPOverlayWindowController sharedController] displayOverlayImage:appIcon label:label atView:nil];
|
[[MPOverlayWindowController sharedController] displayOverlayImage:appIcon label:label atView:nil];
|
||||||
}
|
}
|
||||||
@@ -210,7 +210,7 @@ static MPAutotypeDaemon *_sharedInstance;
|
|||||||
}
|
}
|
||||||
if([self _orderApplicationToFront:self.targetPID]) {
|
if([self _orderApplicationToFront:self.targetPID]) {
|
||||||
/* Sleep a bit after the app was activated */
|
/* Sleep a bit after the app was activated */
|
||||||
/* TODO - we can use a saver way and use a notification to chekc if the app actally was activated */
|
/* TODO - we can use a saver way and use a notification to check if the app actally was activated */
|
||||||
usleep(1 * NSEC_PER_MSEC);
|
usleep(1 * NSEC_PER_MSEC);
|
||||||
}
|
}
|
||||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||||
|
|||||||
@@ -21,10 +21,13 @@ FOUNDATION_EXPORT NSString *const MPPasteBoardControllerDidCopyObjects;
|
|||||||
*/
|
*/
|
||||||
FOUNDATION_EXPORT NSString *const MPPasteBoardControllerDidClearClipboard;
|
FOUNDATION_EXPORT NSString *const MPPasteBoardControllerDidClearClipboard;
|
||||||
|
|
||||||
/*
|
/**
|
||||||
This time sets the time interval after which a copied entry should be purged from the pasteboard
|
This time sets the time interval after which a copied entry should be purged from the pasteboard
|
||||||
*/
|
*/
|
||||||
@property (assign, nonatomic) NSTimeInterval clearTimeout;
|
@property (assign, nonatomic) NSTimeInterval clearTimeout;
|
||||||
|
/**
|
||||||
|
* If set to YES, MacPass will clear the pastboard when it quits.
|
||||||
|
*/
|
||||||
@property (assign, nonatomic) BOOL clearPasteboardOnShutdown;
|
@property (assign, nonatomic) BOOL clearPasteboardOnShutdown;
|
||||||
|
|
||||||
+ (MPPasteBoardController *)defaultController;
|
+ (MPPasteBoardController *)defaultController;
|
||||||
|
|||||||
@@ -65,9 +65,9 @@ NSString *const MPPasteBoardControllerDidClearClipboard = @"com.hicknhack.macpas
|
|||||||
|
|
||||||
- (void)stashObjects {
|
- (void)stashObjects {
|
||||||
self.stashedObjects = [NSMutableArray array];
|
self.stashedObjects = [NSMutableArray array];
|
||||||
for (NSPasteboardItem *item in [[NSPasteboard generalPasteboard] pasteboardItems]) {
|
for (NSPasteboardItem *item in [NSPasteboard generalPasteboard].pasteboardItems) {
|
||||||
NSPasteboardItem *newItem = [[NSPasteboardItem alloc] init];
|
NSPasteboardItem *newItem = [[NSPasteboardItem alloc] init];
|
||||||
for (NSString *type in [item types]) {
|
for (NSString *type in item.types) {
|
||||||
NSData *data = [[item dataForType:type] mutableCopy];
|
NSData *data = [[item dataForType:type] mutableCopy];
|
||||||
if (data) {
|
if (data) {
|
||||||
[newItem setData:data forType:type];
|
[newItem setData:data forType:type];
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)shouldEditTree:(KPKTree *)tree {
|
- (BOOL)shouldEditTree:(KPKTree *)tree {
|
||||||
return (NO == self.document.isReadOnly);
|
return !self.document.isReadOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSUndoManager *)undoManagerForTree:(KPKTree *)tree {
|
- (NSUndoManager *)undoManagerForTree:(KPKTree *)tree {
|
||||||
|
|||||||
Reference in New Issue
Block a user