From ea818fd4fc1b699ff893a8ff1e7839a46c1e9d01 Mon Sep 17 00:00:00 2001 From: michael starke Date: Thu, 4 Dec 2014 20:42:24 +0100 Subject: [PATCH] Only displaying the entry user name in autotype if it's set. --- MacPass/MPAutotypeDaemon.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MacPass/MPAutotypeDaemon.m b/MacPass/MPAutotypeDaemon.m index a17bd2d7..f2b19ff8 100644 --- a/MacPass/MPAutotypeDaemon.m +++ b/MacPass/MPAutotypeDaemon.m @@ -234,7 +234,10 @@ NSString *const kMPProcessIdentifierKey = @"kMPProcessIdentifierKey"; NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:context.entry.title action:0 keyEquivalent:@""]; [item setRepresentedObject:context]; [associationMenu addItem:item]; - NSArray *attributes = @[ context.entry.username, context.command ]; + NSArray *attributes = (context.entry.username.length > 0 ) + ? @[ context.entry.username, context.command ] + : @[ context.command ]; + for(NSString *value in attributes) { NSMenuItem *valueItem = [[NSMenuItem alloc] initWithTitle:value action:NULL keyEquivalent:@""]; [valueItem setIndentationLevel:1];