mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 08:12:28 +00:00
Merge pull request #475 from geigi/issue_422
Issue # 422 - Implemented notification center message
This commit is contained in:
@@ -13,7 +13,6 @@
|
|||||||
#import "MPAutotypeContext.h"
|
#import "MPAutotypeContext.h"
|
||||||
#import "MPAutotypePaste.h"
|
#import "MPAutotypePaste.h"
|
||||||
|
|
||||||
#import "MPOverlayWindowController.h"
|
|
||||||
#import "MPPasteBoardController.h"
|
#import "MPPasteBoardController.h"
|
||||||
#import "MPSettingsHelper.h"
|
#import "MPSettingsHelper.h"
|
||||||
|
|
||||||
@@ -158,9 +157,11 @@ 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;
|
NSUserNotification *notification = [[NSUserNotification alloc] init];
|
||||||
NSString *label = context ? NSLocalizedString(@"AUTOTYPE_OVERLAY_SINGLE_MATCH", "") : NSLocalizedString(@"AUTOTYPE_OVERLAY_NO_MATCH", "");
|
notification.title = @"MacPass";
|
||||||
[[MPOverlayWindowController sharedController] displayOverlayImage:appIcon label:label atView:nil];
|
notification.informativeText = context ? NSLocalizedString(@"AUTOTYPE_OVERLAY_SINGLE_MATCH", "") : NSLocalizedString(@"AUTOTYPE_OVERLAY_NO_MATCH", "");
|
||||||
|
|
||||||
|
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
|
||||||
}
|
}
|
||||||
[self _performAutotypeForContext:context];
|
[self _performAutotypeForContext:context];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user