From 3c17e39d59476d6a917692bcb18bb37137e370b2 Mon Sep 17 00:00:00 2001 From: Geigi Date: Fri, 1 Jul 2016 16:49:54 +0200 Subject: [PATCH] Implemented notification center message for matched autotype instead of the overlay. See issue #422 --- MacPass/MPAutotypeDaemon.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/MacPass/MPAutotypeDaemon.m b/MacPass/MPAutotypeDaemon.m index 27523827..c24a3d5a 100644 --- a/MacPass/MPAutotypeDaemon.m +++ b/MacPass/MPAutotypeDaemon.m @@ -13,7 +13,6 @@ #import "MPAutotypeContext.h" #import "MPAutotypePaste.h" -#import "MPOverlayWindowController.h" #import "MPPasteBoardController.h" #import "MPSettingsHelper.h" @@ -158,9 +157,11 @@ static MPAutotypeDaemon *_sharedInstance; MPAutotypeContext *context = [self _autotypeContextForDocuments:documents forWindowTitle:self.targetWindowTitle preferredEntry:entryOrNil]; /* TODO: that's popping up if the mulit seleciton dialog goes up! */ if(!entryOrNil) { - NSImage *appIcon = [NSApplication sharedApplication].applicationIconImage; - NSString *label = context ? NSLocalizedString(@"AUTOTYPE_OVERLAY_SINGLE_MATCH", "") : NSLocalizedString(@"AUTOTYPE_OVERLAY_NO_MATCH", ""); - [[MPOverlayWindowController sharedController] displayOverlayImage:appIcon label:label atView:nil]; + NSUserNotification *notification = [[NSUserNotification alloc] init]; + notification.title = @"MacPass"; + notification.informativeText = context ? NSLocalizedString(@"AUTOTYPE_OVERLAY_SINGLE_MATCH", "") : NSLocalizedString(@"AUTOTYPE_OVERLAY_NO_MATCH", ""); + + [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification]; } [self _performAutotypeForContext:context]; }